Repository navigation
D621: the Help Center's Popular this week and Did this answer it?, wired to their stores (#1280 step 2) - #1332
Draft
guillaumelauzier wants to merge 2 commits into
Draft
guillaumelauzier wants to merge 2 commits into
guillaumelauzier wants to merge 2 commits into
Conversation
…red to their stores (#1280 step 2) D603 built the stores and routes; this wires the page and lifts the two bans the contract test held until they existed (pages/docs/HelpSignals.jsx): - Popular this week (H1): the four most-viewed guides of the last 7 days that the reader can open, in the route's order. A guide they cannot open, or one the manifest no longer has, is left out, never a dead card. - Did this answer it? (H2): opening a guide records the view; Yes saves at once, No opens one field for what was missing (the Worker's 500 cap), and an answer reads back and can be changed. - The answers, for an admin, on the home: per-guide yes and no, most "no" first, and each missing text, with no names. The member note says who reads the answers, which this card makes true; the canvas's "whoever wrote the guide" names an author no guide records. Loading draws no figure; a failed read says so and offers Try again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jkNYLq29UXAvcqYxGCSB3
|
Preview: https://studioos-pr-1332.guillaumelauzier.workers.dev (built from 4e6950e) The pull request's SPA build on a Worker with no bindings: pages and deep links work, |
Semgrep's detect-non-literal-regexp flagged the helper that built a RegExp from a constant's name. The names were hard-coded, so nothing reachable was at risk, but the helper now takes one literal pattern per constant, and the rank check is a plain string check: the file builds no expression from a string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jkNYLq29UXAvcqYxGCSB3
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
#1280 step 2: the Help Center's last two parts that needed a store. The Help Center canvas draws:
D599 left both out for want of a store, and the contract test banned them. D603 (#1286) built the stores. This PR wires the page to them and lifts the two bans.
Part of #1280: step 3, the content regroup, remains.
Implementation
All three parts are in
pages/docs/HelpSignals.jsx, mounted byDocsLayout.jsx.Popular this week, on the home
Did this answer it?, on each guide
The answers, for an admin, on the home
Every part
Where the build departs from the canvas, and why
Files changed
pages/docs/HelpSignals.jsx(new)pages/docs/helpCenter.js: the pure helperspages/docs/DocsLayout.jsx: the three mounts, and the header notedecisions/D621.md(new)frontend/test/help_signals_d621.test.mjs(new)help_center_contract.test.mjs: the two bans liftedTesting
The full suite.
npm run build, thennpm run test:drift, gaveEXIT=0on this PR's head (4e6950ef4, onmainat3ae3a22c1):lint:undefand the dark-mode check all pass.The second commit answers Semgrep's
detect-non-literal-regexpon the test file. The helper now takes one literal pattern per constant, so no regex is built from a string.New tests (12):
Mutation checks: 24 of 24 caught. Each undid one behaviour, and every file was restored and checked by sha256.
Rendered check. The built bundle was served with stubbed
/apireplies, at 1280 and 390 wide, in light and dark:Risks
/helpsees the popular cards;Dependencies
D603 (#1286, migration 408) is on
main.Agent
S01 · Claude Code
Review requested
The owner.
🤖 Generated with Claude Code
https://claude.ai/code/session_018jkNYLq29UXAvcqYxGCSB3
Generated by Claude Code