Skip to content

chore(design-system): refresh contract baseline and adoption - #2429

Merged
BigSimmo merged 15 commits into
mainfrom
claude/ds-h36-baseline
Aug 27, 2026
Merged

chore(design-system): refresh contract baseline and adoption#2429
BigSimmo merged 15 commits into
mainfrom
claude/ds-h36-baseline

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

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 format on changed files (included in this commit)
  • npm run verify:pr-local

Ran locally on the merged tree: npm run lint clean, npm run typecheck clean, npm run test 898 test files / 10862 tests passed with 1 skipped, and npm run check:design-system-contract clean (contract, adoption and design-sync all green).

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

UI 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.ts asserting the "Side-by-side review" eyebrow on the specifier comparison page, which the branch had dropped and this merge restores from main.

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. 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-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Risk and rollout

  • Risk: low — a generated contract baseline, an adoption inventory, and presentation-layer token/tap work. No retrieval, ingestion, auth, or schema changes.
  • Rollback: revert this PR.
  • Provider or production effects: None.
  • RAG impact: no retrieval behaviour change — design-system tap/chrome/tokens only.

Clinical Governance Preflight

This PR is classified clinical-risk only because it touches src/lib/medications.ts and src/lib/medication-records.ts. Both changes are comment-only: they document why the per-record accent hex 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.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

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-hidden restores 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 main for ui-primitives.tsx, which main has split into primitive-recipes/*. The branch's two edits to that file — interactiveCompact and tableMicroActionRow stepping to sm:min-h-compact-meta — are already present verbatim in primitive-recipes/recipes.ts, so the split loses nothing.

BigSimmoand others added 10 commits August 27, 2026 18:13
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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitaiBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 56 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6ad85bac-501d-486f-bf93-38dfd4a14537

📥 Commits

Reviewing files that changed from the base of the PR and between 6f364c1 and e691247.

📒 Files selected for processing (1)
  • scripts/design-system-contract-baseline.json

Comment @coderabbitai help to get the list of available commands.

@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@github-actions

github-actionsBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 3 failed job(s):

  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Production UI (1)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

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.

@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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.
@cursor

cursorBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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.
@BigSimmo
BigSimmo enabled auto-merge (squash) August 27, 2026 15:14
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.
@BigSimmo
BigSimmo merged commit c177519 into mainAug 27, 2026
27 checks passed
@BigSimmo
BigSimmo deleted the claude/ds-h36-baseline branch August 27, 2026 15:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude