diff --git a/src/components/OverviewTab.tsx b/src/components/OverviewTab.tsx
index cf66d27..4338eea 100644
--- a/src/components/OverviewTab.tsx
+++ b/src/components/OverviewTab.tsx
@@ -43,6 +43,33 @@ const projects: ProjectDef[] = [
},
];
+function SectionHeader({ icon, title, badge, tabTarget, onNavigate }: {
+ icon: string;
+ title: string;
+ badge?: React.ReactNode;
+ tabTarget?: string;
+ onNavigate?: (tab: string) => void;
+}) {
+ return (
+
+
+
+ {title}
+ {badge}
+
+ {tabTarget && onNavigate && (
+
+ )}
+
+ );
+}
+
function ProjectCard({ project, services, healthStatus }: {
project: ProjectDef;
services: Service[];
@@ -87,10 +114,15 @@ export function OverviewTab() {
deployments,
deploymentsLoading,
discoveredServices,
+ setActiveTab,
} = usePortal();
- const runningCount = services.filter(s => healthStatus[s.name] === 'running').length;
- const stoppedCount = services.filter(s => healthStatus[s.name] === 'stopped').length;
+ const runningServices = services.filter(s => healthStatus[s.name] === 'running');
+ const stoppedServices = services.filter(s => healthStatus[s.name] === 'stopped');
+ const unknownServices = services.filter(s => {
+ const st = healthStatus[s.name];
+ return st !== 'running' && st !== 'stopped';
+ });
const totalCount = services.length;
const recentDeployments = deployments.slice(0, 5);
@@ -109,61 +141,81 @@ export function OverviewTab() {
{/* Services */}
-
-
- Services
- {isDiscovered && (
+
Auto-discovered
- )}
-
+ ) : undefined}
+ />
- {runningCount}
+ {runningServices.length}
of {totalCount} running
-
-
-
-
{runningCount} running
+ {/* Stopped services as named chips */}
+ {stoppedServices.length > 0 && (
+
+
Stopped
+
+ {stoppedServices.map(s => (
+
+
+ {s.name}
+
+ ))}
+
- {stoppedCount > 0 && (
-
-
- {stoppedCount} stopped
-
- )}
- {totalCount - runningCount - stoppedCount > 0 && (
-
-
- {totalCount - runningCount - stoppedCount} unknown
-
- )}
-
+ )}
-
- {services.map(s => {
- const status = healthStatus[s.name];
- const color = status === 'running' ? 'bg-emerald-500' : status === 'stopped' ? 'bg-red-500' : 'bg-slate-400';
- return (
+ {/* Unknown services as named chips */}
+ {unknownServices.length > 0 && (
+
+
Unknown
+
+ {unknownServices.map(s => (
+
+
+ {s.name}
+
+ ))}
+
+
+ )}
+
+ {/* Running services as green dots */}
+ {runningServices.length > 0 && (
+
+ {runningServices.map(s => (
- );
- })}
-
+ ))}
+
+ )}
{/* Recent Deployments */}
-
-
- Recent Deployments
-
+
{deploymentsLoading && deployments.length === 0 ? (