diff --git a/apps/ui/src/components/layout/index.ts b/apps/ui/src/components/layout/index.ts
index d702d78d..bfed6246 100644
--- a/apps/ui/src/components/layout/index.ts
+++ b/apps/ui/src/components/layout/index.ts
@@ -1,2 +1 @@
export { Sidebar } from './sidebar';
-export { UnifiedSidebar } from './unified-sidebar';
diff --git a/apps/ui/src/components/layout/sidebar.tsx b/apps/ui/src/components/layout/sidebar.tsx
deleted file mode 100644
index 05ff1328..00000000
--- a/apps/ui/src/components/layout/sidebar.tsx
+++ /dev/null
@@ -1,397 +0,0 @@
-import { useState, useCallback } from 'react';
-import { createLogger } from '@automaker/utils/logger';
-import { useNavigate, useLocation } from '@tanstack/react-router';
-
-const logger = createLogger('Sidebar');
-import { cn } from '@/lib/utils';
-import { useAppStore } from '@/store/app-store';
-import { useNotificationsStore } from '@/store/notifications-store';
-import { useKeyboardShortcuts, useKeyboardShortcutsConfig } from '@/hooks/use-keyboard-shortcuts';
-import { getElectronAPI } from '@/lib/electron';
-import { initializeProject, hasAppSpec, hasAutomakerDir } from '@/lib/project-init';
-import { toast } from 'sonner';
-import { DeleteProjectDialog } from '@/components/views/settings-view/components/delete-project-dialog';
-import { NewProjectModal } from '@/components/dialogs/new-project-modal';
-import { CreateSpecDialog } from '@/components/views/spec-view/dialogs';
-
-// Local imports from subfolder
-import {
- CollapseToggleButton,
- SidebarHeader,
- SidebarNavigation,
- SidebarFooter,
- MobileSidebarToggle,
-} from './sidebar/components';
-import { useIsCompact } from '@/hooks/use-media-query';
-import { PanelLeftClose } from 'lucide-react';
-import { TrashDialog, OnboardingDialog } from './sidebar/dialogs';
-import { SIDEBAR_FEATURE_FLAGS } from './sidebar/constants';
-import {
- useSidebarAutoCollapse,
- useRunningAgents,
- useSpecRegeneration,
- useNavigation,
- useProjectCreation,
- useSetupDialog,
- useTrashOperations,
- useUnviewedValidations,
-} from './sidebar/hooks';
-
-export function Sidebar() {
- const navigate = useNavigate();
- const location = useLocation();
-
- const {
- projects,
- trashedProjects,
- currentProject,
- sidebarOpen,
- mobileSidebarHidden,
- projectHistory,
- upsertAndSetCurrentProject,
- toggleSidebar,
- toggleMobileSidebarHidden,
- restoreTrashedProject,
- deleteTrashedProject,
- emptyTrash,
- cyclePrevProject,
- cycleNextProject,
- moveProjectToTrash,
- specCreatingForProject,
- setSpecCreatingForProject,
- } = useAppStore();
-
- const isCompact = useIsCompact();
-
- // Environment variable flags for hiding sidebar items
- const { hideTerminal, hideRunningAgents, hideContext, hideSpecEditor } = SIDEBAR_FEATURE_FLAGS;
-
- // Get customizable keyboard shortcuts
- const shortcuts = useKeyboardShortcutsConfig();
-
- // Get unread notifications count
- const unreadNotificationsCount = useNotificationsStore((s) => s.unreadCount);
-
- // State for delete project confirmation dialog
- const [showDeleteProjectDialog, setShowDeleteProjectDialog] = useState(false);
-
- // State for trash dialog
- const [showTrashDialog, setShowTrashDialog] = useState(false);
-
- // Project creation state and handlers
- const {
- showNewProjectModal,
- setShowNewProjectModal,
- isCreatingProject,
- showOnboardingDialog,
- setShowOnboardingDialog,
- newProjectName,
- setNewProjectName,
- newProjectPath,
- setNewProjectPath,
- handleCreateBlankProject,
- handleCreateFromTemplate,
- handleCreateFromCustomUrl,
- } = useProjectCreation({
- upsertAndSetCurrentProject,
- });
-
- // Setup dialog state and handlers
- const {
- showSetupDialog,
- setShowSetupDialog,
- setupProjectPath,
- setSetupProjectPath,
- projectOverview,
- setProjectOverview,
- generateFeatures,
- setGenerateFeatures,
- analyzeProject,
- setAnalyzeProject,
- featureCount,
- setFeatureCount,
- handleCreateInitialSpec,
- handleSkipSetup,
- handleOnboardingGenerateSpec,
- handleOnboardingSkip,
- } = useSetupDialog({
- setSpecCreatingForProject,
- newProjectPath,
- setNewProjectName,
- setNewProjectPath,
- setShowOnboardingDialog,
- });
-
- // Derive isCreatingSpec from store state
- const isCreatingSpec = specCreatingForProject !== null;
- const creatingSpecProjectPath = specCreatingForProject;
- // Check if the current project is specifically the one generating spec
- const isCurrentProjectGeneratingSpec =
- specCreatingForProject !== null && specCreatingForProject === currentProject?.path;
-
- // Auto-collapse sidebar on small screens and update Electron window minWidth
- useSidebarAutoCollapse({ sidebarOpen, toggleSidebar });
-
- // Running agents count
- const { runningAgentsCount } = useRunningAgents();
-
- // Unviewed validations count
- const { count: unviewedValidationsCount } = useUnviewedValidations(currentProject);
-
- // Trash operations
- const {
- activeTrashId,
- isEmptyingTrash,
- handleRestoreProject,
- handleDeleteProjectFromDisk,
- handleEmptyTrash,
- } = useTrashOperations({
- restoreTrashedProject,
- deleteTrashedProject,
- emptyTrash,
- });
-
- // Spec regeneration events
- useSpecRegeneration({
- creatingSpecProjectPath,
- setupProjectPath,
- setSpecCreatingForProject,
- setShowSetupDialog,
- setProjectOverview,
- setSetupProjectPath,
- setNewProjectName,
- setNewProjectPath,
- });
-
- /**
- * Opens the system folder selection dialog and initializes the selected project.
- * Used by both the 'O' keyboard shortcut and the folder icon button.
- */
- const handleOpenFolder = useCallback(async () => {
- const api = getElectronAPI();
- const result = await api.openDirectory();
-
- if (!result.canceled && result.filePaths[0]) {
- const path = result.filePaths[0];
- // Extract folder name from path (works on both Windows and Mac/Linux)
- const name = path.split(/[/\\]/).filter(Boolean).pop() || 'Untitled Project';
-
- try {
- // Check if this is a brand new project (no .automaker directory)
- const hadAutomakerDir = await hasAutomakerDir(path);
-
- // Initialize the .automaker directory structure
- const initResult = await initializeProject(path);
-
- if (!initResult.success) {
- toast.error('Failed to initialize project', {
- description: initResult.error || 'Unknown error occurred',
- });
- return;
- }
-
- // Upsert project and set as current (handles both create and update cases)
- // Theme handling (trashed project recovery or undefined for global) is done by the store
- upsertAndSetCurrentProject(path, name);
-
- // Check if app_spec.txt exists
- const specExists = await hasAppSpec(path);
-
- if (!hadAutomakerDir && !specExists) {
- // This is a brand new project - show setup dialog
- setSetupProjectPath(path);
- setShowSetupDialog(true);
- toast.success('Project opened', {
- description: `Opened ${name}. Let's set up your app specification!`,
- });
- } else if (initResult.createdFiles && initResult.createdFiles.length > 0) {
- toast.success(initResult.isNewProject ? 'Project initialized' : 'Project updated', {
- description: `Set up ${initResult.createdFiles.length} file(s) in .automaker`,
- });
- } else {
- toast.success('Project opened', {
- description: `Opened ${name}`,
- });
- }
- } catch (error) {
- logger.error('Failed to open project:', error);
- toast.error('Failed to open project', {
- description: error instanceof Error ? error.message : 'Unknown error',
- });
- }
- }
- }, [upsertAndSetCurrentProject]);
-
- // Navigation sections and keyboard shortcuts (defined after handlers)
- const { navSections, navigationShortcuts } = useNavigation({
- shortcuts,
- hideSpecEditor,
- hideContext,
- hideTerminal,
- currentProject,
- projects,
- projectHistory,
- navigate,
- toggleSidebar,
- handleOpenFolder,
- cyclePrevProject,
- cycleNextProject,
- unviewedValidationsCount,
- unreadNotificationsCount,
- isSpecGenerating: isCurrentProjectGeneratingSpec,
- });
-
- // Register keyboard shortcuts
- useKeyboardShortcuts(navigationShortcuts);
-
- const isActiveRoute = (id: string) => {
- // Map view IDs to route paths
- const routePath = id === 'welcome' ? '/' : `/${id}`;
- return location.pathname === routePath;
- };
-
- // Check if sidebar should be completely hidden on mobile
- const shouldHideSidebar = isCompact && mobileSidebarHidden;
-
- return (
- <>
- {/* Floating toggle to show sidebar on mobile when hidden */}
-
-
- {/* Mobile backdrop overlay */}
- {sidebarOpen && !shouldHideSidebar && (
-
- )}
-
- >
- );
-}
diff --git a/apps/ui/src/components/layout/sidebar/components/collapse-toggle-button.tsx b/apps/ui/src/components/layout/sidebar/components/collapse-toggle-button.tsx
index 29a71644..2a503fc5 100644
--- a/apps/ui/src/components/layout/sidebar/components/collapse-toggle-button.tsx
+++ b/apps/ui/src/components/layout/sidebar/components/collapse-toggle-button.tsx
@@ -25,7 +25,7 @@ export function CollapseToggleButton({