From d7b9431f9089aa607fc4028a89390f3c09771860 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 4 Apr 2026 21:10:53 +0200 Subject: [PATCH] Fix session close not deleting worktree branch When closing a worktree session with "Close & Delete Worktree", only the worktree directory was removed but the git branch was left behind. Now also deletes the associated branch after removing the worktree. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/renderer/src/App.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 5355041..fa061f1 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -181,6 +181,10 @@ function App(): React.JSX.Element { if (deleteWorktree && repoRoot) { try { await window.konductorAPI.removeWorktree(repoRoot, sessionCwd) + const branch = sessionCwd.split('/').pop() + if (branch) { + await window.konductorAPI.deleteBranch(repoRoot, branch, true) + } } catch (e) { console.error('Failed to remove worktree:', e) }