Repository navigation
fix(web): dark accent colors no longer vanish in usage bars - #30745
lucyfromnaarm wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Dark custom accents are lightened in dark-mode usage bars so they remain visible, while light-mode colors and fallback colors stay unchanged. The change is presentation-only and does not alter usage calculations or saved settings. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
A provider account with a black (or very dark) accent color has an invisible bar on the Usage page in dark mode. The fill is drawn with the accent at 35% opacity, which disappears against the dark track, so only the account name and pace tick show.
Repro: set a Claude account's accent to
#000000, open Usage in dark mode.Change
usageAccentColorresolves an account accent aslight-dark(accent, oklch(from accent max(l, 0.6) c h)). In dark mode a dark accent gets a lightness floor of 0.6 with its hue and chroma kept; light mode and lighter accents are unchanged. It replaces the twonormalizeProviderAccentColor(...) ?? fallbackcall sites that feed the usage bars (single-account and pooled).Scope and approval
Very small, focused fix for an obvious rendering bug: a user-selectable accent makes its usage bar unreadable. No behavior change outside the usage bar colors.
Verification
Rendered
UsageLimitsPooledin a temporary browser test with three Claude accounts (#000000,#16a34a,#7c3aed), onmainand on this branch, in both themes.Dark, before (black account's bar is empty):
Dark, after:
Light, before / after (unchanged):
Accents already above lightness 0.6 render the same; ones just below it (purple
#7c3aed, L≈0.54) get slightly lighter in dark mode.Also ran:
tsc --noEmitfor apps/web,vp lint,vp fmt --checkandUsageLimitsPooled.browser.test.tsx, all passing.Written by Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code