fix(web): keep provider badge legible in dark themes - #7968
fix(web): keep provider badge legible in dark themes#7968RakshithBhat03 wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
The Codex provider badge became unreadable in dark mode. Its translucent
--mutedfill let the OpenAI mark show through theCOinitials, making the provider icon look different from light mode.Neutral badges now composite
muted,card, andbackgroundover an opaque Canvas layer before drawing the initials. Accent-colored badges keep their solid provider color, and the same component behavior remains consistent in the composer, sidebar, model picker, and settings. Translucent imported themes are covered as well.Tests: 39 focused tests and targeted lint. The scoped web typecheck still reports two existing
conditionalUIerrors inapps/web/src/components/clerk/electronPasskeys.test.ts, outside this change.Screenshots
Built by GPT-5.6 Sol in T3 Code through the Codex harness.
Note
Fix
ProviderInstanceIconbadge legibility in dark themesThe neutral provider badge used
bg-muted, which is translucent in dark themes and let the underlying glyph show through. A newNEUTRAL_BADGE_SURFACEconstant stacks--muted,--card,--background, andCanvasas layered linear-gradients to fully occlude the glyph. The badge now usesbg-card text-muted-foregroundand applies the layered surface via inline style when noaccentColoris set; solid accent badges are unchanged. Added test coverage in ProviderInstanceIcon.test.tsx.Macroscope summarized 454e353.
Note
Low Risk
Small CSS-only badge styling change in a presentational icon component, with new unit tests and no auth or data-path impact.
Overview
Fixes unreadable Codex (and other) instance badges in dark mode, where a translucent
--mutedfill let the provider glyph show through the initials.Neutral badges now stack
muted,card, andbackgroundover an opaqueCanvaslayer (bg-cardinstead ofbg-muted). Accent-colored badges stay a solid provider color with no extra layers. AddsProviderInstanceIcontests covering initials, hidden badges, custom borders, and the no-glyph fallback.Reviewed by Cursor Bugbot for commit 454e353. Bugbot is set up for automated code reviews on this repo. Configure here.