Repository navigation
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 (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe compact agent list now receives status-gutter visibility and adjusts lineage-row padding accordingly. An end-to-end test checks layout at two sidebar widths with status shown and hidden, and verifies disclosure toggling and worktree selection. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The nested-card disclosure layout is covered by the new test, and no actionable merge-blocking issue remains after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
There was a problem hiding this comment.
ℹ️ No critical issues — one minor note inline.
Reviewed changes
- Compact agent-list gutter fix —
WorktreeCardAgentsnow addshasLineage && (hasStatusGutter ? 'pl-3' : 'pl-7')to the compact list root, so the parent disclosure chevron (hung left with-ml-5) stays inside the card surface and the parent/sibling/child state-dot columns stay aligned. - Gutter signal wiring —
WorktreeCardSecondaryRowspassespresentation.showCombinedStatusSlotdown as the newhasStatusGutterprop. - Rendered regression spec — new
tests/e2e/worktree-agent-disclosure-layout.spec.tsseeds a lineage scenario and polls containment plus dot-column alignment across 410/280px widths and status shown/hidden, toggling the disclosure with both mouse and keyboard.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| className={cn( | ||
| 'flex flex-col mt-1 gap-0.5', | ||
| // Reserve the disclosure gutter for every row so parent, sibling and child columns stay aligned. | ||
| hasLineage && (hasStatusGutter ? 'pl-3' : 'pl-7'), |
There was a problem hiding this comment.
This pl-7 branch is unreachable in production — status is a fixed card property (FIXED_WORKTREE_CARD_PROPERTIES in src/shared/worktree/card-properties.ts:5) that normalizeWorktreeCardProperties re-adds on every write, so showCombinedStatusSlot is always true. The test only reaches the status-hidden case by writing worktreeCardProperties through store.setState, which bypasses normalization; a real user cannot hide the status icon. If that is deliberate future-proofing, fine — otherwise the hasStatusGutter prop and the showStatus: false test axis can be dropped and the fix reduced to pl-3.
Technical details
# `hasStatusGutter` false branch is unreachable
## Affected sites
- `src/renderer/src/components/sidebar/WorktreeCardAgents.tsx:381` — `hasLineage && (hasStatusGutter ? 'pl-3' : 'pl-7')`.
- `src/renderer/src/components/sidebar/worktree-card-secondary-rows.tsx:70` — passes `presentation.showCombinedStatusSlot`.
- `tests/e2e/worktree-agent-disclosure-layout.spec.ts:100-101` — filters `'status'` out of `worktreeCardProperties` via `store.setState`.
## Why it is unreachable
- `use-worktree-card-controller.ts:34` derives `showStatus = cardProps.includes('status')`.
- Every writer of `worktreeCardProperties` (`setWorktreeCardProperties`, `setWorktreeCardMode`, hydration, main-process read/update, RPC client params, web preload) runs `normalizeWorktreeCardProperties`, which starts from `['status', 'unread']` and always re-adds them (`src/shared/worktree/card-properties.ts:5,61-72`).
- `worktree-card-presentation.tsx:93` sets `showCombinedStatusSlot = showStatus`, so `hasStatusGutter` is a constant `true` in any reachable UI state.
## Required outcome
- Either confirm/justify keeping the defensive branch, or simplify the fix (drop the prop + ternary and the test's `showStatus` axis). No behavior change either way for reachable states.
ELI5
Keep the child-agent arrow inside a nested worktree card without breaking the alignment of nearby agents.
What Changed
Compact agent lists with children now reserve room for the disclosure arrow across the entire list. They reserve more space when the workspace status icon is hidden, because that removes the card's existing gutter. Parent and independent sibling status dots stay aligned, and child agents stay indented.
Why
Moving only the arrow's row inward fixed the overflow but misaligned parents with siblings and children. Reserving space for the list preserves the existing tree layout and hit targets. The tradeoff is slightly earlier text truncation in narrow cards.
Linked Issue
User-reported screenshot; no existing issue.
Visual Proof
Hidden Electron screenshots with seeded agent/worktree state. Before restores the original list padding through CDP; after uses the final built code. Each image shows the full worktree sidebar. Top-level and nested worktrees appear together.
Testing
Review
Adversarial review caught and fixed sibling/child misalignment in the first approach and overflow when status is hidden. Final screenshot review found no blocking issues. Gemini orchestration was unavailable because this session had no sender mailbox; two agents inspected the screenshots instead.
Agent skill upstream boundary
Notes
Full agent rows and compact lists without child agents keep their existing spacing.
Checklist