From b0b732fe8a982d2b59203d4e78591bb79c434b11 Mon Sep 17 00:00:00 2001 From: Harshit Singh Bhandari Date: Fri, 12 Jun 2026 18:28:47 +0530 Subject: [PATCH] fix(sidebar): remove Add a worker agent button near project name (#202) Closes #201. Co-authored-by: Claude Sonnet 4.6 --- frontend/src/renderer/components/Sidebar.tsx | 30 +------------------- frontend/src/renderer/routes/_shell.tsx | 1 - 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/frontend/src/renderer/components/Sidebar.tsx b/frontend/src/renderer/components/Sidebar.tsx index 45c645f44..8760f8eef 100644 --- a/frontend/src/renderer/components/Sidebar.tsx +++ b/frontend/src/renderer/components/Sidebar.tsx @@ -28,7 +28,6 @@ import { SidebarGroupLabel, SidebarHeader, SidebarMenu, - SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, @@ -53,7 +52,6 @@ type SidebarProps = { workspaceError?: string; workspaces: WorkspaceSummary[]; onCreateProject: (input: { path: string }) => Promise; - onNewWorker: (projectId: string) => void; }; // Selection state comes from the URL: which project/session is active is the @@ -95,7 +93,7 @@ function SessionDot({ session }: { session: WorkspaceSession }) { // _shell owns open state (synced to the ui-store) and `collapsible="icon"` // replaces the old hand-rolled CollapsedRail — the same tree restyles itself // via group-data-[collapsible=icon] into the 48px letter rail. -export function Sidebar({ daemonStatus, workspaceError, workspaces, onCreateProject, onNewWorker }: SidebarProps) { +export function Sidebar({ daemonStatus, workspaceError, workspaces, onCreateProject }: SidebarProps) { const selection = useSelection(); const eventsConnection = useEventsConnection(); const { state } = useSidebar(); @@ -202,7 +200,6 @@ export function Sidebar({ daemonStatus, workspaceError, workspaces, onCreateProj expanded={!collapsedIds.has(workspace.id)} selection={selection} onToggle={() => toggleCollapsed(workspace.id)} - onNewWorker={() => onNewWorker(workspace.id)} /> ))} @@ -305,13 +302,11 @@ function ProjectItem({ expanded, selection, onToggle, - onNewWorker, }: { workspace: WorkspaceSummary; expanded: boolean; selection: Selection; onToggle: () => void; - onNewWorker: () => void; }) { const projectActive = selection.activeProjectId === workspace.id && !selection.activeSessionId; // Live workers only: merged/terminated sessions leave the sidebar and stay @@ -342,9 +337,6 @@ function ProjectItem({ "h-auto gap-[9px] rounded-[5px] px-1.5 py-[7px] text-[13px] font-medium text-muted-foreground transition-[padding]", "hover:bg-interactive-hover hover:text-muted-foreground active:bg-interactive-hover active:text-muted-foreground", "data-[active=true]:bg-interactive-active data-[active=true]:font-semibold data-[active=true]:text-foreground", - // The count badge sits in-flow (verbatim layout), so undo the - // variant's blanket action padding; hover makes room for the + only. - "group-has-data-[sidebar=menu-action]/menu-item:pr-1.5 group-hover/menu-item:pr-[34px]", // Icon rail: the old 36px letter tile. "group-data-[collapsible=icon]:size-9! group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:rounded-lg group-data-[collapsible=icon]:p-0! group-data-[collapsible=icon]:font-semibold", )} @@ -363,26 +355,6 @@ function ProjectItem({ {sessions.length} - {/* project-sidebar__proj-actions — reveal over the count slot on hover */} - - - - - - New worker in {workspace.name} - - {/* project-sidebar__sessions. Divergence from AO (user decision 2026-06-12): no left indent or tree guide line — every sidebar row (project or worker) spans the same full width. */} diff --git a/frontend/src/renderer/routes/_shell.tsx b/frontend/src/renderer/routes/_shell.tsx index 343cfd23f..ba911ba14 100644 --- a/frontend/src/renderer/routes/_shell.tsx +++ b/frontend/src/renderer/routes/_shell.tsx @@ -174,7 +174,6 @@ function ShellLayout() {