feat(worktrees): fleet stats, best-of-N compare, overlap warnings, create-from-anything (W4-W8)#41
Merged
Merged
Conversation
…rktreeinclude copy, archive auto-prune Engine half of the W4-W8 worktrees pass (docs/improvements.md): - add_worktree grows start_point + track (worktree add [--track] -b <branch> <dest> [<start>]) so a task branch can cut from any branch/tag/commit - lock_worktree(reason) / unlock_worktree shell-outs - worktree_stats: one workdir walk (skip .git, no symlink-follow) for disk bytes + newest mtime, plus 'diff HEAD --shortstat' for +/- lines - .worktreeinclude honored: worktree_include_patterns + copy_worktree_include copy gitignored setup files (.env, local settings) into a fresh worktree via a small gitignore-subset matcher (anchoring, **, */?, trailing-/ and basename patterns) - archive_worktree_state now auto-prunes snapshots (newest 10 per slug, 60-day age cap) - five new IPC commands + start_point/track on repo_worktree_add +7 engine tests (matcher, shortstat parse, start point, include copy, stats, lock/unlock, auto-prune).
…create-from-anything UI half of the W4-W8 worktrees pass: - Overview rows show +/- lines, 'touched Nm ago' activity, and disk size (background per-row fetch so huge trees never delay badges); rows sort most-recently-touched first within their rank; agent-tool badges (.claude/worktrees/ paths, vk/ branches) - Best-of-N compare (v1): selection checkboxes (Space toggles the focused row), 'Compare (N)' opens WorktreeCompareDialog - one column per attempt diffed vs its own fork point, files touched by >=2 attempts highlighted, per-column Review / 'Pick winner...' handing off to Merge & clean up - Overlap warnings: pairwise dirty-file intersection badges rows and warns inside WorktreeMergeDialog - Create dialog: 'Start at' picker (branches / remote branches / tags / handed-in commit) with auto-track + fetch-first for remote bases and task-branch prefill; offers the .worktreeinclude setup-file copy when the file names something - 'New worktree from here...' in the sidebar local+remote branch menus and the commit graph context menu - Sidebar worktree menu: Review vs base (new store-shared reviewWorktree action), Merge & clean up..., Lock/Unlock - Palette: 'Clean up merged worktrees...' (switches to the overview and opens the confirm dialog via a strand:worktrees-cleanup event) and 'Prune stale worktrees' Verified end-to-end against the running app over WebView2 CDP (fixture family with overlapping dirty worktrees): stats/badges render, compare + pick-winner handoff, on-disk start-point + .env copy, lock/unlock round-trip, palette cleanup removes+archives and closes dead tabs.
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
The rest of the worktrees menu from
docs/improvements.md(W1-W3 shipped in #40):.worktreeincludehonored: on create, gitignored setup files (.env, local settings) matching its patterns copy from the source worktree into the fresh one (own gitignore-subset matcher; offered as a checked toggle only when the file names something). Agent-tool badges on overview rows.diff HEAD --shortstatfor +/- lines; rows sort most-recently-touched first within rank.add_worktreegrows start-point/track; the dialog gains a Start-at picker (branches / remote branches / tags / commit) with auto-track + fetch-first; "New worktree from here..." in branch + commit context menus;worktree lock/unlockengine + IPC + sidebar menu.Test plan
cargo test -p strand-core- 109 passed (+7 new worktree tests: include matcher, shortstat parse, start point, include copy, stats, lock/unlock, archive auto-prune)cargo clippy -p strand-core -p strand-tauri -- -D warnings- cleanpnpm --filter ./ui exec tsc --noEmit- cleanvitest run- 200 passed.envcopy, lock/unlock round-trip viagit worktree list, palette cleanup removes + archives + closes dead tabs.🤖 Generated with Claude Code