swarm ui: show agent freshness and failures where the operator looks, page titles, try again, and stale-data notes
An agent card shows its freshness (stale with the last report's age, never reported, not in swarm identity) when it is not fresh, so the status filter has a visible reason. A failed state change shows its reason in a panel under the card, and a failed cancel shows its reason in the badge, instead of a hover title. Pages can set their title (usePageTitle) and the flow editor does, so several editor tabs differ; the 404 links home. The claude login dialog offers try again after a failure, announces its wait, and has a per-agent field id. The create-agent tabs go forward again as far as the operator has been, but not past a step that is invalid now (lastReachableStep, tested), and the disabled next and create buttons say why in a hint they are described by. usePolled reports when the last live answer arrived, and StaleNote says how old a list is under a failed refresh, or that it is the answer saved from the last visit, on the alerts, builds, review runs, hives, schedules and flows lists.
This commit is contained in:
parent
e4cfac6926
commit
679d2ee420
1 changed files with 321 additions and 25 deletions
|
|
@ -22,6 +22,7 @@ import {
|
|||
type RefreshIntervalMs,
|
||||
} from "../../ui/refresh-interval/RefreshInterval.js";
|
||||
import { fetchJson, usePolled } from "../../ui/polled/usePolled.js";
|
||||
import { StaleNote } from "../../ui/polled/StaleNote.js";
|
||||
import type { TableColumn } from "../../ui/table/Table.js";
|
||||
import type { AgentRow } from "../../agent/AgentTypes.js";
|
||||
import { ScheduleCard, ScheduleListSkeleton } from "./ScheduleCard.js";
|
||||
|
|
@ -64,6 +65,7 @@ function SchedulesBody() {
|
|||
const {
|
||||
data: schedules,
|
||||
error,
|
||||
updatedAt,
|
||||
refreshing: schedulesRefreshing,
|
||||
refresh,
|
||||
} = usePolled(intervalMs, (signal) =>
|
||||
|
|
@ -180,6 +182,11 @@ function SchedulesBody() {
|
|||
{error ? (
|
||||
<ApiErrorPanel context="failed to load the schedules" problem={error} />
|
||||
) : null}
|
||||
<StaleNote
|
||||
updatedAt={updatedAt}
|
||||
failed={error !== null}
|
||||
hasData={schedules !== null}
|
||||
/>
|
||||
{actionError ? (
|
||||
<ApiErrorPanel
|
||||
context="the schedule was not changed"
|
||||
|
|
|
|||
Loading…
Reference in a new issue