Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: an agent's details are an identity card and sections by question

The details pane showed the agent's name, then status, message and wanted
rows with no card, then a folded status section repeating the state, and a
single settings section of eleven rows of different kinds.

The pane now opens with one identity card: icon and name, the wanted menu,
badges for freshness, turn state, context and a needed login, the whole
status message, and the hive, links and config PR. Below it the folded
sections answer one question each: terminal, activity (todos, subagents and
background tasks together), instructions, inference (which now holds the
claude login and API key), access, and accounts. The terminal page's popover
shows the card without the name and the four settings sections.
This commit is contained in:
iris 2026-11-22 23:34:11 +01:00 • committed by mara
commit ab329e5793
2 changed files with 480 additions and 375 deletions

View file

@ -1,4 +1,4 @@
/* <AgentDetailPane>: the back button, then the agent's icon and name. */
/* <AgentDetailPane>: the back button, then the agent's details. */
.agent-detail-pane {
display: flex;
flex-direction: column;
@ -18,16 +18,12 @@
.agent-detail-pane-back:focus-visible {
color: var(--fg);
}
/* The name of an agent the roster does not have, over its "no agent" note; it
takes the focus when the details open and is not a control. */
.agent-detail-pane-title {
display: flex;
align-items: center;
gap: 0.7em;
}
.agent-detail-pane-title h2 {
margin: 0;
font-size: 1.25em;
}
/* The name takes the focus when the details open; it is not a control. */
.agent-detail-pane-title h2:focus {
.agent-detail-pane-title:focus {
outline: none;
}

View file

@ -1,13 +1,11 @@
// <AgentDetailPane> — the selected agent's details, in the column beside the
// agents list (or alone on a narrow screen): a title row with the back button
// and the agent's icon and name, then `AgentDetail`'s state rows and folded
// sections, the same ones the terminal page's popover shows, plus the terminal
// preview.
// agents list (or alone on a narrow screen): the back button, then
// `AgentDetail`: the identity card with the agent's icon and name, and the
// folded sections.
//
// The agent comes from the roster the page already polls, so a state change made
// here or a refresh shows at once. A name the roster does not have (a stale link,
// an agent destroyed meanwhile) says so and still offers the way back.
import { AgentIcon } from "../../agent/AgentIcon.js";
import type { AgentActions } from "../../agent/roster/AgentActions.js";
import type { AgentRow } from "../../agent/AgentTypes.js";
import { AgentDetail } from "../../agent/detail/AgentDetail.js";
@ -34,16 +32,15 @@ export function AgentDetailPane({
<span aria-hidden="true">←</span> agents
</button>
</div>
<div class="agent-detail-pane-title">
{row ? <AgentIcon name={name} /> : null}
<h2 tabIndex={-1} data-details-title>
{name}
</h2>
</div>
{row ? (
<AgentDetail key={name} row={row} actions={actions} withTerminal />
) : (
<EmptyState>no agent named {name} in the swarm</EmptyState>
<>
<h2 class="agent-detail-pane-title" tabIndex={-1} data-details-title>
{name}
</h2>
<EmptyState>no agent named {name} in the swarm</EmptyState>
</>
)}
</div>
);