swarm ui: agents page opens an agent's details beside the list
Selecting an agent card opens its details in a column on the right of the agents list, at /agents/<name>, instead of unfolding the card in place. The list is full width until an agent is selected, then narrows and the details slide in. A narrow screen shows the details alone, with a back button. A card's message is cut to one line. The shell treats /agents/<name> as the agents page, so the nav tab stays lit and the page is not rebuilt on each selection.
This commit is contained in:
parent
2d3da56907
commit
7bdaea7954
2 changed files with 494 additions and 154 deletions
|
|
@ -13,7 +13,7 @@ place, and every one reads from [`swarm-controller`](../../../swarm-controller/R
|
|||
| route | what |
|
||||
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `/` | the start page: the swarm's name over a digital-rain backdrop with the slug (`hyperhive / we are the wired`, its shaded gradients pulsing in a wave unless reduced motion is on) at the foot, plus a paperclip offering to set up an agent while no `ruth` exists, or her hive declares her destroyed (it opens the create form with `ruth` filled in and the `ruth` archetype picked); the swarm name in the header links here |
|
||||
| `/agents` | every agent as a card that opens in place (status, terminal, subagents, and settings with permissions, internet, allowed domains and accounts); create agents (with their permissions, optionally from an [archetype](archetypes.md)), link forge, matrix and GitHub accounts |
|
||||
| `/agents` | every agent as a card; select one to open its details beside the list (status, terminal, subagents, and settings with permissions, internet, allowed domains and accounts); create agents (with their permissions, optionally from an [archetype](archetypes.md)), link forge, matrix and GitHub accounts |
|
||||
| `/swarm` | what belongs to the whole swarm: a folded **hives** card with the hive directory and each hive's last reported status, a folded **egress** card with the swarm-wide allowed and denied domains, and a folded, **beta** **notification router** card (with a warning banner) holding the router's flows: a switch for each built-in, a card for each flow an archetype carries, every flow drawn as a graph, and an editor for custom flows. `/notifications` redirects here |
|
||||
| `/agents/<name>/terminal` | one agent's live terminal |
|
||||
| `/agents/<name>/subagents/<subagent>/terminal` | one of that agent's subagents' live terminal |
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ asks from inside a handler with the `useConfirm` hook, with no dialog state of i
|
|||
| route | what |
|
||||
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `/` | the start page: the swarm's name over a digital-rain backdrop with the slug (`hyperhive / we are the wired`, its shaded gradients pulsing in a wave unless reduced motion is on) at the foot, plus a paperclip offering to set up an agent while no `ruth` exists, or her hive declares her destroyed (it opens the create form with `ruth` filled in); the swarm name in the header links here |
|
||||
| `/agents` | every agent as a card that opens in place (status, terminal, subagents, and settings with permissions, internet, allowed domains and accounts); create agents (with their permissions, optionally from an [archetype](../../2-handbook/swarm/archetypes.md)), link forge, matrix and GitHub accounts |
|
||||
| `/agents` | every agent as a card; select one to open its details beside the list (status, terminal, subagents, and settings with permissions, internet, allowed domains and accounts); create agents (with their permissions, optionally from an [archetype](../../2-handbook/swarm/archetypes.md)), link forge, matrix and GitHub accounts |
|
||||
| `/swarm` | what belongs to the whole swarm: a folded **hives** card with the hive directory and each hive's last reported status, a folded **egress** card with the swarm-wide allowed and denied domains, and a folded, **beta** **notification router** card (with a warning banner) holding the router's flows: a switch for each built-in, every flow drawn as a graph, and an editor for custom flows. `/notifications` redirects here |
|
||||
| `/agents/<name>/terminal` | one agent's live terminal |
|
||||
| `/agents/<name>/subagents/<subagent>/terminal` | one of that agent's subagents' live terminal |
|
||||
|
|
@ -86,7 +86,7 @@ The pages that only display (agents, alerts, builds, review runs and the hives
|
|||
card) show the answer they last saw at once, then replace it with the fresh one
|
||||
while the spinner runs, so opening one never starts on an empty page. On the very
|
||||
first visit, the hives card and the alerts table show their own header with three
|
||||
grey placeholder rows until the first answer comes. In an opened agent card, a
|
||||
grey placeholder rows until the first answer comes. In an agent's details, a
|
||||
setting still loading (permissions, resource caps, internet, allowed
|
||||
domains) shows a grey pill the size of its badge, and the AGENTS.md editor a grey
|
||||
block. The browser
|
||||
|
|
@ -110,7 +110,7 @@ the code back. A failed login offers **try again** in the same dialog. When the
|
|||
secret store has the login, the dialog closes and a
|
||||
short toast in the top-right corner says so. The credentials go to the agent through the secret store
|
||||
([`claude-login.md`](../../2-handbook/swarm/claude-login.md)). The agent's own web UI login still
|
||||
works too. The settings section of an opened card has a **claude login** row: when
|
||||
works too. The settings section of an agent's details has a **claude login** row: when
|
||||
the swarm stored the agent's login, or that none is, with a **log in** button
|
||||
(**log in again** when the swarm holds one) that opens the same dialog, and a **delete
|
||||
login** action that asks first.
|
||||
|
|
@ -130,21 +130,32 @@ sweep. A hive that doesn't publish the field shows no badge.
|
|||
|
||||
`/agents` is a column of separate cards: a filter card, then one
|
||||
card per agent, none of them inside a bigger card. A card's
|
||||
header shows its icon, name, the status message with how long ago the agent set it (`5m ago`), a **terminal**
|
||||
header shows its icon, name, the status message on one line (the whole message is in the details and in the card's tooltip) with how long ago the agent set it (`5m ago`), a **terminal**
|
||||
button that opens the agent's terminal tab, the **wanted** menu (up, offline,
|
||||
paused, destroy), a **paused by hive** badge when the agent's own harness paused
|
||||
its turn loop (hover for the reason; set the agent **up** to resume it), 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
|
||||
**login needed** badge with a **log in** button when its claude has no session.
|
||||
|
||||
Select a card to open the agent's details. The address becomes
|
||||
`/agents/<name>`, so a link or a reload lands on the same agent, and the
|
||||
browser's back and forward buttons walk through the selections. Until you select
|
||||
an agent the list takes the whole width. Selecting one narrows the list to a
|
||||
third of the page and slides the details in on the right, which scroll on their
|
||||
own while the list stays in view, and the selected card gets a purple border and fill. The widths animate,
|
||||
and stand still where motion is off. A screen narrower than 60em has room for one
|
||||
column, so the details replace the list. At any width, the **← agents** button above
|
||||
the details shuts them and the list takes the width again, and focus returns to
|
||||
the agent's card. A name the roster doesn't have, from a stale link, shows
|
||||
"no agent named …" and the same button. The
|
||||
filter card, which also holds the **+ agent** button and the refresh picker,
|
||||
filters by name, hive, status, message, wanted state
|
||||
and config PR. While the agent list loads for the first time, the page shows grey
|
||||
placeholder cards with the same layout as the real ones, so the cards don't jump
|
||||
when the data arrives. The placeholders stand still where motion is off.
|
||||
|
||||
An opened card has six sections, and each reads nothing until you open it.
|
||||
**status** and **terminal** start open, the other four folded:
|
||||
Below the agent's state, message and wanted menu, the details have six sections,
|
||||
and each reads nothing until you open it. **status** and **terminal** start
|
||||
open, the other four folded:
|
||||
|
||||
- **status**: how fresh the agent's last report is (with its age), its turn state and context, its hive, links to its
|
||||
profile and its config repo on the swarm's forge (built from the forge entry
|
||||
|
|
@ -169,7 +180,7 @@ An opened card has six sections, and each reads nothing until you open it.
|
|||
|
||||
### Agent and subagent terminals
|
||||
|
||||
An opened agent card on `/agents` shows, in its **terminal** section, a small live preview of its
|
||||
An agent's detail pane on `/agents` shows, in its **terminal** section, a small live preview of its
|
||||
terminal, and below it the agent's **subagents**: every subagent the swarm
|
||||
queue holds terminal rows for from the last 24 hours. Picking one shows its
|
||||
terminal in the same preview, and **expand** opens it in its own tab, as it
|
||||
|
|
@ -273,7 +284,7 @@ with no icon keeps the hyperhive mark. Everywhere else the swarm UI shows an age
|
|||
The tab also has an agent badge, with the agent's icon (carrying the connection
|
||||
light) and name, ahead of the state badges. It opens the agent's details in a popover under the badge:
|
||||
the same status, state, wanted state and folded **status** and **settings** sections (inference, resource caps, internet, allowed domains, permissions and linked accounts) as the
|
||||
opened card on `/agents`, without the terminal and subagents. The popover doesn't dim the
|
||||
details on `/agents`, without the terminal and subagents. The popover doesn't dim the
|
||||
page. Selecting outside it, or Escape, closes it. From the keyboard, opening a
|
||||
popover moves focus into it, and Escape puts focus back on the badge. The filter
|
||||
popovers on table headers work the same way. You can stop or pause the
|
||||
|
|
@ -704,7 +715,7 @@ store identity, or no queue address, publishes no subagent terminals.
|
|||
|
||||
<details><summary>Where the background task list comes from</summary>
|
||||
|
||||
An opened agent card has a **background tasks** section, below the subagents, listing the
|
||||
An agent's detail pane has a **background tasks** section, below the subagents, listing the
|
||||
tasks the agent started through the bash MCP. Its bash MCP publishes one status per task
|
||||
to the `bash-task-status` bucket, and swarm-controller serves the list as
|
||||
`GET /api/agents/<name>/bash-tasks`: each task's id, command, state, the time the agent queued it and
|
||||
|
|
@ -832,7 +843,7 @@ text stays.
|
|||
|
||||
### Inference settings
|
||||
|
||||
An opened agent card shows, in its **settings** section, its model and effort under **inference**, each
|
||||
An agent's detail pane shows, in its **settings** section, its model and effort under **inference**, each
|
||||
with where it comes from: the swarm, its agent.nix, its own pick, or the
|
||||
default. Below them are the subagent model list the swarm sets, or "its own"
|
||||
when it sets none, the subagent cap, which reads "no cap" when unset, and the
|
||||
|
|
@ -847,7 +858,7 @@ report reaches the controller, it shows the swarm's stored values only.
|
|||
|
||||
### Editing an agent's instructions
|
||||
|
||||
The **instructions** row of an opened agent card's **settings** has an **edit** button. It
|
||||
The **instructions** row of an agent's **settings** has an **edit** button. It
|
||||
opens `AGENTS.md`, the file the agent reads its instructions from, in a plain
|
||||
text box. The text is the copy the agent last published, so the box still
|
||||
opens for a stopped agent, but **save** needs the agent running.
|
||||
|
|
@ -863,7 +874,7 @@ dialog keeps an unsaved edit for the next time you open it.
|
|||
|
||||
### Resource caps
|
||||
|
||||
An opened agent card shows, under **settings**, its CPU quota and memory max under **resource
|
||||
An agent's detail pane shows, under **settings**, its CPU quota and memory max under **resource
|
||||
caps**. A cap is the swarm's, so it follows the agent to whichever hive runs
|
||||
it, and it replaces what the hive says for that field. A field the swarm
|
||||
leaves out shows as the hive deciding it. **edit** opens a dialog with the two
|
||||
|
|
@ -904,7 +915,7 @@ reason and a **retry** button.
|
|||
|
||||
### Permissions
|
||||
|
||||
An opened agent card shows, under **settings**, what the swarm grants it under **permissions**:
|
||||
An agent's detail pane shows, under **settings**, what the swarm grants it under **permissions**:
|
||||
a badge reading the default set, none, or a count. A swarm
|
||||
grant is the agent's whole set, so it follows the agent to whichever hive runs
|
||||
it. Selecting the badge opens a box under it with one checkbox per permission the controller
|
||||
|
|
@ -975,7 +986,7 @@ same grant from a shell.
|
|||
|
||||
### Allowed domains
|
||||
|
||||
An opened agent card lists, under **settings**, the destinations it may reach through its
|
||||
An agent's detail pane lists, under **settings**, the destinations it may reach through its
|
||||
hive's egress proxy under **allowed domains**, beyond the base list every
|
||||
agent has: one badge per source with its count, **swarm-wide** (the entries for every
|
||||
agent), **this agent** (the ones for it alone) and **automatic**. Selecting a badge
|
||||
|
|
@ -1057,7 +1068,7 @@ the dialog goes back to step 2 and shows the reason there.
|
|||
### Settings at creation
|
||||
|
||||
Step 4 of the **+ agent** dialog has **resource caps** and **inference**, with
|
||||
the same fields as the opened card's settings editors. Leave the
|
||||
the same fields as the agent's settings editors. Leave the
|
||||
fields empty and the request is the plain name and hive. Fill them and `POST /api/agents` carries them
|
||||
as optional `limits` and `inference` objects, the same shapes the two `PUT`
|
||||
routes take. The controller checks them with the `PUT` rules before it queues
|
||||
|
|
@ -1100,14 +1111,14 @@ reads back and its box starts with the stored text. The secrets never read back,
|
|||
so their box starts empty and replaces the stored secrets only when filled and
|
||||
saved.
|
||||
|
||||
The **claude login** row of an opened agent also sets the API key: **set API key**
|
||||
The **claude login** row of an agent's details also sets the API key: **set API key**
|
||||
(or **replace API key**) sends the key as `ANTHROPIC_API_KEY=<key>` to the
|
||||
agent's secrets, **remove API key** deletes them, and **advanced** opens
|
||||
the form above. The row shows whether the store holds a key and never the key. A
|
||||
change reaches the agent at its next restart, and an agent with a key tries it
|
||||
instead of waiting for a claude login.
|
||||
|
||||
An opened agent card lists its linked accounts at the end of its **settings** section, one row
|
||||
An agent's detail pane lists its linked accounts at the end of its **settings** section, one row
|
||||
per account: kind, name and host. Opening an agent makes one request,
|
||||
`GET /api/hives/{hive}/agents/{agent}/linked-accounts`, which returns every
|
||||
account of that agent as names and hosts and never a credential. When the card
|
||||
|
|
|
|||
Loading…
Reference in a new issue