fix(design-system): correct three false gate/ledger claims; retire the left/right knob - #1655
Conversation
…ft/right knob All four defects verified present on origin/main before the edit. GATES.md Gate 3 justified its "planned" label with "`--focus` is referenced nowhere in the DS export". Measured on this tree: 4 declarations against 273 `var(--focus)` consumers, 260 in `.tsx`. The token is adopted; only the check is missing. Row keeps `planned` with true evidence and a stated path to blocking. GATES.md §1 claimed type-step and icon-step discipline is "currently unenforced" because no rule files exist in `eslint-rules/`. True about ESLint, wrong about enforcement: `check:type-scale` and `check:icon-scale` have run in `verify:cheap` since 30 July as hard-zero gates. Rewritten to separate what is enforced (arbitrary `text-[12px]`/icon sizes, blocked) from what is not (which named step a component picks — 1 318 call sites across the eight non-standard steps), so nobody writes a lint duplicating one that already ships. COMPONENTS.md §0.4: `Tabs` no longer points `aria-controls` at unrendered panels and the link family no longer leaks `tone` to the DOM — both fixed in code while the ledger still listed them open. Surviving halves (invalid tab value emptying the tab order, `download` overridable by spread) stay. The `ui-primitives.tsx` row said 572 lines; it is 686, and 200 product files import it against 27 of 53 registered components adopted. ToggleSwitch's knob animated `left`/`right`, a Gate 9 layout-property violation. Now travels on `transform` with a tokenised duration and a reduced-motion opt-out; geometry unchanged (w-10 track, 16px knob inset 4px, 16px throw). ui-primitives + ui-v2-components + design-system-adoption: 109 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 59 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
…ch docs The PR claimed tone was destructured in every link, but DownloadLink still spread it to the DOM; §9.4 also still listed the left/right knob as open. Destructure tone on DownloadLink, refresh COMPONENTS.md §9.4/§9.20 and the ToggleSwitch ledger row, and pin both contracts in DOM tests. Regenerate the adoption manifest for the new link test coverage. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
PR #1655 review-and-fix summaryTip: Findings → disposition
No protected RAG/ranking surfaces touched. No Clinical Governance / ThreadsNone open; none resolved (nothing to reply to). Required CI (tip
|
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…family (#1663) Section D, the half that carries no conflict with the two open PRs: this touches only `src/app/globals.css` and the contract scripts, none of which #1655 or #1658 holds. Corrects the measurement first. The backlog and the audit both quote the letterspacing sprawl as ~371 sites across 31 values; that number counts `*-mockups.tsx`, which is design scratch and gate-exempt by policy. Production only: 110 sites across 18 values. The gate's AST pass — which sees statically resolvable class roots — counts 68 across 40 files, and that is the number a ratchet can act on. The real defect turns out to be sharper than sprawl. 57 of the 110 production sites are one value, 0.06em, while the single pre-existing token `--tracking-eyebrow` is declared at 0.08em. The token has almost no consumers because it was named for a number nobody writes. Adds five named roles sized to the measured production mass, not to the mockup-inflated spread: --tracking-display -0.02em absorbs the six-site negative cluster --tracking-normal 0 --tracking-label 0.06em absorbs 66 sites including the 57-site mass --tracking-eyebrow 0.08em pre-existing, value deliberately unchanged --tracking-kicker 0.12em absorbs 23 sites Five roles rather than seven: production does not justify a second wide step or a separate tight-display step. No fold moves a call site by more than 0.04em. `--tracking-eyebrow` keeps 0.08em on purpose. Retuning it to the more common 0.06em would silently move every current consumer of the token — a different change from naming the scale, and one that wants its own measured step. Adds an `arbitraryTracking` metric to the design-system contract, mirroring the existing literal-shadow ratchet exactly, baselined per path at today's 68 so the family cannot regrow while the call-site migration waits for the open PRs to land. `tracking-[var(--…)]` is the sanctioned token form and is not counted, the same exemption `text-[color:var(--…)]` has in the type-scale check. No call sites migrated in this commit — that is 40 files including `ui-primitives.tsx`, which #1655 owns. Ratchet proven to bite, not assumed: injecting `tracking-[0.077em]` into mode-nav.tsx failed the checker with "arbitraryTracking increased from 68 to 69" and the per-path line, then the file was restored clean. Verification: check:design-system-contract exit 0 · typecheck 0 · lint 0 · ckb-v2-token-contract + design-token-contract + design-system-contract-utils 85 passed. Pre-existing baseline metrics were asserted unchanged before the baseline was rewritten; only `arbitraryTracking` was introduced. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Corrects three claims in the design-system documents that did not match the code, and fixes the one code defect found while verifying them. Every claim below was measured on this branch's tree before the edit.
GATES.md Gate 3 evidence was false. The row justified its
plannedlabel with "--focusis referenced nowhere in the DS export". Measured: 4 declarations (2 theme, 2 forced-colours) against 273var(--focus)consumers, 260 of them in.tsx. The token is adopted; the check is what is missing. The row keepsplanned— there is genuinely no companion-ring check — but now states true evidence and a path to blocking. A row that understates shipped work costs the document its authority as surely as one that overstates it, and nobody files a bug against pessimism.GATES.md §1 claimed type-step and icon-step discipline is "currently unenforced". True about ESLint, wrong about enforcement.
npm run check:type-scaleandnpm run check:icon-scale(scripts/check-type-scale.mjs,scripts/check-icon-scale.mjs, both--strict) have run insideverify:cheapsince 30 July as hard-zero gates with no baseline. Rewritten to separate what is enforced (arbitrarytext-[12px]/ icon-size utilities, blocked outright) from what is not (which named step a component picks — 1 318 call sites across the eight non-standard steps). This matters practically: the previous wording invited someone to write a lint that already ships.COMPONENTS.md §0.4 listed two defects that are fixed in code.
Tabsno longer pointsaria-controlsat unrendered panels (it is emitted only for the selected tab when that tab owns a panel), and the link family no longer leakstoneto the DOM (it is destructured before the spread in every link). Both rows now record the resolved half and keep the surviving half — invalid selected value can still empty the tab order;downloadis still overridable by spread. Theui-primitives.tsxrow said 572 lines; it is 686, and 200 product files import it against 27 of 53 registered components adopted.ToggleSwitch knob animated
left/right. A Gate 9 layout-property violation. It now travels ontransformwith a tokenised duration and a reduced-motion opt-out. Geometry is unchanged: w-10 track, 16px knob inset 4px each side, so the throw is 40-4-4-16 = 16px (translate-x-4).No behaviour change beyond the ToggleSwitch transition property. No token values changed, no component API changed.
Verification
npm run test— 5 443 passed, 1 failed, 3 skipped. The single failure istests/installed-lock-parity.test.ts(installed playwright 1.62.0 vs locked 1.62.1), environmental and pre-existing — issue#149, and already recorded as such in GATES.md §4. Unrelated to this diff.npm run lint— exit 0npm run typecheck— exit 0npx prettier --checkon the three changed files —All matched files use Prettier code style!npm run check:design-system-contract—design-sync contract checked: 53 components and 7 guidelinesnpm run check:type-scale—no arbitrary text-[<n>px|rem|em] font sizes in srcui-primitives.dom.test.tsx,ui-v2-components.dom.test.tsx,design-system-adoption.test.ts— 109 passednpm run verify:pr-localcould not complete locally: it fails closed atcheck:installed-lock-parityon the same playwright drift above, before running anything else.npm run verify:uiwas not run locally — this box had 83 node processes active and a contended Chromium run produces false reds rather than signal. Theui: trueclassification means CI's Chromium job covers it on this PR, which is the authoritative environment for it.scripts/pr-policy.mjsclassification for the changed paths:clinicalRisk: false,operationalRisk: false,ragRanking: false,ui: true. No Clinical Governance Preflight and noRAG impact:line required.🤖 Generated with Claude Code