Repository navigation
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
The success flash can report that the branch was kept when removal actually deleted it. worktree_removal_keeps_branch predicts retention before the background operation, but an approved pre-remove hook can integrate the branch before remove_removed_worktree_silently captures fresh refs and delete_branch_if_safe decides its fate. The worktree path is then gone, so this else arm shows “kept branch” while the morphed / branch row points to a missing branch. Please base the confirmation and final row state on the observed branch fate after removal.
worktrunk-bot
left a comment
There was a problem hiding this comment.
The branch-deleted path needs the same settled preview refresh as the normal row-drop path. When this was the last selected row, the picker can keep showing the removed branch's preview after the row disappears.
Co-authored-by: Worktrunk Bot <w@worktrunk.dev>
worktrunk-bot
left a comment
There was a problem hiding this comment.
CI's lint check fails because cargo fmt rewrites the new test assignment.
Co-authored-by: Worktrunk Bot <w@worktrunk.dev>
Fixes #4636
When using
alt-xto remove a worktree but keep its unmerged branch, the picker optimistically morphs the row. Previously, if the background removal succeeded, it didn't provide any visual feedback to confirm the action (unlike the failure paths).This updates the background thread to flash a transient success message (
Removed <branch> worktree; kept branch) in the header once it confirms the worktree directory is actually gone.Also updated
test_apply_morphs_unmerged_worktree_to_branch_rowto wait for and assert this new header flash.