Pay down group-2 visual debt without raising design-system ratchets - #2421
Conversation
Split ui-primitives into primitive recipes, land built-but-unregistered AppliedFilters/CopyButton, and align GATES prose to the measured 34 shadow-alias baseline. Co-authored-by: Cursor <cursoragent@cursor.com>
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 102 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (100)
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_00404ec9-90fe-438e-945c-688d9d9c781b) |
Apply #2419's sm:grow page-shell change on the moved searchPageShell recipes so the PR is no longer CONFLICTING. Co-authored-by: Cursor <cursoragent@cursor.com>
…al-debt # Conflicts: # data/repo-awareness-snapshot.json
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5393113c-981d-4081-94d7-d6f804db2819) |
…al-debt # Conflicts: # data/repo-awareness-snapshot.json
Merging origin/main brought in a refactor that split pathways-screen.tsx into a new pathway-picker-sheet.tsx, moving one file's pre-existing text-sm/text-sm-minus density-mix debt with it. Regenerate the per-path baseline from source so the ratchet tracks the renamed file; the aggregate count is unchanged (26) and several other tracked metrics improved (raw padding/gap/margin literals all down).
BigSimmo
commented
Aug 27, 2026
CI status: Both CI runs on this branch ( No fix ported here since it's out of scope for a design-system visual-debt PR; leaving it for a separate fix to the ward-flow mockup test/component. Generated by Claude Code |
…al-debt # Conflicts: # data/repo-awareness-snapshot.json
Uh oh!
There was an error while loading. Please reload this page.
Two failures the merge surfaced, both from this branch replaying work that main has since taken in a different shape: - factsheet-detail-page: drop `aria-hidden="true"` from the print portal. It came from this branch's local replay of PR #2426, but the version that merged to main deliberately does not carry it — hiding the portal removes the printed document's `<h1>` and its fact-table row headers from the accessibility tree, which is what `tests/factsheet-detail-header.dom.test.tsx` exists to prevent. - design-system-contract-utils: ratchet the globals.css raw CSS z-index pin from 8 (set by #2421) to 4. The motion/z tokenisation in this branch legitimately paid that debt down; the pin is a floor to lower, not raise. Evidence: 898 test files / 10862 tests passed; lint, typecheck and check:design-system-contract clean.
Summary
ui-primitivesbarrel intoprimitive-recipesmodules so product surfaces share named recipes instead of a 700-line grab-bag, without changing registered design-sync exports (still 55, not 57).AppliedFiltersandCopyButtonas built, proof-migrated, DOM-tested components that remain unregistered; COMPONENTS.md no longer lists them as specified-not-built.--e2and ratchetlegacyShadowAliases87 → 34 with matching GATES prose. CSS aliases--shadow-card/--shadow-soft/--shadow-liftare kept.Verification
npm run format— Prettier rewrotedocs/design-system/FIX-GUIDE.mdandGATES.md(CRLF cleanup);verify:pr-localthen reportedAll matched files use Prettier code style!npm run check:design-system-contract—Design-system contract passed (1030 production files; … legacy shadow aliases 34; …)thendesign-system adoption checked: 55 components, 76 rootsanddesign-sync contract checked: 55 components and 7 guidelinesnpm run verify:pr-local— ran; lint and typecheck completed. Unit suite endedTest Files 3 failed | 888 passed | 3 skipped (894)/Tests 8 failed | 10754 passed | 75 skipped (10837)on unrelated files (claude-cloud-profile.test.tsexit 127,dead-code-candidate.test.tstimeout,document-viewer-page-virtualization.dom.test.tsxflake). Build and offline RAG evals were not reached.npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changedUI verification not run: handoff explicitly skipped
verify:ui/verify:release/ live evals. Styling is token/recipe swaps and contract ratchets; Chromium journeys are left to CI Production UI.npm run verify:releasebefore release or handoff confidence claimsnpm run eval:retrieval:quality(must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.Verification not run: no retrieval, ranking, selection, chunking, or scoring behaviour change.
npm run eval:rag -- --limit 15+npm run eval:quality -- --rag-onlywhen answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)Verification not run: answer generation, synthesis prompt, and post-processing are unchanged.
npm run check:production-readinesswhen clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changednpm run check:deployment-readinesswhen deployment startup, hosting, or rollout behavior changedVerification not run: no production-env, Supabase, or deployment-startup change.
Risk and rollout
check:design-system-contract(passed at 34 aliases / 55 registered components) and keeping CSS--shadow-card/--shadow-soft/--shadow-liftaliases in place.src/lib/rag/, retrieval RPCs, golden fixtures, or ranking tests.Clinical Governance Preflight
Path classifier treats
data/repo-awareness-snapshot.jsonandauth-panel.tsxas clinical-risk even though this diff only catalogues FIX-GUIDE and replaces--shadow-softwith--e2on the auth form shell. Preflight completed against that classification:Clinical KB Database(sjrfecxgysukkwxsowpy)No clinical decision-support behaviour changed; TGA/SaMD classification is unchanged.
Notes
AppliedFiltersandCopyButtonstay off the design-sync registry on purpose (Chip/Button add path is a 55-row cascade).--shadow-card/--shadow-softCSS aliases,--shadow-lift, type-scale steps, or splitmaster-search-header.stash@{0}(ds-group2-wip-before-ff) is leftover local WIP from the stalled handoff and can be dropped after this PR is confirmed.Note
Medium Risk
Touches many surfaces via shadow token swaps and changes design-system contract/adoption tooling; risk is mostly visual/regression in styling and CI gates, not clinical or auth logic.
Overview
Refactors the
ui-primitivesbarrel intoprimitive-recipes/modules while keeping the same public exports; design-sync and adoption scripts now followexport * fromhops soAsyncButtonand recipe scans still resolve fromui-primitives.tsx.Adds
AppliedFiltersandCopyButtonas built, proof-migrated UI pieces (catalogue toolbar chips, answer copy control);answer-statusre-exportsCopyButtonfromcopy-button.tsxinstead of a local hand-rolled control. They stay off the 55-row design-sync registry; docs and adoption manifest reflect import counts and tests without counting them as specified-not-built.Pays down
--shadow-soft/--shadow-cardusage onto--e2across production and mockups (including chat composer shell inglobals.css), ratchetinglegacyShadowAliases87 → 34 while keeping the legacy CSS alias tokens in place.Introduces
sameFileTextSmMinusMix(warn + per-path ratchet, baseline 26) incheck:design-system-contract, with matching guidance in GATES, TOKENS, and FIX-GUIDE (catalogued in docs index and repo snapshot). Updates adoption manifest test wiring, AnswerCard baseline harness note, and GATES prose (HCM/z-index suites already implemented; shadow-alias debt figures aligned).Reviewed by Cursor Bugbot for commit 4b6e8a0. Configure here.