From 5b66a83112c3bd538693d733ab102443d4c1c1f4 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 1 Nov 2026 12:18:51 +0100 Subject: [PATCH] swarm ui: the agent card has a terminal icon beside the wanted menu It opens the agent's terminal tab without opening the card. --- docs/swarm/ui.md | 5 +++-- frontend/packages/shared/src/icons.tsx | 21 +++++++++++++++++++ .../swarm-ui/src/agent/roster/AgentCard.tsx | 14 +++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/swarm/ui.md b/docs/swarm/ui.md index ccc7e733..de0372aa 100644 --- a/docs/swarm/ui.md +++ b/docs/swarm/ui.md @@ -56,8 +56,9 @@ works too. ### The agents page `/agents` is the hives card, then one column of cards, one per agent. A card's -header shows its icon, name, freshness, the status message and the **wanted** -menu (up, offline, paused, destroy), and a **login needed** badge with a +header shows its icon, name, freshness, the status message, a **terminal** +button that opens the agent's terminal tab, the **wanted** menu (up, offline, +paused, destroy), and a **login needed** badge with a **log in** button when its claude has no session. Select the header to open the card in place; select it again to close it. Several cards can be open at once, and a card stays open across the page's refresh, but not across a reload. The diff --git a/frontend/packages/shared/src/icons.tsx b/frontend/packages/shared/src/icons.tsx index a53b68ca..74b63a36 100644 --- a/frontend/packages/shared/src/icons.tsx +++ b/frontend/packages/shared/src/icons.tsx @@ -105,3 +105,24 @@ export function FilterIcon() { ); } + +// A prompt in a window (`>_`), the standard "terminal" glyph — the agent +// card's shortcut to the agent's terminal tab. Same recipe as `LinkIcon`. +export function TerminalIcon() { + return ( + + ); +} diff --git a/frontend/packages/swarm-ui/src/agent/roster/AgentCard.tsx b/frontend/packages/swarm-ui/src/agent/roster/AgentCard.tsx index bf0ce4c3..5a0e6188 100644 --- a/frontend/packages/swarm-ui/src/agent/roster/AgentCard.tsx +++ b/frontend/packages/swarm-ui/src/agent/roster/AgentCard.tsx @@ -6,17 +6,23 @@ // shows the agent's status, message and wanted state, so the opened body is the // rest: `AgentDetail`'s folded sections (`inCard`). // +// The terminal badge beside the wanted menu opens the agent's terminal tab, the +// most common action, without opening the card. +// // The `stopPropagation` wrappers around the login and `WantedMenu` controls // keep their own clicks (mouse or keyboard-synthesized, they host real // `