diff --git a/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx b/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx index de965942..63128fad 100644 --- a/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx +++ b/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx @@ -78,13 +78,21 @@ interface AgentRow { wanted: Wanted; } -// Same tone/label pairing as HivesPage — one freshness enum shared by both -// endpoints, so the same rendering rule applies to both pages. +// Same tone pairing as HivesPage — one freshness enum shared by both +// endpoints, so the same tone rule applies to both pages — but `unknown`'s +// label diverges deliberately: an agent outside the swarm-identity roster +// has a concrete next step (register it), while an unrecognized *hive* on +// HivesPage doesn't carry the same actionable meaning. const FRESHNESS: Record = { fresh: { tone: "positive", label: "fresh" }, stale: { tone: "warning", label: "stale" }, never_reported: { tone: "neutral", label: "never reported" }, - unknown: { tone: "negative", label: "unknown" }, + // `unknown` means the agent reported into the KV bucket but isn't in + // the swarm-identity roster — a real, distinct case ("hive-reported, + // not yet in swarm level"), not just a fallback default, so it gets a + // label that says what to do about it rather than reusing the enum + // name as the label. + unknown: { tone: "negative", label: "not in swarm identity" }, }; // Same 30s default + same reasoning as HivesPage: no inputs on this page @@ -214,6 +222,11 @@ export function AgentsPage() { return ( {text ? `${text} — ` : ""}