Skip to content

fix(dashboard): stop the agent icon shrinking on long card titles - #11001

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-claude-icon-size
Jul 27, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-claude-icon-size

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Problem

In the agent dashboard, one card's Claude icon renders noticeably smaller (and washed out) than the rest:

normal long title
14px ~9px

It looked like a status or agent-type difference. It isn't — it's flexbox.

Cause

AgentKanbanCard rendered the icon as a bare <svg> flex item:

<div className="flex items-center gap-1.5">
  <AgentIcon ... size={14} />   // default flex-shrink: 1
  <span className="truncate">{card.worktreeName}</span>

An <svg> with the default flex-shrink: 1 shrinks 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.

AgentTerminalDialog had 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, and ActivityPrototypePage all wrap AgentIcon in <span className="inline-flex shrink-0">, and AgentStateDot bakes shrink-0 into its own wrapper. These two popout call sites were the outliers.

Fix

Wrap both in the same inline-flex shrink-0 span the rest of the app uses. No layout change for cards that already fit.

Testing

  • AgentKanbanCard.test.tsx — 4/4 pass.
  • oxfmt --check clean; 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-0 inside AgentIcon so no call site can omit it, but that needs a className pass-through on ~10 icon components — out of scope for a one-line rendering bug.

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.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d62c03f-156b-4755-b537-088fe7a05fae

📥 Commits

Reviewing files that changed from the base of the PR and between 24706cc and 94d044b.

📒 Files selected for processing (2)
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx
  • src/renderer/src/components/dashboard-popout/AgentTerminalDialog.tsx

📝 Walkthrough

Walkthrough

Agent 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)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections, especially screenshots or a no-change note, AI review details, security audit summary, and platform-specific notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main fix: preventing the agent icon from shrinking in dashboard cards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Live Electron A/B (dev build, this branch)

Attached CDP to the dev app on this worktree (Orca: brennanb2025/fix-claude-icon-size), enabled the experimental pop-out dashboard, and drove the real producer→pop-out bridge (window.api.dashboard.publishSnapshot) with four cards — two whose worktree names overflow, two that fit. Rendering path is the production AgentKanbanCard; only the card data is synthetic.

Both shots are the same window at the same 700px viewport and scroll position. The only difference is whether the shrink-0 wrapper is present (toggled live via HMR).

Before — bare <svg> (bug reproduced)

dashboard-icon-before.png

After — this branch

dashboard-icon-after.png

Measured icon widths (getBoundingClientRect)

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 live ptyId, 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.

@brennanb2025
brennanb2025 merged commit 1fcbf8e into main Jul 27, 2026
23 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant