From fd6953ed7c4cfb8de381446c00663e8d876c3108 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 11 Oct 2026 23:58:43 +0200 Subject: [PATCH] swarm-ui: show a failed wanted-state change in the agent details The failure was recorded but only the roster card drew it, so the details dialog on a terminal page said nothing when a declaration failed. AgentDetail now shows it under the wanted menu, which the roster's detail panel gets too. --- .../packages/swarm-ui/src/pages/agents/AgentDetail.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/packages/swarm-ui/src/pages/agents/AgentDetail.tsx b/frontend/packages/swarm-ui/src/pages/agents/AgentDetail.tsx index a68b7f6c..ad7d67eb 100644 --- a/frontend/packages/swarm-ui/src/pages/agents/AgentDetail.tsx +++ b/frontend/packages/swarm-ui/src/pages/agents/AgentDetail.tsx @@ -6,6 +6,7 @@ // // Takes the agent's *live* row and the shared `AgentActions`, so a state // change or a link made here shows wherever else the same row is drawn. +import { ApiErrorPanel } from "@hive/shared/api-error-panel.js"; import { Badge } from "@hive/shared/badge.js"; import { RelativeTime } from "../../ui/relative-time/RelativeTime.js"; import type { AgentActions } from "./AgentActions.js"; @@ -28,6 +29,7 @@ export function AgentDetail({ withTerminal?: boolean; }) { const { tone, label } = FRESHNESS[row.freshness]; + const declareError = actions.actionErrors.get(row.name); return (
@@ -62,6 +64,14 @@ export function AgentDetail({ onSelectPaused={actions.selectPaused} onDestroy={actions.requestDestroy} /> + {/* A failed declaration shows here too: on a terminal page's + dialog there is no roster card to carry the "failed" badge. */} + {declareError ? ( + + ) : null}
hive
{row.hive ?? "—"}