Skip to content

The open-source app everyone uses to manage agents at work

Fix trash button on repo when workspace has no local folder

Dotta1309cc449dfe
diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsx
index 0901951492..0142961ac3 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) },