authorgravatar for donaldsilveira@gmail.comDonald Silveira <donaldsilveira@gmail.com> 2026-03-12 15:48:23-03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-12 11:48:23-07:00
logab0002f99d6fb5555c57bc91f696e6a9f8f4dfd7
treee88cc88785ba18ee8bf990acad27ca39cc955dd1
parentf63cda22fa6e9b98de1caec057960dce28248d37
signature Signed by PGP key B5690EEEBB952194

update project removal copy (#981)


1 files changed, 5 insertions(+), 7 deletions(-)

apps/web/src/components/Sidebar.tsx+5-7
...@@ -895,7 +895,7 @@ export default function Sidebar() {...@@ -895,7 +895,7 @@ export default function Sidebar() {
895 const api = readNativeApi();895 const api = readNativeApi();
896 if (!api) return;896 if (!api) return;
897 const clicked = await api.contextMenu.show(897 const clicked = await api.contextMenu.show(
898 [{ id: "delete", label: "Delete", destructive: true }],898 [{ id: "delete", label: "Remove project", destructive: true }],
899 position,899 position,
900 );900 );
901 if (clicked !== "delete") return;901 if (clicked !== "delete") return;
...@@ -908,14 +908,12 @@ export default function Sidebar() {...@@ -908,14 +908,12 @@ export default function Sidebar() {
908 toastManager.add({908 toastManager.add({
909 type: "warning",909 type: "warning",
910 title: "Project is not empty",910 title: "Project is not empty",
911 description: "Delete all threads in this project before deleting it.",911 description: "Delete all threads in this project before removing it.",
912 });912 });
913 return;913 return;
914 }914 }
915915
916 const confirmed = await api.dialogs.confirm(916 const confirmed = await api.dialogs.confirm(`Remove project "${project.name}"?`);
917 [`Delete project "${project.name}"?`, "This action cannot be undone."].join("\n"),
918 );
919 if (!confirmed) return;917 if (!confirmed) return;
920918
921 try {919 try {
...@@ -930,11 +928,11 @@ export default function Sidebar() {...@@ -930,11 +928,11 @@ export default function Sidebar() {
930 projectId,928 projectId,
931 });929 });
932 } catch (error) {930 } catch (error) {
933 const message = error instanceof Error ? error.message : "Unknown error deleting project.";931 const message = error instanceof Error ? error.message : "Unknown error removing project.";
934 console.error("Failed to remove project", { projectId, error });932 console.error("Failed to remove project", { projectId, error });
935 toastManager.add({933 toastManager.add({
936 type: "error",934 type: "error",
937 title: `Failed to delete "${project.name}"`,935 title: `Failed to remove "${project.name}"`,
938 description: message,936 description: message,
939 });937 });
940 }938 }