fix(ds-v2): revert command token to graphite, undo blue drift - #1630
Conversation
PR #1616 shipped `.ckb-v2` with `--command` set to blue (#1a66a8 light / #3a80c0 dark), matching the clinical-accent hue family. That contradicts docs/design-system.md's non-negotiables and docs/redesign/permanent-colour- direction.md (both say command is graphite), and it was never recorded as a reconciled divergence in docs/design-system/TOKENS.md §1 the way six other v2/design-side conflicts were — the change had no documented rationale, only an unresolved code-comment reference. Revert light/dark --command, --command-hover, --command-active, and --command-contrast in both .ckb-v2 blocks to the graphite values already used by the globals.css compatibility layer, restoring the distinction between command (primary CTA) and clinical-accent (evidence/selected/send) that the colour system depends on. --command-active is new in v2 (no prior compat- layer value existed); picked the next step down the existing graphite/neutral ramp rather than inventing a value. Verified: tests/ckb-v2-token-contract.test.ts (26 passed, including the command-contrast legibility check in both shells) and a live Playwright check against `npm run ensure` confirming --command resolves to #111827 and the New Chat button's computed background matches.
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:45 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 (1)
📝 WalkthroughWalkthroughThe change replaces blue command colors with graphite and light neutral values across the application and offline page. It also increments the service-worker cache version and updates PWA test expectations. ChangesTheme colors and PWA cache
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex review on PR #1630 (P2, discussion_r3722901690) caught that the offline.html standalone shell still hard-coded the old blue --command values as --page-accent — it can't import globals.css/ckb-v2-tokens.css, so it mirrors the tokens locally, and the earlier revert only updated the live CSS file. Updated both light and dark --page-accent/-hover/-glow values to match the graphite command tokens, bumped sw.js CACHE_VERSION (offline.html is precached at install time; shipping without a version bump strands installed clients on the stale copy per docs/pwa.md rules 1 and 5), and updated the pwa-manifest.test.ts palette string and cacheVersion/hash pairing. While fixing this, found the v2 dark --command-contrast I'd set in the prior commit was #060708 — borrowed from the compat layer's neutral-0, not from v2's own dark ramp. offline.html's test explicitly bans that literal (it's meant to track "the canonical v2 palette" only), so rather than let the two files diverge, changed --command-contrast to #0a0c0e — v2's own existing --surface-inset dark value — in both ckb-v2-tokens.css and offline.html. Contrast against the light command pill (#f5f7f7) is unaffected. Verified: tests/pwa-manifest.test.ts + tests/ckb-v2-token-contract.test.ts, 37 passed.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/pwa-manifest.test.ts (1)
90-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd assertions for all changed offline command tokens.
This test checks only the light
--page-accent. It does not check the dark accent or either mode's hover, contrast, and glow values. Add assertions for those tokens so palette regressions cannot pass this test.Suggested assertions
expect(offlineHtml).toContain("--page-accent: `#111827`; /* --command */"); + expect(offlineHtml).toContain("--page-accent-hover: `#0b1220`; /* --command-hover */");+ expect(offlineHtml).toContain("--page-accent-contrast: `#ffffff`; /* --command-contrast */");+ expect(offlineHtml).toContain("--page-glow: rgb(17 24 39 / 10%);"); expect(offlineHtml).toContain("--page-background: `#0b0e11`; /* dark --background */"); expect(offlineHtml).toContain("--page-surface: `#1c2126`; /* dark --surface-raised */"); + expect(offlineHtml).toContain("--page-accent: `#f5f7f7`; /* dark --command */");+ expect(offlineHtml).toContain("--page-accent-hover: `#e6e9e8`; /* dark --command-hover */");+ expect(offlineHtml).toContain("--page-accent-contrast: `#0a0c0e`; /* dark --command-contrast */");+ expect(offlineHtml).toContain("--page-glow: rgb(245 247 247 / 10%);");🤖 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 `@tests/pwa-manifest.test.ts` around lines 90 - 94, Extend the offlineHtml assertions in the manifest test to cover every changed command token: dark --page-accent plus both light and dark hover, contrast, and glow values. Keep the existing light accent, background, surface, and removed-color assertions, and verify each expected token is present.
🤖 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.
Nitpick comments:
In `@tests/pwa-manifest.test.ts`:
- Around line 90-94: Extend the offlineHtml assertions in the manifest test to
cover every changed command token: dark --page-accent plus both light and dark
hover, contrast, and glow values. Keep the existing light accent, background,
surface, and removed-color assertions, and verify each expected token is
present.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 10582285-6bfe-4a28-ab2b-83943aaad645
📒 Files selected for processing (4)
public/offline.htmlpublic/sw.jssrc/app/ckb-v2-tokens.csstests/pwa-manifest.test.ts
…accent CodeRabbit nitpick on PR #1630 (trivial/quick-win): the offline-palette test only checked light --page-accent, leaving hover/contrast/glow and the dark accent triple unguarded — a future palette edit to any of those could drift silently and still pass. Add assertions for all six remaining tokens so the whole command-color mirror is covered, matching what public/offline.html actually declares. Verified: tests/pwa-manifest.test.ts, 11 passed.
Uh oh!
There was an error while loading. Please reload this page.
Squash commit 98b65ae on main verified content-identical to the merged branch tip (empty git diff) — no orphaned late commits from the auto-merge race. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
src/app/ckb-v2-tokens.css: PR ui: complete and activate the v2 design system #1616 shipped the now-globally-mounted.ckb-v2layer with--commandset to blue (#1a66a8light /#3a80c0dark) — the same hue family as--clinical-accent. That contradictsdocs/design-system.md's non-negotiables ("--command*(graphite) for the primary CTA family") anddocs/redesign/permanent-colour-direction.md(the doc named as the colour-dispute tie-breaker;--command: #111827, explicitly mapped to "Primary command buttons" / "SidebarNew chat"). The change was never recorded indocs/design-system/TOKENS.md§1, the table built specifically to log reconciled design-side/repo-side divergences (it holds six other entries) — no doc anywhere argues for blue, only an unresolved code-comment reference ("(#1, #12)").--command,--command-hover,--command-active,--command-contrastin both the light and dark.ckb-v2.ckb-v2blocks to graphite, matching the existingglobals.csscompatibility layer.--command-activehas no prior compat-layer value (it's new in v2), so I picked the next step down the existing graphite/neutral ramp (reusing already-declared--neutral-950/--neutral-700values) rather than inventing a hex.--command(primary CTA) and--clinical-accent(evidence/selected-mode/send) — the entire point of the colour role contract inpermanent-colour-direction.md, which explicitly warns against one accent colour "doing too much visual work."Verification
npx vitest run tests/ckb-v2-token-contract.test.ts— 26 passed, including the command/command-contrast legibility check (≥4.5:1) in both light and dark shells.npm run ensure+ a Playwright check against the running dev server:--commandresolves to#111827, and the New Chat button's computedbackground-colorisrgb(17, 24, 39); canvas background stays#fff(crisp white unaffected). Before/after screenshots taken.npm run verify:pr-local/npm run verify:ui— this is a token-value-only revert to a CSS custom property (2 colour triples across 2 theme blocks), already covered by the focused contract test plus a live-rendered proof of the one changed control (New Chat /--command). No component, routing, layout, or structural CSS changed.Risk and rollout
var(--command)/var(--command-hover)/etc., so no call-site changes needed.Notes
docs/design-system/TOKENS.md§1 plus updates todocs/design-system.mdandpermanent-colour-direction.md. I did not find any evidence of that intent in the design-system doc set, so I treated this as a regression per user confirmation.Generated by Claude Code
Summary by CodeRabbit
Style
Bug Fixes