Show worktree owner details and add confirmed deletion (#43942)

## What changed

- Display owner thread titles, relative update times, and archived or unavailable status in the managed worktree browser. Offer resume only for resumable owners, including those with compressed thread history.
- Add a delete action with a confirmation dialog that defaults to Cancel and preserves thread history.
- Restrict removal to managed worktrees in the current repository. Refuse the current checkout, including path aliases, and checkouts containing local changes, untracked files, or ignored files.

## Testing

Add browser snapshots and tests for owner states, deletion confirmation, and compressed thread history. Add worktree removal coverage for unrelated checkouts, current-directory aliases, untracked and ignored files, and successful removal of a clean checkout.

GitOrigin-RevId: e5867f1540d5d5bc8130acc76875e51e3d8b3b6a
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-09-08 23:37:26 +00:00
1 parent c53f342fec
commit 973dcd80fc
12 files changed
+611 -31

No files matched your search

+12
View File
@@ -460,6 +460,18 @@ pub(crate) enum AppEvent {
request: crate::worktree_browser::Request,
entry: crate::worktree_browser::Entry,
},
ConfirmManagedWorktreeRemoval {
request: crate::worktree_browser::Request,
root: PathBuf,
},
RemoveManagedWorktree {
request: crate::worktree_browser::Request,
root: PathBuf,
},
ManagedWorktreeRemoved {
root: PathBuf,
result: Result<(), String>,
},
/// Change the working directory of the originating idle primary thread.
ChangeWorkingDirectory {