Skip to content

fix(worktrees): scope base branches to multi-root repositories - #757

Merged
im-ian merged 1 commit into
mainfrom
fix/multiroot-worktree-base-branches
Aug 6, 2026
Merged

fix(worktrees): scope base branches to multi-root repositories#757
im-ian merged 1 commit into
mainfrom
fix/multiroot-worktree-base-branches

Conversation

@im-ian

@im-ian im-ian commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

This fixes multi-root project worktree creation so each repository root uses its own configured base branch.

  1. Repository-aware settings — Load and preserve project settings for every root while keeping general and pull-request settings attached to the current repository.
  2. Explicit root selection — Add a searchable repository-root selector to the Worktrees tab and load branch choices for the selected root.
  3. Safe per-root persistence — Save only changed source-root settings, preserving unrelated settings fields and the primary root base branch.
  4. Regression coverage — Verify distinct branch lists and base-branch updates across primary and source repositories.

Expected impact

Area Before After
Multi-root worktree creation Source roots could inherit the primary repository base branch Each repository root uses its own base branch
Project settings UI The affected repository was implicit The target repository root is explicit and searchable
Existing settings Updating another root risked conflating settings General and pull-request settings remain preserved per root

Design notes

  • Base branches remain stored in the existing per-repository settings records because valid refs can differ between roots.
  • The selector displays the full repository path so roots with identical directory names remain distinguishable.
  • Branch requests are cancelled logically when the selected root changes, preventing stale responses from replacing the current list.

Test plan

  • pnpm run typecheck — passed
  • pnpm run test — 1,290 tests passed
  • pnpm exec playwright test tests/e2e/project-settings.spec.ts — 10 tests passed
  • pnpm run test:e2e — 318 tests passed
  • pnpm run build — passed
  • git diff --check — passed

Notes

  • The existing Vite chunk-size warning remains and is addressed separately from this behavior fix.

@im-ian im-ian added the fix Bug fix label Aug 6, 2026
@jtf-ian

jtf-ian commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Merge readiness note: this PR is technically mergeable now.

  • GitHub reports MERGEABLE / CLEAN.
  • CI is green: Frontend, E2E (shard 1/2), and E2E (shard 2/2) passed.
  • Self-review is complete with no blocking findings.
  • fix label is applied.

Proceeding to merge because the user explicitly requested the reviewed release fixes to be merged.

@im-ian
im-ian merged commit be82bb5 into main Aug 6, 2026
3 checks passed
@im-ian
im-ian deleted the fix/multiroot-worktree-base-branches branch August 6, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants