Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Guard worktree cleanup on missing project

Julius Marminge8a4fed1bf2dc
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index 82b348936..349034fdc 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -298,13 +298,13 @@ export default function Sidebar() {
dispatch({ type: "DELETE_THREAD", threadId });
- if (!shouldDeleteWorktree || !orphanedWorktreePath) {
+ if (!shouldDeleteWorktree || !orphanedWorktreePath || !threadProject) {
return;
}
try {
await api.git.removeWorktree({
- cwd: threadProject?.cwd ?? orphanedWorktreePath,
+ cwd: threadProject.cwd,
path: orphanedWorktreePath,
});
} catch {