feat: support linked nested repos in pane workspaces#90
Conversation
|
Yes — this is different from creating a child worktree.
This PR is about letting a single pane workspace manage
Example use case:
With this PR, when creating a pane for a task, dmux can carry So this is not “another child worktree” feature — it is I’ll update the PR description and add screenshots to make |
Projects can contain child repos under the root repo. This adds pane-level support for selecting those child repos and carrying them through the same worktree lifecycle as the root repo, so create, reopen, resume, bootstrap, and cleanup keep the pane's related repos together. Constraint: Preserve existing root-only behavior and keep child repo paths project-scoped and relative Rejected: Treating child repos as separate panes | one task should keep root and child repo changes in the same pane lifecycle Confidence: high Scope-risk: moderate Directive: Keep root and nested child repo lifecycle behavior aligned when changing pane creation, reopen/resume, bootstrap, or cleanup Tested: pnpm run typecheck; pnpm vitest run __tests__/linkedRepoConfig.test.ts __tests__/worktreeMetadata.test.ts __tests__/reopenWorktree.test.ts __tests__/resumeBranches.test.ts __tests__/worktreeCleanupService.test.ts __tests__/integration/paneLifecycle.test.ts; pnpm vitest run
Constraint: Avoid confusion with the existing Create Child Worktree feature Rejected: Keep 'child repos' wording | Too easy to confuse with child worktrees Confidence: high Scope-risk: narrow Directive: Prefer 'linked nested repos' in user-facing copy for pane-scoped multi-repo workspaces Tested: pnpm vitest run __tests__/popupManager.newPanePopup.test.ts __tests__/integration/paneLifecycle.test.ts __tests__/reopenWorktree.test.ts __tests__/paneRestore.test.ts Not-tested: Full manual UI review on all locales
Constraint: The popup settings refresh test must not depend on ambient git-options defaults from a developer machine Rejected: Assert a hardcoded git-options flag value | The test only needs to verify refreshed goal-mode settings Confidence: high Scope-risk: narrow Directive: Keep popup argument assertions focused on the behavior under test when unrelated defaults can vary Tested: pnpm vitest run __tests__/popupManager.newPanePopup.test.ts __tests__/integration/paneLifecycle.test.ts __tests__/reopenWorktree.test.ts __tests__/paneRestore.test.ts __tests__/linkedRepoConfig.test.ts __tests__/worktreeMetadata.test.ts __tests__/resumeBranches.test.ts; pnpm run typecheck Not-tested: Full test suite
b650587 to
dc09f77
Compare
|
I refreshed this branch on top of the current Also, I renamed the user-facing terminology from This PR is about allowing a single pane workspace to I also validated the linked repo flow with targeted |
Constraint: Root merge validation must treat linked nested repos as independent repos while still surfacing real root-repo changes Rejected: Force users to commit or ignore nested repo dirs manually | contradicts linked nested repo lifecycle support and keeps merge UX broken Confidence: high Scope-risk: narrow Directive: Keep root merge status filtering aligned with worktree metadata and dmux-managed agent state scaffolding Tested: pnpm run typecheck; pnpm exec vitest run __tests__/mergeValidation.test.ts __tests__/actions/createPullRequestAction.test.ts __tests__/linkedRepoConfig.test.ts __tests__/integration/paneLifecycle.test.ts __tests__/reopenWorktree.test.ts __tests__/paneRestore.test.ts __tests__/resumeBranches.test.ts Not-tested: Full interactive tmux merge flow after rebuilding dist in a live dmux session
Constraint: Root worktree checkout can create empty gitlink placeholder directories before child repo worktrees attach Rejected: Failing on any pre-existing directory | blocks valid linked repo bootstrap for gitlink layouts Confidence: high Scope-risk: narrow Directive: Keep linked child repo attach strict for non-empty directories while allowing safe empty placeholder replacement Tested: user-reported full test; pnpm run typecheck; pnpm exec vitest run __tests__/linkedWorktrees.test.ts __tests__/reopenWorktree.test.ts __tests__/resumeBranches.test.ts Co-authored-by: OmX <omx@oh-my-codex.dev>



Summary
This PR adds support for linked nested repositories
inside a pane workspace.
Previously, dmux only managed the root repository for
a pane worktree. With this change, a pane can also
carry selected project-relative nested git
repositories through the same lifecycle as the root
repo, so create, reopen, resume, bootstrap, and
cleanup stay aligned.
This is different from
Create Child Worktree: thatfeature creates a new pane/worktree from an existing
pane branch, while this PR lets a single pane
workspace manage multiple related repositories
together.
What changed
lifecycle integration
Testing
pnpm run typecheck