Repository navigation
fix(sidebar): move agent child disclosure to the right - #23577
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe shared child disclosure control now accepts a timestamp and uses a shared button with an expanded-state chevron. Full dashboard rows render the control in trailing controls, and compact rows use it in place of their local disclosure button. The changes also update disclosure styling, row layout, sidebar wiring, and tests for disclosure and row interactions. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The disclosure change is ready to merge after normal checks; no actionable issue remains from this review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — relocated the agent child disclosure from the leading gutter to the trailing timestamp slot for both compact and detailed sidebar agent rows.
- Shared disclosure control —
DashboardAgentChildDisclosurenow renders aninline-gridwrapper with anaria-hiddentimestamp span under a ghosticon-xschevronButton; adds an optionaltimestampprop and keeps click/key/mouse/pointer propagation guards.- Trailing controls —
DashboardAgentRowTrailingControlsowns the disclosure, suppresses its standalone timestamp when a disclosure is present, and switches the send-target button to a static flex item in that case.- Row wiring — leading disclosure and the
disclosureInGutter/-ml-7/-ml-5outdents are removed; both rows add theagent-disclosure-rowhook so the CSS reveal applies uniformly.- CSS reveal —
.agent-child-disclosure-timestays in layout but is hidden; inside@media (hover: hover)the collapsed row shows the timestamp and fades the chevron, swapping them on:hover/:focus-within.- Tests — new
DashboardAgentChildDisclosure.test.tsxcovers disclosure isolation from row activation, send targeting and dismissal, plus accessible action updates; theWorktreeCardAgentsmock assertions drop the removed prop.Verification — 56 tests across the three touched suites pass locally;
check:code-quality:changed(including the design-system gate) reports 0 new findings andoxlintis clean on the changed files.ℹ️ Stale rationale for
overflow-x-visible
CompactAgentExpansioninworktree-card-compact-agents.tsxstill explainsoverflow-x-visibleas needed because "a gutter-hung chevron overflows horizontally". This PR removed the compact row's gutter-hung chevron, so that reason no longer holds. The class may still be required for the compact list's negative inline margin, but the comment is now misleading.Technical details
# Stale `overflow-x-visible` rationale ## Affected sites - `src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx:61-62` — the comment justifies `overflow-x-visible` by a "gutter-hung chevron" that this PR deleted (compact row's `-ml-5` outdent / `disclosureInGutter`). File is unchanged by this PR, so no inline anchor. ## Required outcome - The comment no longer describes why the class exists. Either rewrite it to the current reason (if the compact list's `margin-inline-start: -0.5rem; width: calc(100% + 0.5rem)` still needs horizontal overflow) or drop `overflow-x-visible` if it is now unnecessary. ## Open questions for the human - Is horizontal overflow still needed after the leading outdent removal, or is the class now dead?
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
| childAgentCount={1} | ||
| childAgentsExpanded={false} | ||
| onToggleChildAgents={toggle} | ||
| timestamp="5m" |
There was a problem hiding this comment.
Keyboard activation goes untested The test sends Enter and Space keydown events, but only the later click calls the toggle. Its single-toggle assertion would still pass if either key stopped activating the disclosure. Test each key with an interaction that includes the resulting click, and assert its toggle separately.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the incremental follow-up relocates the agent child disclosure's chevron alignment; this run covers the single new commit on top of the already-reviewed relocation.
- Chevron alignment — added
-mr-1.5(and a one-line rationale) to the shared disclosureButton, shifting its 24pxicon-xshit target 6px right so the visible 12pxChevronDownlines up with the summary caret and adjacent row icons without shrinking the click target.
The negative margin does let the button's hit box extend a couple of pixels into the gap-1 before the expand chevron when both are present, but the visible icons stay separated and the target remains off the row-activation path, so this is fine as-is.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
The arrow for expanding an agent's children could hang outside a nested worktree card. It now sits on the right, replacing the timestamp when you hover or focus the row. It stays visible while expanded and on devices without hover.
What Changed
Compact and detailed agent rows share one disclosure control. The timestamp and arrow occupy the same reserved slot, so hovering does not move the text. Removed the extra leftward offsets that made parent-agent rows overflow. Row clicks still open the agent; the arrow only toggles children. Detailed rows keep their dismiss and send actions. The disclosure button’s outer spacing aligns its icon with the summary caret while preserving the larger click target.
Why
Clipping the card can cut off the control instead of fixing its placement. Giving the disclosure space inside the row removes that cause and puts it on the same side as the agent-list expansion control. The chosen design swaps the timestamp at the right edge, rather than placing a permanent disclosure column before the agent icon. Expansion state remains with the existing workspace agent-list owner; no new persisted state or event routing.
Linked Issue
Next-release cherry-pick tasks: STA-8789 for this PR and STA-8790 for #23566.
Related to #23566. This is the requested alternative placement; it does not include that PR's card-clipping change.
Visual Proof
Fresh native Windows high-spec Electron captures at commit
3eabef749cb, using a hidden app with an isolated HOME, CODEX_HOME, and app profile. These show the full sidebar with seeded agent statuses in a disposable repository. Before uses the original base UI sources in the same app; after uses the current PR sources.Collapsed parent on hover:
The agent caret now aligns exactly with the summary caret above it. Windows CDP measured both at x=264 in a 300px sidebar and x=374 in a 410px sidebar. The 24px hit target stays inside the card; its outer padding no longer pushes the visible 12px icon left.
Windows assertions passed for compact/detailed rows, hover without layout movement, expanded visibility, Enter/Space, focus reveal, no-hover touch emulation, and no workspace/tab activation from the disclosure. Screenshots use direct CDP capture because Playwright's screenshot wait stalls on the hidden Windows renderer.
Testing
tc-gate; targeted lint and changed-code quality/design-system gate.Review
Self-reviewed: removes the disclosure-specific outdent and duplicate compact toggle implementation. Existing hierarchy, timestamps, status derivation, and expansion-state ownership remain. No new timers, listeners, host execution, wire fields, provider-specific logic, or persistence.
Agent skill upstream boundary
Notes
Shared renderer presentation applies to local and remote workspaces; no GitHub-only runtime behavior, platform shortcuts, paths, or execution assumptions added.
Checklist