DS V2 PR-A: correctness — HCM proofs, contrast/disabled, prop unions - #1570
Conversation
…ns). Prove forced-colours remaps under the three .ckb-v2 selectors, move placeholders and eyebrows off the decoration tier, retire design-system disabled:opacity recipes, harden Citation/Chip/ToggleSwitch/RadioGroup contracts, and correct the token-file SoT header. Co-authored-by: Cursor <cursoragent@cursor.com>
The standalone spec was outside Playwright's production match pattern, so verify:ui would never collect it. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
🔒 Upgrade RequiredPrivate repository analysis requires Pro or Enterprise. Upgrade: https://ecc.tools/pricing?plan=pro ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:26 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 (11)
📝 WalkthroughWalkthroughThe change updates design-system tokens, forced-colours mappings, disabled-control styling, component prop contracts, placeholder usage, tests, and design-system documentation. ChangesDesign-system correctness
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/applications-launcher-page.tsx (1)
262-274: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse a 48px tap target for the search submit button.
The submit button uses
h-10 w-10, which produces a 40px target. Replace it withmin-h-12 min-w-12or an equivalent 48px size.As per coding guidelines, production tap targets use
min-h-12(48px).Proposed fix
- "mr-1 grid h-10 w-10 place-items-center rounded-full bg-[color:var(--clinical-accent)] text-[color:var(--clinical-accent-contrast)] shadow-[var(--shadow-tight)] transition hover:bg-[color:var(--clinical-accent-hover)]",+ "mr-1 grid min-h-12 min-w-12 place-items-center rounded-full bg-[color:var(--clinical-accent)] text-[color:var(--clinical-accent-contrast)] shadow-[var(--shadow-tight)] transition hover:bg-[color:var(--clinical-accent-hover)]",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/applications-launcher-page.tsx` around lines 262 - 274, Update the submit button in the search form, identified by aria-label={copy.openSelectedAriaLabel}, to provide a minimum 48px tap target by replacing the current h-10 w-10 sizing with min-h-12 min-w-12 or an equivalent 48px constraint while preserving its existing styling and behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/design-system/COMPONENTS.md`:
- Around line 100-125: Update the open-defect ledger rows for Button and
TextField/SearchField/Select to remove the resolved danger contrast token and
decoration-tier placeholder items. Verify the corresponding implementations
first; if either behavior still exists, retain that specific defect and its PR 3
closure reference instead of removing it.
In `@docs/design-system/SPEC.md`:
- Line 430: Update the PR 3 status statement in the design-system specification
to reflect that PR 3 is complete and all ten opacity uses were retired, matching
the completed-status statement elsewhere in the document.
In `@src/components/ui-primitives.tsx`:
- Around line 297-301: Update the read-only indicator props branch around
onToggle and aria-label, plus its rendering path, so an indicator rendered with
role="img" always has an accessible name. Require aria-label for announced
indicators, or apply aria-hidden to intentionally unlabeled indicators; preserve
the existing interactive behavior and ensure both affected type branches follow
the same rule.
- Line 57: Update the toolbarButton recipe so its height and width use 48px
minimum dimensions instead of the h-tap and w-tap utilities tied to the 44px
--tap-min value, while preserving the remaining styling classes unchanged.
In `@tests/ckb-v2-token-contract.test.ts`:
- Around line 218-228: Update the forced-colours token list in the contract test
to include --glow-soft alongside the other tokens expected to match none,
ensuring the test detects any regression that restores its glow.
---
Outside diff comments:
In `@src/components/applications-launcher-page.tsx`:
- Around line 262-274: Update the submit button in the search form, identified
by aria-label={copy.openSelectedAriaLabel}, to provide a minimum 48px tap target
by replacing the current h-10 w-10 sizing with min-h-12 min-w-12 or an
equivalent 48px constraint while preserving its existing styling and behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f6492bed-2135-4e3a-b2bd-7a94bbe259a8
📒 Files selected for processing (22)
docs/branch-review-ledger.mddocs/design-system/COMPONENTS.mddocs/design-system/GATES.mddocs/design-system/SPEC.mdsrc/app/ckb-v2-tokens.csssrc/components/DocumentViewer.tsxsrc/components/applications-launcher-page.tsxsrc/components/calculators/directory-grid.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/formulation/formulation-builder-page.tsxsrc/components/ui-primitives.tsxsrc/components/ui/chip.tsxsrc/components/ui/choice.tsxsrc/components/ui/citation.tsxsrc/components/ui/pagination.tsxsrc/components/ui/tabs.tsxtests/ckb-v2-token-contract.test.tstests/decoration-on-text.contract.test.tstests/disabled-encoding.contract.test.tstests/ui-primitives.dom.test.tsxtests/ui-style-contract.spec.tstests/ui-v2-components.dom.test.tsx
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:7c06d2ce3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
BigSimmo
commented
Aug 1, 2026
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch claude/ds-v2-correctness at starting commit 7c06d2c; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:claude/ds-v2-correctness, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Declare --text-placeholder on the live globals layer so production placeholders resolve outside .ckb-v2; remove accidental UTF-8 BOMs; hide unlabeled ToggleSwitch indicators; extend HCM glow-soft pins; sync SPEC/COMPONENTS defect prose. Co-authored-by: Cursor <cursoragent@cursor.com>
🔒 Upgrade RequiredPrivate repository analysis requires Pro or Enterprise. Upgrade: https://ecc.tools/pricing?plan=pro ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers. |
Uh oh!
There was an error while loading. Please reload this page.
* DS V2 PR-V 5a: close out token values (colour, elevation, ink) No value deltas remain for slice 5a. 59e4c3d landed --shadow-well, the spine and status-mark families and the dark --clinical-chat-document fix; PR 3 (#1570) landed the remaining ink roles. The v2 light and dark blocks declare the same colour set, and the design-system contract reports rawColorLiterals 2 / literalShadowClasses 0 / legacyTapClasses 0 against an unchanged baseline. The two surviving #0f766e literals restate a Postgres column default for a per-record accent colour, so they are data rather than design tokens and stay put; SPEC now records why, to stop a later reader 'fixing' the app default away from the database default. * DS V2 PR-V 5b: move the tap knob to 48px --spacing-tap goes 2.75rem -> 3rem in the globals @theme block, which is the only place it may be set (SPEC 4.10, DECISIONS C2). The v2 layer's --tap-min stops carrying its own value and becomes the pure alias var(--spacing-tap), so the app cannot render a 44/48 split. This moves 426 *-tap call sites across 90-odd files at once. Pins flip in this commit, not a follow-up: ckb-v2-token-contract now asserts the alias, that the v2 layer never declares the knob, and that the @theme value is at least 48px (checked on resolved rem, since a string compare would pass on an alias); ui-style-contract raises its rendered Chromium floor to 48; ui-tools expects the mode-home hero tile at 48. Two follow-through rules came out of the sweep and are written into SPEC 4.10. A grid track that holds a tap-sized child reads var(--spacing-tap) instead of copying the number - seven hardcoded 2.75rem tracks were audited and the launcher search row, the one with no gap between columns, was rebound; the other six absorb the extra 4px into an existing gap or the row's own padding. And the phone composer keeps a deliberate 44px below 431px, because its height is part of the search-chrome contract and 4px per button would re-tune the dock reserve and the phone CLS budget for no accessibility gain. Also retires two min-h-[44px] literals on interactive links onto min-h-tap, and rewrites the comments that restated 44px so they name the token instead. GATES gate 2 moves to implemented-blocking. * DS V2 PR-V 5c: move the control radius to 10px Live @theme --radius-md goes 0.5rem -> 0.625rem, which is the value the v2 layer already declares for controls, inputs and buttons. The two layers disagreeing is what made adoption reshape every control on a surface the moment it opted in (SPEC 4.6), so the step lands here, once, moving all 243 rounded-md call sites across 81 files with a single visual diff instead of one surprise per adopted surface. The 4px-grid pin flips in the same commit: the ladder now carries two named half-steps (sm 6px, md 10px) so a third cannot slip in, and the test additionally asserts the v2 control rung equals the live one - the drift this commit closes cannot silently reopen. Fourteen arbitrary radius literals are absorbed onto the ladder, each to its nearest rung with ties going to the smaller: the therapy 9/10/11/14px values PR-T carried over from the retired stylesheet, the 5px choice box, and the 1.1/1.15/1.35rem dialog and popover corners. The 2px cap on the mode-nav indicator stays a literal and now says why - it is a hairline below the ladder's 4px floor, where the nearest rung would double it into a visible dome. * DS V2 PR-V: record the review ledger row for the values PR * DS V2 PR-V: fix tap leftovers and retune phone chrome pins Complete the phone-composer 44px exception for the input, move Tools search submit onto the tap knob, demote gate 2 to honest partial coverage, correct the SPEC 426-site count, and retune short-runway smoke pins for the 48px geometry. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
.ckb-v2selectors;--text-placeholder+ eyebrows/placeholders off the decoration tier; retire the ten design-systemdisabled:opacity*recipes; discriminated unions forCitation/Chip/ToggleSwitch/RadioGroup;AsyncButtonappliestypeafter the props spread.ckb-v2-tokens.cssheader so this repo file (not a design-project export) is the ranked SoT underAGENTS.md.Verification
npm run verify:pr-local— exit 0; unitTest Files 471 passed (471)/Tests 4878 passed | 3 skipped (4881); production build + client-bundle secret check passed;eval:rag:offlinefixtureOffline RAG fixture and manifest validation passed (36 golden cases, 23 suites)and VitestTest Files 23 passed (23)/Tests 574 passed (574)(J4 baseline-diff: better than known-red main baseline of 4 timeouts / 570 passed — zero assertion failures).npm run verify:ui—344 passed (12.7m).npm run test:e2e:critical—15 passed (37.1s).npm run test:e2e:style-contract—5 passedincluding three ckb-v2 HCM computed selector cases.npm run typecheck+npm run check:design-system-contract— green (raw colors 2; literal shadows 0; legacy tap classes 0).check:outstanding-issues,sitemap:check,docs:check-index,check:branch-review-ledger— green.Verification not run:
verify:release/ live evals / live Lighthouse — outside standing auth for this program PR.Risk and rollout
controlDisabledrecipe; prop unions reject previously constructible inert-enabled Citation/Chip/ToggleSwitch/RadioGroup states (near-zero product call sites for Citation/Chip/RadioGroup).main(Railway auto-redeploys).main. No OpenAI/Supabase/live-eval calls in this PR.Clinical Governance Preflight
Not required — no ingestion, answer generation, search/ranking, source rendering, document-access, privacy, production-env, or clinical-output behaviour change. Paths are design-system tokens/recipes/UI contracts + docs.
Notes
claude/ds-v2-correctness). Auto-merge on green per standing auth.1aa9822978668a10447ef3246bd60cda6f1208cbrecorded before push.ckb-v2-tokens.cssuntil this lands (A→V lease); values glance required before arming V.Summary by CodeRabbit