Skip to content

fix(sidebar): move agent child disclosure to the right - #23577

Merged
brennanb2025 merged 2 commits into
mainfrom
fix/agent-disclosure-trailing
Sep 28, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
fix/agent-disclosure-trailing

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​157 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​152
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​127 $\color{#cf222e}{\Huge{\mathbf{−}}}$​105 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22

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.

Before After
Before After

Collapsed parent on hover:

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

  • Hidden Electron/CDP checks: compact and detailed modes, expand/collapse, Enter/Space, focus reveal, light/dark themes, no-hover touch emulation, 300px/410px sidebar widths, alternate card style, status column hidden.
  • Checked that disclosure clicks preserve the active workspace/tab, hover preserves control geometry, and the button stays within the card bounds.
  • 65 tests across disclosure interactions, dashboard rows, sidebar agents, stable agent messages, and workspace/agent expansion independence. Tests cover row activation, send targeting, and dismissal remaining separate from child expansion.
  • Renderer typecheck through tc-gate; targeted lint and changed-code quality/design-system gate.
  • Dev Electron build and renderer compilation exercised. Full release build left to CI. Native Linux, real touch hardware, folder workspace rendering, and live SSH were not exercised.

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

  • Not applicable.

Notes

Shared renderer presentation applies to local and remote workspaces; no GitHub-only runtime behavior, platform shortcuts, paths, or execution assumptions added.

Checklist

  • This PR is small and focused
  • Explained the user-facing change, mechanism, and alternatives
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform and SSH impact considered; validation gaps listed
  • Relevant tests, renderer typecheck, and changed-code gates pass; broader build/platform coverage left to CI

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 08032984-dc20-4cd5-899d-ed8528253d6b

📥 Commits

Reviewing files that changed from the base of the PR and between fcf1827 and 3eabef7.

📒 Files selected for processing (1)
  • src/renderer/src/components/dashboard/DashboardAgentChildDisclosure.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/dashboard/DashboardAgentChildDisclosure.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The 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 3eabe

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the sidebar agent child disclosure control to the right.
Description check ✅ Passed The description is complete and focused. It covers the user-facing change, implementation, rationale, linked issues, visual proof, testing, review notes, platform limitations, and checklist items. The…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 — DashboardAgentChildDisclosure now renders an inline-grid wrapper with an aria-hidden timestamp span under a ghost icon-xs chevron Button; adds an optional timestamp prop and keeps click/key/mouse/pointer propagation guards.
  • Trailing controls — DashboardAgentRowTrailingControls owns 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-5 outdents are removed; both rows add the agent-disclosure-row hook so the CSS reveal applies uniformly.
  • CSS reveal — .agent-child-disclosure-time stays 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.tsx covers disclosure isolation from row activation, send targeting and dismissal, plus accessible action updates; the WorktreeCardAgents mock 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 and oxlint is clean on the changed files.

ℹ️ Stale rationale for overflow-x-visible

CompactAgentExpansion in worktree-card-compact-agents.tsx still explains overflow-x-visible as 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?

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Repositions child agent disclosure UI in sidebar.

The PR appears safe to merge; the keyboard-test gap is non-blocking.

Findings

  1. P2 Keyboard activation goes untested ▶

Summary

The PR moves child-agent disclosure controls from the leading gutter into the trailing timestamp slot and shares the control between compact and detailed rows.

  • Removes disclosure-specific row outdents and adds hover, focus, and no-hover presentation.
  • Adds interaction tests, though the new keyboard test does not verify key activation.

Reviews (1) · Last reviewed commit: "fix(sidebar): align agent disclosure wit..."

Comment on lines +74 to +77
childAgentCount={1}
childAgentsExpanded={false}
onToggleChildAgents={toggle}
timestamp="5m"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 disclosure Button, shifting its 24px icon-xs hit target 6px right so the visible 12px ChevronDown lines 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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

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