Repository navigation
fix(dashboard): stop the agent icon shrinking on long card titles - #11001
Conversation
A bare <svg> flex item shrinks with its row, so kanban cards and the terminal dialog rendered a squashed ~9px agent icon whenever the worktree name overflowed. Wrap both in the shrink-0 span every other surface already uses.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAgent icons in the dashboard kanban card and terminal dialog header are now wrapped in inline-flex containers with shrink prevention. No other component logic or props behavior changed. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
Live Electron A/B (dev build, this branch)Attached CDP to the dev app on this worktree ( Both shots are the same window at the same 700px viewport and scroll position. The only difference is whether the Before — bare After — this branch Measured icon widths (
|
| Card title | Overflows? | Before | After |
|---|---|---|---|
Feedback terminal visibility ux |
no | 14.00 | 14.00 |
fix(pty): strip inherited Claude child-session-id |
yes | 9.90 | 14.00 |
orca-trust-dialog |
no | 14.00 | 14.00 |
brennanb2025/tcc-helper-usage-strings |
yes | 10.61 | 14.00 |
Only truncated cards shrink, and shrinkage scales with overflow — at a 960px viewport the same two cards measured 11.86 / 12.71. That matches the original report (a ~9px icon in a narrow window) and confirms the cause is flex shrink, not agent type or card state.
Not covered
AgentTerminalDialog(the second call site in this PR) was not exercised live — it needs a card with a liveptyId, and this instance had no running agents. The markup change is identical to the card's.- Card data was injected over the real IPC bridge rather than produced by live agent sessions.
…ablyai#11001) A bare <svg> flex item shrinks with its row, so kanban cards and the terminal dialog rendered a squashed ~9px agent icon whenever the worktree name overflowed. Wrap both in the shrink-0 span every other surface already uses.


Problem
In the agent dashboard, one card's Claude icon renders noticeably smaller (and washed out) than the rest:
It looked like a status or agent-type difference. It isn't — it's flexbox.
Cause
AgentKanbanCardrendered the icon as a bare<svg>flex item:An
<svg>with the defaultflex-shrink: 1shrinks along with its row. Cards whose worktree name fits are unaffected; the moment the title overflows and truncates, the browser distributes the shrink proportionally to flex-basis and the 14px icon loses ~5px. The dimmer color is just antialiasing on the downscaled glyph.AgentTerminalDialoghad the same bare call site, so a long worktree name in the dialog header squeezed its 13px icon too.Every other surface already guards against this —
DashboardAgentRow,worktree-card-compact-agent-row, andActivityPrototypePageall wrapAgentIconin<span className="inline-flex shrink-0">, andAgentStateDotbakesshrink-0into its own wrapper. These two popout call sites were the outliers.Fix
Wrap both in the same
inline-flex shrink-0span the rest of the app uses. No layout change for cards that already fit.Testing
AgentKanbanCard.test.tsx— 4/4 pass.oxfmt --checkclean; lint-staged (oxlint + react-doctor) clean on commit.Note: the existing tests mock
AgentIcon, so they don't cover sizing. Verification here is the CSS reasoning plus parity with the surfaces that already carry the guard.Follow-up (not in this PR)
The durable fix is moving
shrink-0insideAgentIconso no call site can omit it, but that needs aclassNamepass-through on ~10 icon components — out of scope for a one-line rendering bug.