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 <noreply@anthropic.com>
This commit is contained in:
Stefan de Vogelaere
2026-01-23 02:13:44 +01:00
parent 53ad78dfc8
commit ea34f304cb
5 changed files with 6 additions and 72 deletions

View File

@@ -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 */}

View File

@@ -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 */}
<div className="p-2 pb-0">
<button
onClick={() => navigate({ to: '/overview' })}
className={cn(
'group flex items-center w-full px-3 py-2.5 rounded-xl relative overflow-hidden titlebar-no-drag',
'transition-all duration-200 ease-out',
isActiveRoute('overview')
? [
'bg-gradient-to-r from-brand-500/20 via-brand-500/15 to-brand-600/10',
'text-foreground font-medium',
'border border-brand-500/30',
'shadow-md shadow-brand-500/10',
]
: [
'text-muted-foreground hover:text-foreground',
'hover:bg-accent/50',
'border border-transparent hover:border-border/40',
'hover:shadow-sm',
],
sidebarOpen ? 'justify-start' : 'justify-center',
'hover:scale-[1.02] active:scale-[0.97]'
)}
title={!sidebarOpen ? 'Projects Overview' : undefined}
data-testid="projects-overview-link"
>
<LayoutDashboard
className={cn(
'w-[18px] h-[18px] shrink-0 transition-all duration-200',
isActiveRoute('overview')
? 'text-brand-500 drop-shadow-sm'
: 'group-hover:text-brand-400 group-hover:scale-110'
)}
/>
<span
className={cn(
'ml-3 font-medium text-sm flex-1 text-left',
sidebarOpen ? 'block' : 'hidden'
)}
>
Projects Overview
</span>
{!sidebarOpen && (
<span
className={cn(
'absolute left-full ml-3 px-2.5 py-1.5 rounded-lg',
'bg-popover text-popover-foreground text-xs font-medium',
'border border-border shadow-lg',
'opacity-0 group-hover:opacity-100',
'transition-all duration-200 whitespace-nowrap z-50',
'translate-x-1 group-hover:translate-x-0'
)}
>
Projects Overview
</span>
)}
</button>
</div>
{/* Running Agents Link */}
{!hideRunningAgents && (
<div className="px-3 py-0.5">

View File

@@ -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(

View File

@@ -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

View File

@@ -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,
},