Skip to content

Dashboard: unified degraded summary banner (lists affected endpoints + Retry) #242

Description

@chaizhenhua

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

  1. 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).
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions