From ea34f304cbcd4d58111a5a0cf789ffb243735f61 Mon Sep 17 00:00:00 2001 From: Stefan de Vogelaere Date: Fri, 23 Jan 2026 02:13:44 +0100 Subject: [PATCH] refactor(ui): consolidate Dashboard to link to projects overview Replace separate Dashboard and Projects Overview nav items with a single Dashboard item that links to /overview. Update all logo click handlers to navigate to /overview for consistency. Co-Authored-By: Claude Opus 4.5 --- .../sidebar/components/automaker-logo.tsx | 2 +- .../sidebar/components/sidebar-footer.tsx | 68 +------------------ .../sidebar/components/sidebar-header.tsx | 2 +- .../sidebar/components/sidebar-navigation.tsx | 2 +- .../layout/sidebar/hooks/use-navigation.ts | 4 +- 5 files changed, 6 insertions(+), 72 deletions(-) diff --git a/apps/ui/src/components/layout/sidebar/components/automaker-logo.tsx b/apps/ui/src/components/layout/sidebar/components/automaker-logo.tsx index 92b7af99..9f47fffe 100644 --- a/apps/ui/src/components/layout/sidebar/components/automaker-logo.tsx +++ b/apps/ui/src/components/layout/sidebar/components/automaker-logo.tsx @@ -32,7 +32,7 @@ export function AutomakerLogo({ sidebarOpen, navigate }: AutomakerLogoProps) { 'flex items-center gap-3 titlebar-no-drag cursor-pointer group', !sidebarOpen && 'flex-col gap-1' )} - onClick={() => navigate({ to: '/dashboard' })} + onClick={() => navigate({ to: '/overview' })} data-testid="logo-button" > {/* Collapsed logo - only shown when sidebar is closed */} diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-footer.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-footer.tsx index 17129d00..0dab1694 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-footer.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-footer.tsx @@ -2,14 +2,7 @@ import { useCallback } from 'react'; import type { NavigateOptions } from '@tanstack/react-router'; import { cn } from '@/lib/utils'; import { formatShortcut } from '@/store/app-store'; -import { - Activity, - Settings, - BookOpen, - MessageSquare, - ExternalLink, - LayoutDashboard, -} from 'lucide-react'; +import { Activity, Settings, BookOpen, MessageSquare, ExternalLink } from 'lucide-react'; import { useOSDetection } from '@/hooks/use-os-detection'; import { getElectronAPI } from '@/lib/electron'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; @@ -233,65 +226,6 @@ export function SidebarFooter({ 'bg-gradient-to-t from-background/10 via-sidebar/50 to-transparent' )} > - {/* Projects Overview Link */} -
- -
- {/* Running Agents Link */} {!hideRunningAgents && (
diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx index afca3e9c..a1360e79 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx @@ -37,7 +37,7 @@ export function SidebarHeader({ const [dropdownOpen, setDropdownOpen] = useState(false); const handleLogoClick = useCallback(() => { - navigate({ to: '/dashboard' }); + navigate({ to: '/overview' }); }, [navigate]); const handleProjectSelect = useCallback( diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx index 4a1ab1fc..e7fd179e 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx @@ -89,7 +89,7 @@ export function SidebarNavigation({ // Filter sections: always show non-project sections, only show project sections when project exists const visibleSections = navSections.filter((section) => { // Always show Dashboard (first section with no label) - if (!section.label && section.items.some((item) => item.id === 'dashboard')) { + if (!section.label && section.items.some((item) => item.id === 'overview')) { return true; } // Show other sections only when project is selected diff --git a/apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts b/apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts index df5d033f..90d59db9 100644 --- a/apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts +++ b/apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts @@ -175,12 +175,12 @@ export function useNavigation({ } const sections: NavSection[] = [ - // Dashboard - standalone at top + // Dashboard - standalone at top (links to projects overview) { label: '', items: [ { - id: 'dashboard', + id: 'overview', label: 'Dashboard', icon: Home, },