Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show provider account accent badge in sidebar rows and hover card #5980

Mergedvitalyiegorov(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/5980/headmerged by juliusmarminge View on GitHub

What Changed

Sidebar v2 thread rows and their hover details card now show which provider account a thread runs on, exactly like the composer's model picker already does:

  • The row's inline provider icon gets the account accent color + initials badge, using the same corner-offset geometry as the composer trigger (badge hangs off the glyph's corner instead of covering it).
  • The hover card's provider line gets a small accent dot on the icon and names the account next to the model (Claude Fable 5 · work-1@example.com). Initials would swallow the card's size-3 glyph, hence the dot + text there.
  • The show-the-badge heuristic (accent color set, or several accounts sharing one provider) previously existed as three hand-rolled copies in ProviderModelPicker and ModelPickerSidebar; it is now one shared shouldShowInstanceBadge helper in providerInstances.ts, used by the composer trigger, the picker rail, and both sidebar row variants — so the badge appears consistently everywhere and can't drift.

Four files changed (+78/−28): apps/web/src/components/Sidebar.tsx (the fix), apps/web/src/providerInstances.ts (shared helper), and the two picker components (now consuming the helper, behavior unchanged). Both SidebarThreadRow and SidebarSearchResultRow already resolve the full ProviderInstanceEntry (which carries accentColor/displayName); the fix threads it into the two existing ProviderInstanceIcon call sites. SidebarThreadTooltip's driverKind prop is replaced by that entry (its only consumer derived driverKind from it anyway). The row's opacity-60 moves from the wrapper span onto the glyph so the accent badge keeps full saturation while the icon stays muted as before.

Why

With multiple accounts on one provider (e.g. work and personal Claude Code subscriptions with separate quotas), the sidebar was the one place you couldn't tell them apart — the composer, picker rail, and settings all show the accent/initials badge, but sidebar rows rendered a bare glyph and the hover card was forced grayscale with only the model label. Fixes #5977.

Not touching #5289/#5300 (provider icon missing entirely for non-primary environments — a lookup-source bug); this change composes with that fix, since it only adds props where the icon already renders.

UI Changes

Captured against a real multi-account setup (three Claude Code accounts, two with custom accent colors, one without).

BeforeAfter
Sidebar rowsSidebar rows before: plain dimmed provider glyphSidebar rows after: provider glyph with corner accent badges (VI, W1) and a neutral initials badge (CL) for the color-less duplicate account
Hover details cardHover card before: grayscale icon, model label onlyHover card after: accent dot on the icon and account name next to the model label

No motion/timing changes, so no video. The badge is the same static element the picker rail renders — no new animations.

Verified locally: vp fmt --check and vp lint --report-unused-disable-directives on the four changed files, vp run --filter @t3tools/web typecheck, and an integrated pass in the web client (screenshots above) covering rows with accent color, rows with duplicate accounts and no color, the hover card, and the composer trigger/rail after the refactor.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (n/a — no motion changes)

Made by Claude Fable 5 in Claude Code.


Note

Low Risk UI-only presentation changes in the sidebar and model picker; no auth, data, or routing logic changes.

Overview Sidebar thread rows and hover cards now match the composer model picker for multi-account provider instances: accent-colored corner badges on inline icons, and tooltip copy that can show model · account display name (with a small accent dot on the small tooltip icon when initials would crowd the glyph).

Badge visibility is centralized in shouldShowInstanceBadge in providerInstances.ts (show when the instance has an accent color or when more than one instance shares the same driver). The composer trigger and picker rail now call that helper instead of duplicating the same rules locally.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7e106393ea70b649ee01d2a66a09b9f3ecbb9ea0. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Show provider account accent badge in sidebar thread rows and hover cards

  • Adds a shouldShowInstanceBadge utility to providerInstances.ts that returns true when an entry has an accentColor or when multiple instances share the same driver kind.
  • Applies the accent badge to provider icons in sidebar thread rows, search result rows, and the thread tooltip hover card using this utility.
  • Appends the provider instance display name to the model label in tooltips when the badge is shown.
  • Replaces duplicate inline badge-visibility logic in ModelPickerSidebar and ProviderModelPicker with calls to shouldShowInstanceBadge.
Macroscope summarized 7e10639.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 236df097-5ea9-46fd-af51-04681c86d4a7

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved a9bec0c

      This PR consolidates duplicate badge-display logic into a shared utility function and extends the visual badge rendering to sidebar rows and hover cards. All changes are purely visual/styling with no runtime behavior impact beyond display.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged thisa5d3532

    5. juliusmarminge closed this

Sign in to join this conversation.