Repository navigation
fix(mobile): keep session tab icons full size beside long titles - #31169
Conversation
On the over-the-air page a bare svg in a flex row shrinks before the title's ellipsis does, squashing the agent icon to a dot.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
…blyai#31169) (cherry picked from commit 703b313)
ELI5
Each tab in the phone's session tab strip has a small icon (the agent's logo, or a terminal, file or browser glyph) before its title. When the title was long, the icon got squashed down to a dot. Now the icon keeps its size and the title is cut off with "…" instead.
What Changed
Before: on the phone's web page, a tab whose title didn't fit drew its icon 5–8pt wide instead of 13pt. Codex's logo looked like a small circle. Short titles were unaffected.
After: every tab icon is 13×13 whatever the title, and only the title gets shorter.
How: since #29222 a tab is as wide as its title, up to 128pt, so the icon and the title compete for the space left over. On the web page an
<svg>in a flex row can shrink, and react-native-svg'sflex: 0turns into CSSflex: 0 1 0%, which shrinks too. So the browser took width from the icon before it truncated the title. The icon now sits in atabIconslot withflexShrink: 0.Why
A slot around the icon covers every tab type at once: agent logos, which go through react-native-svg or
Image, and lucide's terminal, file and browser glyphs. The alternative was giving each icon component a style prop forflexShrink, which touchesMobileAgentIconand every lucide call site for the same result. The native app already lays these icons out as non-shrinking, so the slot changes nothing there.Linked Issue
Fixes STA-11380
Visual Proof
The tab strip's real styles and icons, rendered in WebKit (the engine iOS uses for the page), 430pt wide:
Testing
Rendered the tab label row with the real styles and icons in headless WebKit and Chromium, then measured each icon. Before: 5.3–7.8pt wide in tabs with long titles. After: 13pt in every tab, in both engines. Not run on a phone; the page reaches phones with the next desktop release.
No automated test: the shrinking only happens in a browser's flex layout, and the mobile unit tests don't do browser layout.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Mobile only, layout style only. No change to what the phone and desktop send each other, and nothing platform- or SSH-specific.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)