From cba02fc47e1e125649df8b3e3fd7a261ef06f690 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 19 Jun 2026 11:58:00 +0200 Subject: [PATCH] =?UTF-8?q?dashboard:=20label=20graceful-stop=20queue=20en?= =?UTF-8?q?tries=20'stopping=E2=80=A6'=20on=20agent=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1785 routes a graceful stop through the rebuild queue as a GracefulStop entry (wire kind 'graceful_stop'). The SW4RM container-row badge renderer didn't recognise that kind, so an in-flight graceful stop fell through to the generic 'rebuilding' / 'rebuild queued' label. Add the case so the card shows 'stopping…' (running) / 'stop queued' (queued), giving the graceful stop the same live card progress as a rebuild. Doc the badge kind too. --- docs/web-ui/dashboard.md | 7 ++++--- frontend/packages/dashboard/src/tabs.js | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index aa74c19d..a947cd61 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -706,9 +706,10 @@ fetch entirely. restart / rebuild / destroy). Additionally, when a rebuild-queue entry for this agent is `queued` or `running` but no operator-initiated transient is set, the card surfaces a - `building…` / `meta-updating…` badge sourced from - `rebuildQueueState` — so the SW4RM tab shows the same - rebuild progress visible on the C0R3 page's R3BU1LD QU3U3. + `building…` / `meta-updating…` / `stopping…` badge (per queue + `kind` — a `graceful_stop` entry shows `stopping…` / `stop + queued`) sourced from `rebuildQueueState` — so the SW4RM tab + shows the same progress visible on the C0R3 page's R3BU1LD QU3U3. The row visual splits queued vs running: a **queued** entry shows only the pending-state pill (no row tint, so a long queue doesn't paint half the tab amber); a **running** entry keeps the amber diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 6bfc31e7..01085092 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -874,13 +874,15 @@ window.marked = marked; const op = !transientKind ? inFlight.get(c.name) : null; const pending = transientKind || (op && (op.state === 'running' - ? (op.kind === 'meta_update' ? 'meta-updating' - : op.kind === 'destroy' ? 'destroying' - : op.kind === 'restart' ? 'restarting' + ? (op.kind === 'meta_update' ? 'meta-updating' + : op.kind === 'destroy' ? 'destroying' + : op.kind === 'restart' ? 'restarting' + : op.kind === 'graceful_stop' ? 'stopping' : 'rebuilding') - : (op.kind === 'meta_update' ? 'meta-update queued' - : op.kind === 'destroy' ? 'destroy queued' - : op.kind === 'restart' ? 'restart queued' + : (op.kind === 'meta_update' ? 'meta-update queued' + : op.kind === 'destroy' ? 'destroy queued' + : op.kind === 'restart' ? 'restart queued' + : op.kind === 'graceful_stop' ? 'stop queued' : 'rebuild queued'))); const opRunning = transientKind != null || (op != null && op.state === 'running');