Skip to content

feat(workspaces): group multi-run worktrees in the worktrees tab - #415

Merged
chriswritescode-dev merged 1 commit into
mainfrom
feat/worktree-multi-run-groups
Oct 10, 2026
Merged

chriswritescode-dev merged 1 commit into
mainfrom
feat/worktree-multi-run-groups

Conversation

@chriswritescode-dev

@chriswritescode-dev chriswritescode-dev commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Multi-run worktrees now nest under their multi-run in the Worktrees tab, the same way scheduled worktrees nest under their schedule, so a run's worktrees stay together as they pile up.

  • Group worktrees whose directory belongs to a multi-run under one collapsible card labeled with the run name and worktree count.
  • Render each multi-run worktree inline with its sessions and per-worktree new-session, terminal and delete actions, without a per-worktree collapse.
  • Add a "Clean up" action that removes every worktree in the run at once.
  • Pass the repo's multi-runs into the groups from useMultiRuns.

Validation

  • frontend: vitest run src/components/repo/WorktreeSessionGroups.test.tsx src/pages/__tests__/RepoDetail.schedule-sessions.test.tsx (10 passed)
  • frontend: tsc -b (passes)
  • frontend: eslint on changed files (passes)

Summary by CodeRabbit

  • New Features
    • Multi-run worktrees now appear together in collapsible cards, with their sessions displayed inline.
    • Starting a session from a multi-run card targets the selected worktree, and card actions support cleaning up associated worktree directories.
    • Worktree groups and entries are ordered by recent session activity. Scheduled worktrees remain grouped by schedule, while standalone worktrees stay separate.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: f96c28bd-3f74-43f9-93f2-7113c866f196

📥 Commits

Reviewing files that changed from the base of the PR and between 4abbfef and 3a370b7.


📒 Files selected for processing (4)
  • frontend/src/components/repo/WorktreeSessionGroups.test.tsx
  • frontend/src/components/repo/WorktreeSessionGroups.tsx
  • frontend/src/pages/RepoDetail.tsx
  • frontend/src/pages/__tests__/RepoDetail.schedule-sessions.test.tsx

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



📝 Walkthrough

Walkthrough

RepoDetail now loads multi-run data and passes it to WorktreeSessionGroups. The component groups matching worktrees into collapsible multi-run entries while retaining scheduled and individual worktree entries.

Changes

Multi-run worktree display

Layer / File(s) Summary
Match worktrees to multi-runs
frontend/src/components/repo/WorktreeSessionGroups.tsx
The component accepts multi-run data and matches worktrees to runs using directories from run entries and fusions. It groups matching non-scheduled worktrees by run.
Render grouped worktrees
frontend/src/components/repo/WorktreeSessionGroups.tsx, frontend/src/components/repo/WorktreeSessionGroups.test.tsx
Shared actions and session rendering support compact multi-run entries. Multi-run entries render as collapsible cards with cleanup actions. The test covers grouping, session creation, and collapsing alongside a manual worktree.
Load and pass multi-run data
frontend/src/pages/RepoDetail.tsx, frontend/src/pages/__tests__/RepoDetail.schedule-sessions.test.tsx
RepoDetail loads multi-run data with showWorktrees and passes it to the grouping component. Schedule-session tests mock the multi-run hooks and initialize empty data.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant RepoDetail
  participant useMultiRuns
  participant WorktreeSessionGroups
  participant buildGroupEntries
  RepoDetail->>useMultiRuns: Load multi-runs for repoId with showWorktrees
  useMultiRuns-->>RepoDetail: Return multiRuns
  RepoDetail->>WorktreeSessionGroups: Pass multiRuns and worktrees
  WorktreeSessionGroups->>buildGroupEntries: Group worktrees by run directories
  buildGroupEntries-->>WorktreeSessionGroups: Return grouped entries
Loading

Merge Risk: ⚪ Minimal · up to 3a370

Multi-run grouping has no established merge-blocking issue; cleanup warns users before removing worktrees and their sessions.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: grouping multi-run worktrees in the Worktrees tab.
Description check Passed The description clearly explains the feature, behavior, cleanup action, data flow, and validation results. It omits the template's Type of Change and Checklist sections, but the core required informat…
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.


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chriswritescode-dev
chriswritescode-dev merged commit 2d134d9 into main Oct 10, 2026
2 checks passed
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