Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ export default function Sidebar() {
const api = readNativeApi();
if (!api) return;
const clicked = await api.contextMenu.show(
[{ id: "delete", label: "Delete", destructive: true }],
[{ id: "delete", label: "Remove project", destructive: true }],
position,
);
if (clicked !== "delete") return;
Expand All @@ -908,14 +908,12 @@ export default function Sidebar() {
toastManager.add({
type: "warning",
title: "Project is not empty",
description: "Delete all threads in this project before deleting it.",
description: "Delete all threads in this project before removing it.",
});
return;
}

const confirmed = await api.dialogs.confirm(
[`Delete project "${project.name}"?`, "This action cannot be undone."].join("\n"),
);
const confirmed = await api.dialogs.confirm(`Remove project "${project.name}"?`);
if (!confirmed) return;

try {
Expand All @@ -930,11 +928,11 @@ export default function Sidebar() {
projectId,
});
} catch (error) {
const message = error instanceof Error ? error.message : "Unknown error deleting project.";
const message = error instanceof Error ? error.message : "Unknown error removing project.";
console.error("Failed to remove project", { projectId, error });
toastManager.add({
type: "error",
title: `Failed to delete "${project.name}"`,
title: `Failed to remove "${project.name}"`,
description: message,
});
}
Expand Down
Loading