Skip to content

feat(worktrees): W8 leftovers — move/repair engine ops + rail/tab menu actions#43

Merged
danielss-dev merged 3 commits into
mainfrom
feat/worktree-w8-leftovers
Jul 7, 2026
Merged

feat(worktrees): W8 leftovers — move/repair engine ops + rail/tab menu actions#43
danielss-dev merged 3 commits into
mainfrom
feat/worktree-w8-leftovers

Conversation

@danielss-dev

Copy link
Copy Markdown
Owner

Summary

  • Engine: Repo::move_worktree (git worktree move [--force], registry-aware) and Repo::repair_worktrees (git worktree repair [<path>…] — relinks manually-moved worktrees, or the worktree→repo side after the repo moved). Dash-guarded; exposed as repo_worktree_move / repo_worktree_repair IPC + tauri.ts wrappers. No UI surface yet, by design.
  • UI: Review vs base and Merge & clean up… join the repo-rail tile and tab-strip pill context menus for worktree tabs, matching the sidebar and overview. App owns the handlers + a WorktreeMergeDialog instance; a cross-family invocation first re-anchors the active tab to a family member (preferring the main checkout so cleanup stays available).
  • Closes the ☐ W8 leftovers line in TASKS.md.

Test plan

  • cargo test -p strand-core — 113 passing (+2: move round-trip; manual-rename → prunable → repair relinks) — and cargo clippy clean
  • tsc --noEmit, vitest (200), vite build all clean
  • Live WebView2-CDP pass against the running app (scratch repo + feat-cart worktree): both items on both surfaces; Review vs base pinned the baseline at the fork commit and toasted Reviewing feat-cart vs main; the merge dialog opened from both surfaces with main (detected base), cleanup checked, and the dirty-file warning; cross-family invocation re-anchored to the family main before opening.

🤖 Generated with Claude Code

Repo::move_worktree (git worktree move [--force]) and
Repo::repair_worktrees (git worktree repair [<path>...]) close the W8
engine leftovers: a registry-aware directory move, and relinking after a
manual rename or a moved repo. Both dash-guarded, exposed as
repo_worktree_move / repo_worktree_repair IPC with tauri.ts wrappers.
No UI surface yet, by design. Std-only tests cover the move round-trip
and the manual-rename -> prunable -> repair flow.
Right-clicking a worktree tile in the repo rail or a pill in the tab
strip now offers the same review/merge pair as the sidebar and overview.
App owns the handlers and a WorktreeMergeDialog instance: review reuses
the store's reviewWorktree flow; merge resolves the registry entry
relative to the active tab and, when the target belongs to another
family, first focuses a family member - preferring the main checkout so
cleanup (which can't remove the current worktree) stays available. Path
matching goes through pathKey.

Verified over WebView2 CDP against the running app: both items on both
surfaces, baseline pinned at the fork commit, merge dialog with detected
base + cleanup + dirty-file warning, and the cross-family invocation
re-anchoring to the family main.
@danielss-dev danielss-dev merged commit 1870275 into main Jul 7, 2026
2 checks passed
@danielss-dev danielss-dev deleted the feat/worktree-w8-leftovers branch July 7, 2026 23:19
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