Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: provider badge initials are invisible on light accent colors #11641

ClosedMnigos(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open Settings → Providers and edit a provider instance (for example Codex).
  2. Set a custom accent color to white #ffffff (any light color reproduces it).
  3. Look at the provider icon in the sidebar, the model picker, or Settings → Usage.

Expected behavior

The account badge keeps its initials readable for every accent color. A light accent should get dark text, a dark accent should get light text.

Actual behavior

The badge always paints its initials in white (text-white in apps/web/src/components/chat/ProviderInstanceIcon.tsx), so with a white or light accent the initials disappear. In the screenshot below Codex has a white accent and shows no "CO", while Claude's orange accent still shows "CL".

The mobile badge has the same hardcoded white text in apps/mobile/src/components/ProviderIcon.tsx.

Codex badge with white accent loses its initials while Claude's orange badge keeps them

Impact

Cosmetic issue

Version or commit

0.0.40-nightly

Environment

macOS desktop app, dark theme

Screenshots, recordings, or supporting files

See the screenshot above.

  1. Thanks for the clear repro and screenshot — this checks out.

    The account badge always paints initials in white:

    • web: text-white on the accent chip in apps/web/src/components/chat/ProviderInstanceIcon.tsx (sidebar, model picker, Settings → Usage)
    • mobile: color: "#ffffff" in apps/mobile/src/components/ProviderIcon.tsx

    So any light accent (#ffffff, pastels) hides the letters. Desktop uses the web component, so both clients need the same contrast rule.

    This is not a duplicate of #11562 / #11610 (badge overlapping the logo). #7968 only fixed the neutral badge background for dark themes and left accent text white.

    Suggested fix: pick black vs white from the accent’s relative luminance (theme code already does this in readableThemeForeground / apps/web/src/themePalette.ts). Put the helper next to normalizeProviderAccentColor in packages/client-runtime so web and mobile stay aligned. A threshold a bit above the WCAG midpoint keeps existing mid-tone accents (e.g. Claude orange) on white text.

    #11643 already implements that (Fixes #11641). Review that PR rather than starting a second fix.

    Cosmetic / a11y-adjacent bug; accepted as a small UI fix.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. Note

    Grok responding on behalf of Julius.

    Fixed by #16128, which just merged to main: provider badge initials on web and mobile now pick black or white text based on contrast with the accent color, so light accents like white stay readable. Thanks for the clear report!

  5. juliusmarminge closed this

Sign in to join this conversation.