diff --git a/ui/src/components/monitor-layout/kpi.tsx b/ui/src/components/monitor-layout/kpi.tsx index f7b96012..0b3b5f9e 100644 --- a/ui/src/components/monitor-layout/kpi.tsx +++ b/ui/src/components/monitor-layout/kpi.tsx @@ -27,6 +27,14 @@ interface KpiCardProps { /** Tone for the hint line (e.g. positive delta, warning, etc.). */ tone?: 'default' | 'positive' | 'warning' | 'negative'; icon?: ReactNode; + /** + * Optional click handler. When set, the tile renders as a button with + * keyboard + hover affordances — used by pages where each KPI is also a + * navigation entry point (e.g. home dashboard). + */ + onClick?: () => void; + /** Accessible label override when onClick is set. Defaults to `label`. */ + ariaLabel?: string; className?: string; } @@ -39,10 +47,22 @@ const TONE_CLASSES: Record, string> = { /** * KpiCard - Single hero stat tile inside a KpiRow. + * + * Renders as a static
by default; promotes to a clickable + ); + } + + return
{content}
; } diff --git a/ui/src/pages/home.tsx b/ui/src/pages/home.tsx index 17e87ed3..cd055a5b 100644 --- a/ui/src/pages/home.tsx +++ b/ui/src/pages/home.tsx @@ -67,22 +67,26 @@ export function HomePage() { label={t('home.profiles')} value={overview?.profiles ?? 0} icon={} + onClick={() => navigate('/providers')} /> } + onClick={() => navigate('/cliproxy')} /> } + onClick={() => navigate('/accounts')} /> } + onClick={() => navigate('/health')} /> }