diff --git a/frontend/src/components/ui-new/actions/index.ts b/frontend/src/components/ui-new/actions/index.ts index 1749d17f..35d4baa7 100644 --- a/frontend/src/components/ui-new/actions/index.ts +++ b/frontend/src/components/ui-new/actions/index.ts @@ -965,7 +965,7 @@ export type NavbarItem = ActionDefinition | typeof NavbarDivider; // Navbar action groups define which actions appear in each section export const NavbarActionGroups = { - left: [Actions.OpenInOldUI] as ActionDefinition[], + left: [Actions.ArchiveWorkspace, Actions.OpenInOldUI] as ActionDefinition[], right: [ Actions.ToggleDiffViewMode, Actions.ToggleAllDiffs, diff --git a/frontend/src/components/ui-new/containers/WorkspacesSidebarContainer.tsx b/frontend/src/components/ui-new/containers/WorkspacesSidebarContainer.tsx index 6fa19aa0..eda058a5 100644 --- a/frontend/src/components/ui-new/containers/WorkspacesSidebarContainer.tsx +++ b/frontend/src/components/ui-new/containers/WorkspacesSidebarContainer.tsx @@ -1,6 +1,5 @@ -import { useState, useCallback, useMemo } from 'react'; +import { useState, useMemo } from 'react'; import { useWorkspaceContext } from '@/contexts/WorkspaceContext'; -import { useActions } from '@/contexts/ActionsContext'; import { useScratch } from '@/hooks/useScratch'; import { ScratchType, type DraftWorkspaceData } from 'shared/types'; import { splitMessageToTitleDescription } from '@/utils/string'; @@ -9,7 +8,6 @@ import { usePersistedExpanded, } from '@/stores/useUiPreferencesStore'; import { WorkspacesSidebar } from '@/components/ui-new/views/WorkspacesSidebar'; -import { Actions } from '@/components/ui-new/actions'; // Fixed UUID for the universal workspace draft (same as in useCreateModeState.ts) const DRAFT_WORKSPACE_ID = '00000000-0000-0000-0000-000000000001'; @@ -50,23 +48,6 @@ export function WorkspacesSidebarContainer() { return title || 'New Workspace'; }, [draftScratch]); - // Action handlers for sidebar workspace actions - const { executeAction } = useActions(); - - const handleArchiveWorkspace = useCallback( - (workspaceId: string) => { - executeAction(Actions.ArchiveWorkspace, workspaceId); - }, - [executeAction] - ); - - const handlePinWorkspace = useCallback( - (workspaceId: string) => { - executeAction(Actions.PinWorkspace, workspaceId); - }, - [executeAction] - ); - return ( void; - onArchive?: () => void; - onPin?: () => void; className?: string; summary?: boolean; /** Whether this is a draft workspace (shows "Draft" instead of elapsed time) */ @@ -55,8 +52,6 @@ export function WorkspaceSummary({ latestProcessStatus, prStatus, onClick, - onArchive, - onPin, className, summary = false, isDraft = false, @@ -74,16 +69,6 @@ export function WorkspaceSummary({ }); }; - const handleArchive = (e: React.MouseEvent) => { - e.stopPropagation(); - onArchive?.(); - }; - - const handlePin = (e: React.MouseEvent) => { - e.stopPropagation(); - onPin?.(); - }; - return (
-
+
{name}
{(!summary || isActive) && ( @@ -204,53 +200,21 @@ export function WorkspaceSummary({ )} - {/* Right-side hover zone for action overlay */} + {/* Right-side hover action - more options only */} {workspaceId && ( -
- {/* Sliding action overlay - only appears when hovering this zone */} -
- {/* Gradient fade from transparent to pill background */} -
- {/* Action pill */} -
- - - -
+
+ {/* Gradient fade from transparent to background */} +
+ {/* Single action button */} +
+
)} diff --git a/frontend/src/components/ui-new/views/WorkspacesSidebar.tsx b/frontend/src/components/ui-new/views/WorkspacesSidebar.tsx index 3dcb11c8..ef6a5264 100644 --- a/frontend/src/components/ui-new/views/WorkspacesSidebar.tsx +++ b/frontend/src/components/ui-new/views/WorkspacesSidebar.tsx @@ -11,8 +11,6 @@ interface WorkspacesSidebarProps { selectedWorkspaceId: string | null; onSelectWorkspace: (id: string) => void; onAddWorkspace?: () => void; - onArchiveWorkspace?: (id: string) => void; - onPinWorkspace?: (id: string) => void; searchQuery: string; onSearchChange: (value: string) => void; /** Whether we're in create mode */ @@ -33,8 +31,6 @@ export function WorkspacesSidebar({ selectedWorkspaceId, onSelectWorkspace, onAddWorkspace, - onArchiveWorkspace, - onPinWorkspace, searchQuery, onSearchChange, isCreateMode = false, @@ -107,8 +103,6 @@ export function WorkspacesSidebar({ latestProcessStatus={workspace.latestProcessStatus} prStatus={workspace.prStatus} onClick={() => onSelectWorkspace(workspace.id)} - onArchive={() => onArchiveWorkspace?.(workspace.id)} - onPin={() => onPinWorkspace?.(workspace.id)} /> )) )} @@ -145,8 +139,6 @@ export function WorkspacesSidebar({ latestProcessStatus={workspace.latestProcessStatus} prStatus={workspace.prStatus} onClick={() => onSelectWorkspace(workspace.id)} - onArchive={() => onArchiveWorkspace?.(workspace.id)} - onPin={() => onPinWorkspace?.(workspace.id)} /> ))}