/** * OverviewView - Multi-project dashboard showing status across all projects * * Provides a unified view of all projects with active features, running agents, * recent completions, and alerts. Quick navigation to any project or feature. */ import { useMultiProjectStatus } from '@/hooks/use-multi-project-status'; import { isElectron } from '@/lib/electron'; import { isMac } from '@/lib/utils'; import { Spinner } from '@/components/ui/spinner'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { ProjectStatusCard } from './overview/project-status-card'; import { RecentActivityFeed } from './overview/recent-activity-feed'; import { RunningAgentsPanel } from './overview/running-agents-panel'; import { LayoutDashboard, RefreshCw, Folder, Activity, CheckCircle2, XCircle, Clock, Bot, Bell, } from 'lucide-react'; export function OverviewView() { const { overview, isLoading, error, refresh } = useMultiProjectStatus(15000); // Refresh every 15s return (
{/* Header */}
{/* Electron titlebar drag region */} {isElectron() && (
{/* Main content */}
{/* Loading state */} {isLoading && !overview && (

Loading project overview...

)} {/* Error state */} {error && !overview && (

Failed to load overview

{error}

)} {/* Content */} {overview && (
{/* Aggregate stats */}

{overview.aggregate.projectCounts.total}

Projects

{overview.aggregate.featureCounts.running}

Running

{overview.aggregate.featureCounts.pending}

Pending

{overview.aggregate.featureCounts.completed}

Completed

{overview.aggregate.featureCounts.failed}

Failed

{overview.aggregate.projectsWithAutoModeRunning}

Auto-mode

{/* Main content grid */}
{/* Left column: Project cards */}

All Projects

{overview.aggregate.totalUnreadNotifications > 0 && (
{overview.aggregate.totalUnreadNotifications} unread notifications
)}
{overview.projects.length === 0 ? (

No projects yet

Create or open a project to get started

Use the sidebar to create or open a project

) : (
{overview.projects.map((project) => ( ))}
)}
{/* Right column: Running agents and activity */}
{/* Running agents */} Running Agents {overview.aggregate.projectsWithAutoModeRunning > 0 && ( {overview.aggregate.projectsWithAutoModeRunning} active )} {/* Recent activity */} Recent Activity
{/* Footer timestamp */}
Last updated: {new Date(overview.generatedAt).toLocaleTimeString()}
)}
); }