Skip to content

Fix lineage child count order below agents - #2574

Merged
brennanb2025 merged 1 commit into
mainfrom
brennankbenson/child-indicator-agent-status-child-swapped
May 22, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennankbenson/child-indicator-agent-status-child-swapped

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move the nested lineage child-card inline agent rows above the n children lineage toggle.
  • Add a focused WorktreeList render regression that builds parent -> child -> grandchild lineage and asserts the nested agent row precedes the nested 1 child toggle.

Design

Design doc: docs/lineage-child-agent-status-order.md (local pipeline artifact; ignored by repo policy for design/planning docs).

Design-review outcome: auto-design-review-fix completed clean after 3 review iterations. It kept the scope narrow to the nested renderLineageChildCard path because top-level WorktreeCard already had the correct order.

Implementation

Changed src/renderer/src/components/sidebar/WorktreeList.tsx to mount WorktreeCardAgents before the nested lineage child-count toggle. No changes to lineage grouping, agent-row derivation, collapse behavior, SSH reconnect lookup, or label copy.

Deviation from design: none.

Completeness Verification

Initial completeness review found the first regression was only source-order based. I replaced it with a DOM/server-rendered WorktreeList test. The rerun completed clean with no findings.

Code Review

Round 1 ran two independent review-code reviewers in parallel. Both returned clean with only residual live UI/SSH validation gaps noted; no second round was needed.

Brennan Test Changes

Verdict: land.

Live Electron validation:

  • Launched Electron from this exact PR worktree and verified identity matched branch brennankbenson/child-indicator-agent-status-child-swapped and this workspace root.
  • Used isolated temp app state plus real demo-project.
  • Created disposable parent -> child -> grandchild lineage.
  • Verified nested child card rendered Lineage proof agent row above the 1 child toggle.
  • DOM/bounds proof: agent group was before the toggle in DOM and visually above it (agentTop=353, toggleTop=413).
  • Clicked the nested child 1 child toggle; it collapsed the grandchild, changed to Show 1 child workspace, and the agent row remained above the toggle.
  • No console errors observed. Dev-only React Grab version warnings and expected cleanup warnings only.
  • Cleanup removed disposable worktrees, closed Playwright, stopped Electron, and removed isolated temp user data.

Screenshot proof captured locally, not committed per repo policy:
/Users/thebr/orca/workspaces/orca/child-indicator-agent-status-child-swapped/.playwright-cli/lineage-child-agent-status-order-current.png

Checks

  • pnpm run typecheck passed
  • pnpm run lint passed
  • git diff --check passed
  • pnpm vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/sidebar/WorktreeCard.lineage.test.tsx src/renderer/src/components/sidebar/useWorktreeAgentRows.test.ts passed: 4 files, 48 tests
  • pnpm exec oxlint src/renderer/src/components/sidebar/WorktreeList.tsx src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts passed
  • pnpm exec oxfmt --check src/renderer/src/components/sidebar/WorktreeList.tsx src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts passed

Residual Risk

  • Live SSH reconnect-dialog scenario was not exercised. The branch changes renderer ordering only and leaves the existing SSH lookup/click path unchanged.

Made with Orca 🐋

@brennanb2025
brennanb2025 merged commit ea63c32 into main May 22, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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