Skip to content

Prune merged worktrees after thread cleanup#335

Merged
BunsDev merged 5 commits into
mainfrom
okcode/cleanup-merged-worktrees
Apr 7, 2026
Merged

Prune merged worktrees after thread cleanup#335
BunsDev merged 5 commits into
mainfrom
okcode/cleanup-merged-worktrees

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Apr 7, 2026

Summary

  • Remove merged thread worktrees more aggressively by pruning Git worktree metadata after deletion.
  • Add server-side and client-side plumbing to surface merged worktree cleanup candidates and trigger explicit pruning.
  • Simplify several web UI paths around terminal, sidebar, and file navigation while keeping theme and link behavior stable.
  • Update tests around worktree cleanup and sidebar behavior to match the new flow.

Testing

  • Not run (per request).
  • Existing test coverage was updated in apps/server/src/git/Layers/GitManager.test.ts and apps/web/src/components/Sidebar.test.ts to reflect the new behavior.

- Add merged worktree candidate detection and prune support
- Auto-remove orphaned worktrees after merged thread cleanup
- Surface cleanup state through the web client and WS contract
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 7, 2026 4:38am
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 7, 2026 4:38am

- Add a command-palette entry to review merged worktrees
- Let users delete on-disk worktrees or prune stale Git records
- Wire the dialog into the chat route and auto-delete flow
- Use the active thread to choose the cleanup project
- Rename prune action for stale records
- Show an error toast when merged thread auto-delete fails
- Reflow worktree cleanup dialog strings and layout
- Reformat Git worktree prune call for consistency
- Ignore prune failures silently during worktree cleanup
- Add explicit git operation labels for merged-worktree cleanup calls
@BunsDev BunsDev merged commit 382ea19 into main Apr 7, 2026
7 checks passed
BunsDev added a commit that referenced this pull request Apr 7, 2026
* Clean up merged worktrees after thread deletion

- Add merged worktree candidate detection and prune support
- Auto-remove orphaned worktrees after merged thread cleanup
- Surface cleanup state through the web client and WS contract

* Add merged worktree cleanup dialog

- Add a command-palette entry to review merged worktrees
- Let users delete on-disk worktrees or prune stale Git records
- Wire the dialog into the chat route and auto-delete flow

* Improve merged worktree cleanup feedback

- Use the active thread to choose the cleanup project
- Rename prune action for stale records
- Show an error toast when merged thread auto-delete fails

* Format worktree cleanup and prune call

- Reflow worktree cleanup dialog strings and layout
- Reformat Git worktree prune call for consistency

* Simplify merged worktree cleanup handling

- Ignore prune failures silently during worktree cleanup
- Add explicit git operation labels for merged-worktree cleanup calls
BunsDev added a commit that referenced this pull request Apr 7, 2026
* Fix desktop build and runtime cleanup

- Harden screenshot image loading cleanup
- Simplify thread snapshot hydration and sidebar props
- Fix widget notification event typing and test rename

* Prune merged worktrees after thread cleanup (#335)

* Clean up merged worktrees after thread deletion

- Add merged worktree candidate detection and prune support
- Auto-remove orphaned worktrees after merged thread cleanup
- Surface cleanup state through the web client and WS contract

* Add merged worktree cleanup dialog

- Add a command-palette entry to review merged worktrees
- Let users delete on-disk worktrees or prune stale Git records
- Wire the dialog into the chat route and auto-delete flow

* Improve merged worktree cleanup feedback

- Use the active thread to choose the cleanup project
- Rename prune action for stale records
- Show an error toast when merged thread auto-delete fails

* Format worktree cleanup and prune call

- Reflow worktree cleanup dialog strings and layout
- Reformat Git worktree prune call for consistency

* Simplify merged worktree cleanup handling

- Ignore prune failures silently during worktree cleanup
- Add explicit git operation labels for merged-worktree cleanup calls
BunsDev added a commit that referenced this pull request Apr 7, 2026
* Fix desktop build and runtime cleanup

- Harden screenshot image loading cleanup
- Simplify thread snapshot hydration and sidebar props
- Fix widget notification event typing and test rename

* Prune merged worktrees after thread cleanup (#335)

* Clean up merged worktrees after thread deletion

- Add merged worktree candidate detection and prune support
- Auto-remove orphaned worktrees after merged thread cleanup
- Surface cleanup state through the web client and WS contract

* Add merged worktree cleanup dialog

- Add a command-palette entry to review merged worktrees
- Let users delete on-disk worktrees or prune stale Git records
- Wire the dialog into the chat route and auto-delete flow

* Improve merged worktree cleanup feedback

- Use the active thread to choose the cleanup project
- Rename prune action for stale records
- Show an error toast when merged thread auto-delete fails

* Format worktree cleanup and prune call

- Reflow worktree cleanup dialog strings and layout
- Reformat Git worktree prune call for consistency

* Simplify merged worktree cleanup handling

- Ignore prune failures silently during worktree cleanup
- Add explicit git operation labels for merged-worktree cleanup calls
BunsDev added a commit that referenced this pull request Apr 7, 2026
* Add stale worktree pruning to sidebar

- Add a sidebar entry to open worktree cleanup
- Show merged PR links and merge age in the dialog
- Add bulk prune for stale records and cover age formatting

* Fix desktop build and streamline thread UI (#334)

* Fix desktop build and runtime cleanup

- Harden screenshot image loading cleanup
- Simplify thread snapshot hydration and sidebar props
- Fix widget notification event typing and test rename

* Prune merged worktrees after thread cleanup (#335)

* Clean up merged worktrees after thread deletion

- Add merged worktree candidate detection and prune support
- Auto-remove orphaned worktrees after merged thread cleanup
- Surface cleanup state through the web client and WS contract

* Add merged worktree cleanup dialog

- Add a command-palette entry to review merged worktrees
- Let users delete on-disk worktrees or prune stale Git records
- Wire the dialog into the chat route and auto-delete flow

* Improve merged worktree cleanup feedback

- Use the active thread to choose the cleanup project
- Rename prune action for stale records
- Show an error toast when merged thread auto-delete fails

* Format worktree cleanup and prune call

- Reflow worktree cleanup dialog strings and layout
- Reformat Git worktree prune call for consistency

* Simplify merged worktree cleanup handling

- Ignore prune failures silently during worktree cleanup
- Add explicit git operation labels for merged-worktree cleanup calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant