From 0790133072f66e135b79c4ff9036a504c2f4cdd9 Mon Sep 17 00:00:00 2001 From: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Date: Mon, 27 Jul 2026 13:03:21 -0700 Subject: [PATCH] fix: agent projects reached the project-actions dialog via the scope menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Appending agent groups to `projectGroups` put them in the sidebar's scope filter menu — correct, they are a real place to scope to — but every row there carries the ⋯ actions button, and the dialog behind it treats its target as a user-managed workspace: rename, grouping overrides, Copy path (of the synthetic directory), and Remove, which would delete the synthetic project backing the agent along with its Home thread history. The whole synthetic-project design says agents are not user-managed there; the button is now hidden for them. The same menu also missed the agent mark: the scope trigger and its menu items were the only two `ProjectFavicon` call sites not passing `agentDriverKind`, so an agent showed a folder there while showing its mark everywhere else — the exact inconsistency centralizing the branch in `ProjectFavicon` was meant to prevent. Both now resolve through `resolveAgentProjectDriverKind` like every other site. Co-Authored-By: Claude Fable 5 --- apps/web/src/components/SidebarV2.tsx | 41 +++++++++++++++++++-------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/SidebarV2.tsx b/apps/web/src/components/SidebarV2.tsx index 28bb01f915..b3863e5d04 100644 --- a/apps/web/src/components/SidebarV2.tsx +++ b/apps/web/src/components/SidebarV2.tsx @@ -77,6 +77,7 @@ import { } from "../logicalProject"; import { buildSidebarProjectSnapshots, + isAgentProject, resolveAgentProjectDriverKind, type SidebarProjectGroupMember, type SidebarProjectSnapshot, @@ -2351,6 +2352,11 @@ export default function SidebarV2() { environmentId={scopedProjectGroup.environmentId} cwd={scopedProjectGroup.workspaceRoot} className="size-4 shrink-0" + agentDriverKind={resolveAgentProjectDriverKind( + scopedProjectGroup, + providerEntryByInstanceId, + )} + agentDisplayName={scopedProjectGroup.displayName} /> ) : ( @@ -2388,20 +2394,31 @@ export default function SidebarV2() { environmentId={project.environmentId} cwd={project.workspaceRoot} className="size-4 shrink-0" + agentDriverKind={resolveAgentProjectDriverKind( + project, + providerEntryByInstanceId, + )} + agentDisplayName={project.displayName} /> {project.displayName} - + {/* No actions for an agent's synthetic project: the + dialog offers rename/regroup/Remove, all of which + treat it as a user-managed workspace — Remove + would delete the agent's Home thread history. */} + {isAgentProject(project) ? null : ( + + )} ); })}