Skip to content

Replace auto-archive toggle with merged worktree action picker#209

Merged
sbertix merged 2 commits intomainfrom
sbertix/delete-on-merge
Apr 2, 2026
Merged

Replace auto-archive toggle with merged worktree action picker#209
sbertix merged 2 commits intomainfrom
sbertix/delete-on-merge

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented Apr 2, 2026

Summary

  • Replaces the automaticallyArchiveMergedWorktrees boolean with a new MergedWorktreeAction? enum (.archive, .delete, nil = do nothing)
  • Adds a settings Picker with contextual help text and a red warning when delete + delete-branch are both enabled
  • Includes backward-compatible migration from the legacy boolean key

Test plan

  • Existing auto-archive tests updated and passing
  • New tests: auto-delete on merge, nil action does nothing, skip for archived/deleting/delete-script worktrees, skip when already merged
  • Legacy migration tests: true.archive, falsenil
  • Encoding round-trip test for .delete
  • Build passes (make build-app)

Closes #208

Refactor `automaticallyArchiveMergedWorktrees: Bool` into
`mergedWorktreeAction: MergedWorktreeAction?` supporting archive,
delete, or do-nothing when a PR is merged. Includes legacy migration,
UI picker with contextual warnings, and comprehensive tests.
@sbertix sbertix requested a review from khoi April 2, 2026 13:20
@sbertix sbertix merged commit 5c1c97b into main Apr 2, 2026
1 check passed
@sbertix sbertix deleted the sbertix/delete-on-merge branch April 2, 2026 14:40
@bouk
Copy link
Copy Markdown
Contributor

bouk commented Apr 2, 2026

amazing, thanks a lot

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.

Worktrees don't get deleted on disk

2 participants