From ce463a5360ab4a2426d9744d830266d3ef7f4410 Mon Sep 17 00:00:00 2001 From: Fllip <39161142+FllipEis@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:56:46 +0100 Subject: [PATCH] fix(web): add project path action to sidebar menu (#1436) Co-authored-by: Julius Marminge --- apps/web/src/components/Sidebar.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index af60ce7d2972fa138eacbb3d04d92ec4b5bf34a4..2d974be3eeac342414520450fbd404a800a357ec 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -818,15 +818,22 @@ export default function Sidebar() { async (projectId: ProjectId, position: { x: number; y: number }) => { const api = readNativeApi(); if (!api) return; - const clicked = await api.contextMenu.show( - [{ id: "delete", label: "Remove project", destructive: true }], - position, - ); - if (clicked !== "delete") return; - const project = projects.find((entry) => entry.id === projectId); if (!project) return; + const clicked = await api.contextMenu.show( + [ + { id: "copy-path", label: "Copy Project Path" }, + { id: "delete", label: "Remove project", destructive: true }, + ], + position, + ); + if (clicked === "copy-path") { + copyPathToClipboard(project.cwd, { path: project.cwd }); + return; + } + if (clicked !== "delete") return; + const projectThreads = threads.filter((thread) => thread.projectId === projectId); if (projectThreads.length > 0) { toastManager.add({ @@ -864,6 +871,7 @@ export default function Sidebar() { [ clearComposerDraftForThread, clearProjectDraftThreadId, + copyPathToClipboard, getDraftThreadByProjectId, projects, threads, -- 2.54.0