Skip to content

fix(ds-v2): revert command token to graphite, undo blue drift - #1630

Merged
BigSimmo merged 7 commits into
mainfrom
claude/design-system-1616-colors-aw538h
Aug 5, 2026
Merged

fix(ds-v2): revert command token to graphite, undo blue drift#1630
BigSimmo merged 7 commits into
mainfrom
claude/design-system-1616-colors-aw538h

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • src/app/ckb-v2-tokens.css: PR ui: complete and activate the v2 design system #1616 shipped the now-globally-mounted .ckb-v2 layer with --command set to blue (#1a66a8 light / #3a80c0 dark) — the same hue family as --clinical-accent. That contradicts docs/design-system.md's non-negotiables ("--command* (graphite) for the primary CTA family") and docs/redesign/permanent-colour-direction.md (the doc named as the colour-dispute tie-breaker; --command: #111827, explicitly mapped to "Primary command buttons" / "Sidebar New chat"). The change was never recorded in docs/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)").
  • Reverted --command, --command-hover, --command-active, --command-contrast in both the light and dark .ckb-v2.ckb-v2 blocks to graphite, matching the existing globals.css compatibility layer. --command-active has 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-700 values) rather than inventing a hex.
  • Corrected the stale header comment that claimed "blue command colour" — left as-is it would have been exactly the kind of doc/comment drift this fix exists to remove.
  • Restores the intended separation between --command (primary CTA) and --clinical-accent (evidence/selected-mode/send) — the entire point of the colour role contract in permanent-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.
  • Live-verified via npm run ensure + a Playwright check against the running dev server: --command resolves to #111827, and the New Chat button's computed background-color is rgb(17, 24, 39); canvas background stays #fff (crisp white unaffected). Before/after screenshots taken.
  • Verification not run: 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

  • Risk: Low — CSS custom property values only, no component code changed. Every consumer already reads var(--command)/var(--command-hover)/etc., so no call-site changes needed.
  • Rollback: Revert this commit; the prior blue values are recoverable from git history.
  • Provider or production effects: None.

Notes

  • If the blue command colour was actually an intentional pivot rather than unreviewed drift, the correct fix is the opposite of this PR: keep blue and add a divergence entry to docs/design-system/TOKENS.md §1 plus updates to docs/design-system.md and permanent-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

    • Updated command button colors across light and dark themes for improved contrast and a more neutral visual appearance.
    • Refined the offline page’s command colors and glow effects to match the updated themes.
  • Bug Fixes

    • Refreshed the cached offline app shell so users receive the latest styling and offline experience.

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.
@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7df7e1bc-da09-47ba-a490-82de24c3d403

📥 Commits

Reviewing files that changed from the base of the PR and between 0fa7d3b and e66ecaa.

📒 Files selected for processing (1)
  • tests/pwa-manifest.test.ts
📝 Walkthrough

Walkthrough

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

Changes

Theme colors and PWA cache

Layer / File(s)Summary
Command color tokens
src/app/ckb-v2-tokens.css, public/offline.html
Light-theme command colors now use graphite values. Dark-theme command colors now use light neutral values with dark contrast text.
PWA cache version and assertions
public/sw.js, tests/pwa-manifest.test.ts
The cache version changes to 2026-08-05-v3. Tests expect the updated offline accent and HTML hash.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the main change: reverting the v2 command color token from blue to graphite.
Description check✅ PassedThe description explains the changes, verification, risks, rollback, and production effects with sufficient detail for this pull request.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@supabase

supabaseBot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review August 5, 2026 18:03
@BigSimmo
BigSimmo enabled auto-merge (squash) August 5, 2026 18:03

@devin-ai-integrationdevin-ai-integrationBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

claudeand others added 2 commits August 5, 2026 18:09
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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/pwa-manifest.test.ts (1)

90-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between ce3bd2d and 0fa7d3b.

📒 Files selected for processing (4)
  • public/offline.html
  • public/sw.js
  • src/app/ckb-v2-tokens.css
  • tests/pwa-manifest.test.ts

claudeand others added 2 commits August 5, 2026 19:28
…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.
@BigSimmo
BigSimmo merged commit 98b65ae into mainAug 5, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the claude/design-system-1616-colors-aw538h branch August 5, 2026 19:56
BigSimmo added a commit that referenced this pull request Aug 5, 2026
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>
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