@devries-cameron20 / t3code-1 / commits / 293f7b1507
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Guard orphaned worktree deletion behind project context

- Require both orphaned worktree path and thread project before prompting delete - Prevents delete confirmation when project metadata is unavailable

Julius Marminge committed Feb 12, 2026 at 22:53 UTC 293f7b1507b694e10abd9030fa3dccf3635ab3c0
1 file changed +2 -1
apps/web/src/components/Sidebar.tsx
+2 -1
@@ -268,8 +268,9 @@ export default function Sidebar() {
268 const displayWorktreePath = orphanedWorktreePath
269 ? formatWorktreePathForDisplay(orphanedWorktreePath)
270 : null;
271 + const canDeleteWorktree = orphanedWorktreePath !== null && threadProject !== undefined;
272 const shouldDeleteWorktree =
272 - orphanedWorktreePath !== null &&
273 + canDeleteWorktree &&
274 (await api.dialogs.confirm(
275 [
276 "This thread is the only one linked to this worktree:",