fix(next): import cards never fall back to the system blue for their accent or focus ring

Merged
TE
15d ago
+2-1

Leo-ask: ask-901f6e99da
Leo-ask: ask-f8d7fe1c14 (the "blue focus ring constantly appearing" part)

Leo saw a blue ring pulse around a response and a blue ring that kept appearing in the agent pane. The response ring itself is already off by default on base: #22678 made an agent chat's pane ring in the notification blue when its turn ends, and #23754 (merged) made that ring opt-in (Debug notifications.attention.agentTurnRing, default false) and a neutral hairline when it is on.

The remaining system blue in this sweep is the import suggestion cards (#22710), shown on Home, New Tab and Settings. Root cause: webviews/src/ui/importCards.css:8 set --import-accent: var(--agent-accent, var(--cmux-accent, AccentColor)). On a page without theme tokens, that fell through to AccentColor, the CSS system blue. The card's progress bar and the focus outline on .import-card-button:focus-visible (line 184) then drew in system blue. The same line kept check-system-blue > this checkout is within its baseline red on feat-cmux-next. The fallback is now the cards' own text ink (--import-text). Themed pages are unchanged.

Changelog

  • Fixed: Import suggestion cards never fall back to the system blue for their progress bar or focus ring.

Test

cd webviews && CMUX_BROWSER_TESTS=1 bun test test/check-system-blue.test.ts test/no-system-blue.test.ts (huge-blue)

  • Base 3c16598b: 1 fail, check-system-blue > this checkout is within its baseline (webviews/src/ui/importCards.css: 1 system-accent or blue literals, baseline 0).
  • Head: 13 pass, 0 fail. bun run check passes.

Observed / Not run

  • Observed: a headless Chromium render of an unthemed card. The progress bar and the focused button's ring were blue before and are the text ink after.
  • Not run: the Mac app. The change is to webview CSS only.

No capture: webview-only change; a gallery compare is not useful, because every gallery theme sets the accent tokens and this path is only reached without them.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes import suggestion cards drawing blue accents on unthemed pages. The card's accent previously fell back to the CSS system color AccentColor when no page theme tokens were present, so the progress bar and focus ring rendered in system blue; the fallback is now the cards' own text ink. Themed pages are unchanged.