fix(mobile): account badges no longer clip wide initials like WO #15908
main fromrefs/pull/15908/head·merged by juliusmarminge View on GitHubProblem#
On mobile, an account badge whose initials are wider than the provider icon gets clipped. A Work account shows W( instead of WO on iOS, in thread rows and anywhere else the 14pt ProviderInstanceIcon draws a badge. On Android it's worse: every two-letter badge keeps only its first letter, so PE shows as P and WO as W.
Change#
The badge is absolutely positioned inside the icon, and React Native caps an absolute child at its parent's width, so wider initials wrap and get clipped. In apps/mobile/src/components/ProviderIcon.tsx, the badge now sits in a right-aligned 32pt absolute box (pointerEvents="none") at the same offset, so it sizes to its initials. The position, colours and the badge itself are unchanged, and it's the only file touched.
ProviderInstanceIcon is the only mobile component that draws account initials, so this one change covers every badge: thread rows, the context handoff divider (#15477) and the Limits bar (#11881). Web doesn't need a fix, because CSS never breaks text inside a word, so its badge grows to fit WO instead of clipping it.
Scope and approval#
A very small, focused fix for an obvious bug: the badge exists to show an account's initials, and it cuts them off. It changes one shared component's layout, with no new behaviour or defaults. The mobile thread-row badge came from #9898 → #9899.
Verification#
iOS 26.5 simulator (iPhone 17), T3 Code Dev built from this branch, with a thread on an account named "Work":
| Before | After |
|---|---|
- Two-letter initials that already fit (PE) render in the same place as before.
- With #15477's handoff divider on the same build, the divider reads PE → WO:
- Lint, format and the
apps/mobiletypecheck pass on the touched file. - Android (Pixel 9 Pro emulator, T3 Code Dev built from this branch), the same thread row:
| Before | After |
|---|---|
And the context handoff divider from #15477, without and with this fix:
Implemented with Claude Opus 5.5 in T3 Code (Claude Code harness).
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
b3a1549Macroscope's review found this PR approvable — This is a one-file, self-contained mobile layout fix that preserves the existing badge behavior while allowing wide initials to render without clipping. Its runtime impact is limited to the presentation of existing provider badges, with no defaults, schemas, workflows, or infrastructure affected.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
399579b3-29e1-49d3-a704-6a8e515d6a62
📥 Commits
Reviewing files that changed from the base of the PR and between 37de6cbde65c7cf9ba90a2557c232e63b7e16988 and b3a15499277518c70db7c0ff1391a57a57f55971.
📒 Files selected for processing (1)
apps/mobile/src/components/ProviderIcon.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
When
showBadgeis true,ProviderInstanceIconplaces the initials badge inside a wider, right-aligned absolute wrapper. The badge itself retains its existing dimensions, styling, and content.Changes#
Provider badge layout
Layer / File(s) Summary Badge positioning
apps/mobile/src/components/ProviderIcon.tsxWhen shown, the badge uses a 32-pixel-wide, right-aligned absolute wrapper. The initials bubble remains unchanged. Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
b3a15No actionable merge-blocking issue is identified for this localized badge layout change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly summarizes the main change: mobile account badges no longer clip wide initials. Description check ✅ Passed The description covers the problem, change, scope and approval rationale, and verification. It includes before-and-after screenshots and reports platform-specific checks and test results. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.juliusmarminge merged thise76d648
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes