From 1309cc449dfe5c3790a808044121d7c2458ac3a1 Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 16 Mar 2026 19:38:46 -0500 Subject: [PATCH] Fix trash button on repo when workspace has no local folder clearRepoWorkspace was calling updateWorkspace to null out the repo even when there was no local folder, leaving an empty workspace. Now falls through to persistCodebase which correctly removes the entire workspace when both cwd and repoUrl would be null. Co-Authored-By: Paperclip Co-Authored-By: Claude Opus 4.6 --- ui/src/components/ProjectProperties.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsx index 09019514..0142961a 100644 --- a/ui/src/components/ProjectProperties.tsx +++ b/ui/src/components/ProjectProperties.tsx @@ -377,7 +377,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa : "Delete this workspace repo?", ); if (!confirmed) return; - if (primaryCodebaseWorkspace) { + if (primaryCodebaseWorkspace && hasLocalFolder) { updateWorkspace.mutate({ workspaceId: primaryCodebaseWorkspace.id, data: { repoUrl: null, repoRef: null, defaultRef: null, sourceType: deriveSourceType(codebase.localFolder, null) },