feat(worktrees): W8 leftovers — move/repair engine ops + rail/tab menu actions#43
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repo::move_worktree(git worktree move [--force], registry-aware) andRepo::repair_worktrees(git worktree repair [<path>…]— relinks manually-moved worktrees, or the worktree→repo side after the repo moved). Dash-guarded; exposed asrepo_worktree_move/repo_worktree_repairIPC +tauri.tswrappers. No UI surface yet, by design.WorktreeMergeDialoginstance; a cross-family invocation first re-anchors the active tab to a family member (preferring the main checkout so cleanup stays available).Test plan
cargo test -p strand-core— 113 passing (+2: move round-trip; manual-rename → prunable → repair relinks) — andcargo clippycleantsc --noEmit,vitest(200),vite buildall cleanfeat-cartworktree): both items on both surfaces; Review vs base pinned the baseline at the fork commit and toastedReviewing feat-cart vs main; the merge dialog opened from both surfaces withmain (detected base), cleanup checked, and the dirty-file warning; cross-family invocation re-anchored to the family main before opening.🤖 Generated with Claude Code