From 57125285fc7a9aa0c514bdf102660f195e1c032f Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 15 Oct 2026 18:55:18 -0700 Subject: [PATCH] Keep collapsed sidebar agent cards steady when the child arrow appears (#29246) * fix(sidebar): keep agent card height stable across child disclosure * test(sidebar): update child row snapshots for stable disclosure height --- .../DashboardAgentRowTrailingControls.tsx | 5 +++-- .../components/sidebar/WorktreeCardAgents.tsx | 5 +++-- ...ent-child-row-fallback-pixels.test.tsx.snap | 18 +++++++++--------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/renderer/src/components/dashboard/DashboardAgentRowTrailingControls.tsx b/src/renderer/src/components/dashboard/DashboardAgentRowTrailingControls.tsx index 62b6ff2589d..af112272922 100644 --- a/src/renderer/src/components/dashboard/DashboardAgentRowTrailingControls.tsx +++ b/src/renderer/src/components/dashboard/DashboardAgentRowTrailingControls.tsx @@ -76,8 +76,9 @@ export function DashboardAgentRowTrailingControls({ return ( {(sendTargetStatus === 'eligible' || sendTargetStatus === 'sending') && ( diff --git a/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx b/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx index 0f0cfaaf8a0..425a142625b 100644 --- a/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx +++ b/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx @@ -316,8 +316,9 @@ const WorktreeCardAgentsBody = React.memo(function WorktreeCardAgentsBody({ : undefined const descendantAncestorPaneKeys = new Set(ancestorPaneKeys) descendantAncestorPaneKeys.add(agent.paneKey) + // Keep collapsed children from occupying a separate flex-gap slot. return ( - +
) : null} - +
) } diff --git a/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap b/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap index 0babfb0534c..481b6777a7a 100644 --- a/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap +++ b/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap @@ -28,19 +28,19 @@ exports[`sidebar child rows from a legacy subagents snapshot > render the compac exports[`sidebar child rows from a legacy subagents snapshot > render the full rows exactly as before 1`] = ` [ - "
Review the parserclaude-sonnet
", - "
Explore
", - "
Working
", - "
Approve edits
", - "
Rate limited
", - "
Teammate
", - "
Lost child
", + "
Review the parserclaude-sonnet
", + "
Explore
", + "
Working
", + "
Approve edits
", + "
Rate limited
", + "
Teammate
", + "
Lost child
", ] `; exports[`sidebar child rows from a legacy subagents snapshot > render the full rows exactly as before 2`] = ` [ - "
Review the parserclaude-sonnet
", - "
Explore
", + "
Review the parserclaude-sonnet
", + "
Explore
", ] `;