authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-12 22:44:25-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-12 22:57:56-08:00
log8a4fed1bf2dcd4195e04c204af17f19a3e0c3a56
tree118362c37cd130c8f865d5a4d5994248fc284d8e
parent0068a93cfac7f799efed7b2501a17e0b52fbf18c

Guard worktree cleanup on missing project

Co-authored-by: codex <codex@users.noreply.github.com>

1 files changed, 2 insertions(+), 2 deletions(-)

apps/web/src/components/Sidebar.tsx+2-2
...@@ -298,13 +298,13 @@ export default function Sidebar() {...@@ -298,13 +298,13 @@ export default function Sidebar() {
298298
299 dispatch({ type: "DELETE_THREAD", threadId });299 dispatch({ type: "DELETE_THREAD", threadId });
300300
301 if (!shouldDeleteWorktree || !orphanedWorktreePath) {301 if (!shouldDeleteWorktree || !orphanedWorktreePath || !threadProject) {
302 return;302 return;
303 }303 }
304304
305 try {305 try {
306 await api.git.removeWorktree({306 await api.git.removeWorktree({
307 cwd: threadProject?.cwd ?? orphanedWorktreePath,307 cwd: threadProject.cwd,
308 path: orphanedWorktreePath,308 path: orphanedWorktreePath,
309 });309 });
310 } catch {310 } catch {