From 40240053198e8b9f68cd553a4454aaa61a22d719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Tue, 3 Feb 2026 22:57:59 +0100 Subject: [PATCH] Improve overview: named chips for stopped services, view-all navigation Services card: running services shown as green dots, stopped/unknown services promoted to named chips with colored borders for visibility. Section headers (Services, Deployments) get "View all >" links that navigate to the corresponding tab. Co-Authored-By: Claude Opus 4.5 --- src/components/OverviewTab.tsx | 132 +++++++++++++++++++++++---------- 1 file changed, 92 insertions(+), 40 deletions(-) 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 ? (