chore(design-system): refresh contract baseline and adoption - #2429
Conversation
Primary actions on documents, compare, tools, calculators, forms, and chips still used sub-48px heights. Raise those controls to the tap floor so phone targets stay reachable without shrinking CTAs. Co-authored-by: Cursor <cursoragent@cursor.com>
Metadata and disclosure controls were borrowing tap-floor or ad-hoc min-heights. Add --spacing-compact-meta (40px) and adopt it on those surfaces so primary CTAs stay at 48px. Co-authored-by: Cursor <cursoragent@cursor.com>
Mode homes and compare/detail routes still hand-rolled headers, and the sidebar used raw buttons. Adopt PageHeader and Button so those surfaces share the same chrome and type weight as the rest of the shell. Co-authored-by: Cursor <cursoragent@cursor.com>
Therapy, nav, and prescribing surfaces still used raw spacing and an undocumented type-scale map, and medication accent hex needed a fail-closed test. Tokenise those literals and pin the exemption so new debt cannot hide in the same files. Co-authored-by: Cursor <cursoragent@cursor.com>
Remaining chrome still used raw duration, z-index, and radius literals, Ward motion ignored prefers-reduced-motion, and hash scroll could overshoot. Tokenise those values and clamp in-page scroll so reduced-motion and stacking stay on the documented ladder. Co-authored-by: Cursor <cursoragent@cursor.com>
A-E paid down tap, compact-meta, PageHeader, TSX ratchets, and motion/z chrome. Refresh the contract baseline and generated adoption snapshot so the checker matches that new floor. 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 56 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 selected for processing (1)
Comment |
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_5eaa3de9-4a6f-428c-8566-88e72d694359) |
CI triageCI failed on this PR. Automated classification of the 3 failed job(s):
Compared with main CI run #14226 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
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_a871d085-b612-47d4-ba36-b9ff1a3053b6) |
Resolve conflicts in favour of main, which has since landed the same design-system intent through the shared recipes and Button/PageHeader adoption (PRs #2420, #2424, #2425, #2426): - ui-primitives.tsx: main split the module into primitive-recipes/*; the branch's compact-meta edits to `interactiveCompact` and `tableMicroActionRow` are already present verbatim in recipes.ts. - specifier compare/map/record/builder, differential-detail: main's `primaryControl` / `Button` adoption carries the same `min-h-tap` floor through `controlBase`, so the hand-rolled classes are superseded. - formulation-builder: main's `fieldControlPlain` recipe supersedes the hand-rolled textarea classes. - pathways-screen: main's therapy-pathways redesign (#2413) already removed the arbitrary spacing literals this branch was ratcheting. Regenerate the contract baseline against the merged tree.
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.
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_6c3ea324-1bfe-4e5b-9fea-9a649c658393) |
PR #2427 (D, TSX ratchets) landed on main while this branch was being reconciled. Its version of sidebar-live-shell.module.css is a superset of this branch's: same --gap-tight / --space-1 / --space-2 snapping, plus the collapsed rail height tokenised to calc(100dvh - var(--space-2)) so the border box and its margins fit the viewport exactly. Take main. Regenerate the contract baseline against the merged tree. The branch now carries only E (globals motion/z, Ward reduced-motion, hash scroll clamp) and the baseline refresh. Evidence: 898 test files / 10862 tests passed; lint, typecheck and check:design-system-contract clean.
PR #2428 (E, globals motion/z + Ward reduced-motion + hash scroll clamp) landed on main, completing the A-E stack. Its version of the DS-P3-06 z-index pin is byte-identical to this branch's ratchet (8 -> 4, probe 9 -> 5), so take main and keep the file free of divergence. The branch now contributes exactly one file over main — the regenerated scripts/design-system-contract-baseline.json — which is what this PR is for. Regenerating against the merged tree produced no further change. Evidence: 898 test files / 10862 tests passed; check:design-system-contract, adoption and design-sync all clean.
Summary
maininto the branch and resolve every conflict in favour ofmain, which has since landed the same design-system intent through the shared recipes andButton/PageHeaderadoption (PRs Unify focus chrome and specifier command CTAs (design-system Group 1) #2420, fix(ui): raise remaining interactive tap floors #2424, feat(design-system): compact-meta density policy #2425, refactor(ui): adopt PageHeader on mode pages and Button in sidebar #2426). The branch's hand-rolled tap floors are superseded bycontrolBase, which carriesmin-h-tapfor every recipe that builds on it, so nothing is lost by takingmain.aria-hidden="true"from the factsheet print portal. It came from this branch's local replay of PR refactor(ui): adopt PageHeader on mode pages and Button in sidebar #2426, but the version that merged tomaindeliberately does not carry it: hiding the portal removes the printed document's<h1>and its fact-table row headers from the accessibility tree.globals.cssraw CSS z-index pin from 8 (set by Pay down group-2 visual debt without raising design-system ratchets #2421) down to 4, which the motion/z tokenisation in this branch legitimately pays down.Stack status
A, B and C have merged to
main. This PR still carries D and E, so it can now land independently of the remaining two.Verification
npm run formaton changed files (included in this commit)npm run verify:pr-localRan locally on the merged tree:
npm run lintclean,npm run typecheckclean,npm run test898 test files / 10862 tests passed with 1 skipped, andnpm run check:design-system-contractclean (contract, adoption and design-sync all green).npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsUI verification not run: Chromium journeys were left to hosted CI rather than run locally. The previous Production UI failure was
tests/ui-route-coverage.spec.tsasserting the "Side-by-side review" eyebrow on the specifier comparison page, which the branch had dropped and this merge restores frommain.For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes,
verify:pr-localrunseval:rag:offlineautomatically. Run the offline command directly during iteration before spending a live eval.npm 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.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)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 changedRisk and rollout
Clinical Governance Preflight
This PR is classified clinical-risk only because it touches
src/lib/medications.tsandsrc/lib/medication-records.ts. Both changes are comment-only: they document why the per-recordaccenthex is a stored user colour rather than a design token, so it is correctly exempt from the raw-colour ratchet. No medication data, defaults, or behaviour changed.Clinical KB Database(sjrfecxgysukkwxsowpy)Every item holds without change: the diff adds no data path, no document access, no source-governance behaviour, and no clinical decision-support logic. Removing the print-portal
aria-hiddenrestores conservative behaviour rather than relaxing it — the printed factsheet's headings and row headers become reachable to assistive technology again.Notes
The merge resolution takes
mainforui-primitives.tsx, whichmainhas split intoprimitive-recipes/*. The branch's two edits to that file —interactiveCompactandtableMicroActionRowstepping tosm:min-h-compact-meta— are already present verbatim inprimitive-recipes/recipes.ts, so the split loses nothing.