Context
PR #222 added per-query 5xx soft-degrade on the dashboard: when one of providers/models/agents/MCP list endpoints returns a 5xx, the dashboard renders ? for the affected count and a "degraded" pill, instead of blanking the page. WorkloadCard distinguishes route_absent (404) vs store_unavailable (503). The reviewer noted that the dashboard still lacks a single place that summarises "what is degraded right now" — it's spread across small pills next to each value.
Problem
In practice an operator wants:
- a top-of-page banner when any dashboard subquery is degraded
- the list of which endpoints are affected (
/v1/agents, /v1/providers/list, etc.)
- the last-attempted-at time
- a single Retry-all button
Today they have to scan every card looking for the small ? indicator.
Proposal
- Extract a
useDashboardHealth hook that aggregates the degraded state of every subquery used by the dashboard (config-list providers / models / agents / MCP; runtime-stats; run-counts).
- Add a
<DashboardDegradedBanner> component at the top of the dashboard that renders only when one or more subqueries are in a degraded / error state. It lists affected endpoints by name, the last error message (or HTTP status), the last fetch time, and a Retry button that invalidates the affected queries.
- Keep the per-card pills as the in-context indicator — the banner is the summary.
Acceptance
- Single banner aggregates degrade state
- Each row in the banner names the endpoint + status + last-fetched timestamp
- "Retry" invalidates affected queries; on success the banner row disappears
- A11y: banner has
role="status"; transitions from clean → degraded fire an aria-live="polite" announcement
- Test: induce 503 on two subqueries → banner shows both rows + retry recovers
Notes
This is the response to the reviewer's "排障效率仍一般" concern. Doesn't change the per-card behaviour; just adds the page-level summary.
Context
PR #222 added per-query 5xx soft-degrade on the dashboard: when one of providers/models/agents/MCP list endpoints returns a 5xx, the dashboard renders
?for the affected count and a "degraded" pill, instead of blanking the page. WorkloadCard distinguishesroute_absent(404) vsstore_unavailable(503). The reviewer noted that the dashboard still lacks a single place that summarises "what is degraded right now" — it's spread across small pills next to each value.Problem
In practice an operator wants:
/v1/agents,/v1/providers/list, etc.)Today they have to scan every card looking for the small
?indicator.Proposal
useDashboardHealthhook that aggregates the degraded state of every subquery used by the dashboard (config-list providers / models / agents / MCP; runtime-stats; run-counts).<DashboardDegradedBanner>component at the top of the dashboard that renders only when one or more subqueries are in a degraded / error state. It lists affected endpoints by name, the last error message (or HTTP status), the last fetch time, and a Retry button that invalidates the affected queries.Acceptance
role="status"; transitions from clean → degraded fire anaria-live="polite"announcementNotes
This is the response to the reviewer's "排障效率仍一般" concern. Doesn't change the per-card behaviour; just adds the page-level summary.