authorgravatar for 39161142+FllipEis@users.noreply.github.comFllip <39161142+FllipEis@users.noreply.github.com> 2026-03-28 19:56:46+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-28 18:56:46+00:00
logce463a5360ab4a2426d9744d830266d3ef7f4410
treeecf1ccce7512d75913755615021767bd5d589513
parent52fa6a733342a2e5c5d421e90c8f31755fb76395
signature Signed by PGP key B5690EEEBB952194

fix(web): add project path action to sidebar menu (#1436)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

1 files changed, 12 insertions(+), 4 deletions(-)

apps/web/src/components/Sidebar.tsx+12-4
......@@ -818,15 +818,22 @@ export default function Sidebar() {
818818 async (projectId: ProjectId, position: { x: number; y: number }) => {
819819 const api = readNativeApi();
820820 if (!api) return;
821 const project = projects.find((entry) => entry.id === projectId);
822 if (!project) return;
823
821824 const clicked = await api.contextMenu.show(
822 [{ id: "delete", label: "Remove project", destructive: true }],
825 [
826 { id: "copy-path", label: "Copy Project Path" },
827 { id: "delete", label: "Remove project", destructive: true },
828 ],
823829 position,
824830 );
831 if (clicked === "copy-path") {
832 copyPathToClipboard(project.cwd, { path: project.cwd });
833 return;
834 }
825835 if (clicked !== "delete") return;
826836
827 const project = projects.find((entry) => entry.id === projectId);
828 if (!project) return;
829
830837 const projectThreads = threads.filter((thread) => thread.projectId === projectId);
831838 if (projectThreads.length > 0) {
832839 toastManager.add({
......@@ -864,6 +871,7 @@ export default function Sidebar() {
864871 [
865872 clearComposerDraftForThread,
866873 clearProjectDraftThreadId,
874 copyPathToClipboard,
867875 getDraftThreadByProjectId,
868876 projects,
869877 threads,