fix(mobile): show the provider account badge on thread rows - #9899
fix(mobile): show the provider account badge on thread rows#9899vitalyiegorov wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9673c6c. Configure here.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused client-side UI enhancement that adds account badges to mobile thread rows while preserving existing provider routing and single-instance presentation; its shared display logic is small, tested, and has no schema, deployment, security, billing, or static-analysis impact. The supplied medium findings concern account-label disambiguation and Unicode initials, and the head includes the corresponding shared fallbacks and tests. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
9673c6c to
31e9fd1
Compare
0685e1f to
d3fcee6
Compare
There was a problem hiding this comment.
All clear
Posted via Macroscope — Effect Service Conventions
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes provider-instance display logic, resolves provider instances for mobile threads, and renders account badges in mobile home and sidebar thread rows. It also adds branch-thread actions and swipeable lifecycle updates. ChangesProvider instance badges
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to Mobile thread rows now display provider account badges and configured accents, improving account identification without an identified current-head merge risk. Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The pull request includes changes not required by issue
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d3fcee6 to
0753eb9
Compare
There was a problem hiding this comment.
All clear
Posted via Macroscope — Effect Service Conventions
|
All clear Posted via Macroscope — Effect Service Conventions |
0753eb9 to
ddbca06
Compare
Thread rows drew a bare provider glyph, so two accounts on the same provider looked identical. Rows now carry the same accent-color initials badge the web sidebar shows, driven by the badge rule shared through client-runtime so the two clients cannot drift. Built with Claude Fable 5.1 in Claude Code.
ddbca06 to
514d950
Compare

What Changed
Mobile thread rows now show which provider account a thread runs on, the way the web sidebar has since #5980. When an instance has an accent color, or several instances share one provider, the provider glyph carries the account's accent badge with its initials. Rows for a single plain instance look exactly as before.
The badge rule and the instance label rule move from the web app into
client-runtime, so web and mobile name and badge an instance identically. Web keeps its call sites. Mobile replaces the inline provider lookup in the Home list and the iPad sidebar with one resolver that returns the driver, label, accent, and badge flag, scoped to the thread's own environment because default instance ids collide across servers. The legacy v1 list never drew a provider glyph and is left alone.Fixes #9898.
Why
With a work and a personal subscription on the same provider, the phone was the one client where you could not tell them apart. The row rendered a dimmed glyph, and an accent color set on the server never appeared on mobile. The data was already on the device; the row only received the driver and dropped the display name and accent on the way.
Review guide
Eleven files, one concern. Read in this order:
packages/client-runtime/src/state/providerInstanceDisplay.ts(new) —shouldShowInstanceBadge,normalizeProviderAccentColor,providerInstanceInitials, and the instance label rule, moved verbatim fromapps/web/src/providerInstances.tsandProviderInstanceIcon.tsx. Only two behavior changes: initials iterate by code point so an emoji name does not split, and the label fallback (humanize a non-default instance id when the server sent the brand label) is now shared instead of web-only. Exported as@t3tools/client-runtime/state/provider-instance-display.apps/web/src/providerInstances.ts,apps/web/src/components/chat/ProviderInstanceIcon.tsx— import from the shared module and re-export the old names. No web call site changes.apps/mobile/src/features/threads/thread-provider-instance.ts(new) —resolveThreadProviderInstance(serverConfigs, thread), the one lookup both lists use.apps/mobile/src/components/ProviderIcon.tsx—ProviderInstanceIcon: the existing glyph at 60% opacity plus the corner badge, same geometry as web.apps/mobile/src/features/threads/thread-list-v2-items.tsx,HomeScreen.tsx,ThreadNavigationSidebar.tsx— the row takes the resolved instance instead of a driver string; each screen swaps its inline.find(...)for the resolver.Risk is low: client-only, no contract or persistence change. The only web-visible effect is that
deriveProviderInstanceEntriesnow calls the shared label resolver, which is the same code it called before.UI Changes
Same server, same threads, one Claude Code account with a green accent color.
No motion changes, so no video.
Verification
vp test run packages/client-runtime/src/state/providerInstanceDisplay.test.ts apps/mobile/src/features/threads/thread-provider-instance.test.ts apps/web/src/providerInstances.test.tsChecklist
Written by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Note
Show provider account badge on mobile thread rows
ProviderInstanceIconto mobile, which dims the provider glyph and overlays an account badge with initials and accent colorresolveThreadProviderInstanceto resolve environment-scoped provider metadata (display name, accent color, badge visibility) for each thread row; HomeScreen and ThreadNavigationSidebar now pass this metadata to rowsThreadListV2Rowinput changed from a driver string toThreadRowProviderInstancemetadata — any caller not updated viaHomeScreenorThreadNavigationSidebarwill fail to compileMacroscope summarized 514d950.