Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/frontend/packages/swarm-ui/test
Author SHA1 Message Date
iris
3be4ec069c frontend: one time wording for the swarm UI and the dashboard, and no HTML strings in the dashboard's busy buttons
fmtAgo, fmtUntil and durationLabel move to @hive/shared/time.js. The swarm UI's util.ts is deleted and its importers (RelativeTime, ReviewRuns, BuildsPage) read the shared module directly. The dashboard's own copies are gone: its fmtAgeSecs (a third phrasing, used for two status lines) becomes the shared fmtAgo, and the dashboard util.js lost fmtAgo, fmtElapsed, epochSec and truncate, which nothing called. asyncBtn and the bulk action buttons mark themselves busy with markBusy: a spinner node before the label and aria-busy, in place of replacing the button's innerHTML with a string (and the label, so the button changed width and lost its name). The el() helper loses its html attribute.
2026-11-20 17:02:32 +01:00
iris
62551e004e swarm ui: an agent's named ssh connections show in its ssh popover, with add, replace and remove
The ssh popover of an opened agent card gets a folded connections section: a table of the agent's named connections (name, user@host:port) with edit and remove, and a form that saves one. The list is read on the first open; a save is a PUT that replaces a connection of the same name, so the button reads replace and a line names the connection when the name exists; remove asks first. The controller's refusal shows under the form as it comes, and the section says the connections are inactive while ssh is off. The request building is in ssh-connections.ts with a test; swarm-ui.md describes the section.
2026-11-20 09:11:03 +01:00
iris
844fb0a219 frontend: one dismiss rule for menus and popovers, menu keys, and dialog and side panel focus
useDismiss (shared) closes a floating box on a press outside or Escape: the press is seen in the capture phase, a press in an open modal dialog is not outside, Escape yields to a modal dialog the box is not in, and a box in a dialog closes alone. Popover, Dropdown, SettingsMenu, LinksMenu and UserMenu use it in place of five copies with different rules; Escape returns the focus to the button. Dropdown takes the focus on open and moves with the arrow keys, Home and End. The link, account and settings popovers drop role=menu (they had no menu keys) for a labelled group. Dialog no longer reports a close the caller asked for, ignores a drag that started inside and ended on the backdrop, and has a 2.75em close button. Popover uses the shared clampLeft. The dashboard's side panel is inert while closed, takes the focus on open and gives it back, and no longer claims aria-modal; hive-dialog gives the focus back on close.
2026-11-20 02:20:58 +01:00
iris
c3e24fe2c6 swarm ui: ask before actions that cannot be undone, with a danger button and a useConfirm hook
Button gains a danger variant and an autofocus prop; ConfirmDialog gains danger (red confirm, focus on cancel). Destroy, delete linked account, delete claude login, remove schedule and delete flow use it. New useConfirm hook asks from inside a handler (await confirm({...})) without a dialog's state at the call site. It now guards: removing a swarm-wide egress domain, removing a domain for every agent from an agent's popover, removing a stored API-key environment, firing a schedule now, moving an agent's internet to a looser mode, the /clear message, and reload over unsaved instructions (replacing window.confirm). The review try-out's button is now called push a branch for a PR, since it pushes a branch and does not open one, and asks first. loosensInternet is a tested helper.
2026-11-20 02:13:23 +01:00
iris
679d2ee420 swarm ui: show agent freshness and failures where the operator looks, page titles, try again, and stale-data notes
An agent card shows its freshness (stale with the last report's age, never reported, not in swarm identity) when it is not fresh, so the status filter has a visible reason. A failed state change shows its reason in a panel under the card, and a failed cancel shows its reason in the badge, instead of a hover title. Pages can set their title (usePageTitle) and the flow editor does, so several editor tabs differ; the 404 links home. The claude login dialog offers try again after a failure, announces its wait, and has a per-agent field id. The create-agent tabs go forward again as far as the operator has been, but not past a step that is invalid now (lastReachableStep, tested), and the disabled next and create buttons say why in a hint they are described by. usePolled reports when the last live answer arrived, and StaleNote says how old a list is under a failed refresh, or that it is the answer saved from the last visit, on the alerts, builds, review runs, hives, schedules and flows lists.
2026-11-20 00:44:01 +01:00
iris
e4cfac6926 frontend: root test and typecheck scripts, and tests for the review runs wording and the terminal drag
npm test and npm run typecheck now run in every workspace that has them (the repo root had only build and clean). New tests cover RunsTypes (labels and tones for every outcome, the classification count) and termDrag (what a drag carries and how the hover reads it). instructions.ts cannot be imported by a test under Node because of its .js specifier for unified-diff.ts, so it is not covered, and the conventions doc says so.
2026-11-20 00:28:04 +01:00
iris
3d88108c4f frontend: light-theme terminal contrast, theme before first paint, color-scheme, motion and focus defaults
Light theme: the terminal and code blocks sat on --crust, a mid grey there, so text was 2:1 to 3:1. They now use --code-bg, which keeps 95% of a light palette's background (58% of the dark one's, as before); scrims and shadows keep --crust. Dark --muted goes from 4.44:1 to 4.72:1 on --bg. The stored theme and motion overrides are set by a blocking boot script in the head (the page allows no inline script), so a light OS no longer paints light before the dark default; a test keeps its keys in step with the shell. color-scheme follows the palette, so native controls and scrollbars match a forced theme. Five infinite animations (dashboard banner, container icon, pending badge, warn banner, spinner) now honour reduced motion and the in-app motion setting, ConnectionDot uses the same three-rule shape as the others, and the hive-warn element honours the system preference. Keyboard focus gets a default ring, and the cancel button and pane divider keep a visible one.
2026-11-19 20:45:18 +01:00
iris
d4dc8b48b1 swarm ui: the context limit zones line up with their handles and legend
The zones were drawn by percentage of the full track, but a range input's thumb travels its own range less one thumb width, and the range starts at 5. So the colour edges sat off the handles. The zones now follow the thumb's travel (a tested helper in soft-context), and the Firefox thumb has the same size as the other. The legend bars had no colour either, as the item rule reset the border colour; their rule is now more specific.
2026-11-18 23:22:03 +01:00
iris
3a846c8c45 swarm ui: the terminal's status badges overhaul
The connection is a light on the agent's icon instead of a "live" badge, the
model and the effort are one badge, the context badge has an icon, subagents
and a new bash tasks badge are an icon and a count, and an agent's tab shows a
drag grip on hover.

It also removes two things the overhaul replaces: the cost badge, and the
"split" badge with its menu in group panes (splitting is by dragging a tab, or
from the subagents list).
2026-11-17 06:49:03 +01:00
iris
8ca6317356 hive dashboard: an agent's name links to its terminal in the swarm UI 2026-11-16 23:19:45 +01:00
iris
857b175a74 swarm ui: show thinking is a toggle of its own, apart from the developer details 2026-11-16 20:52:58 +01:00
atlas
3d7541c0af sign ssh certificates on demand from ssh itself, warn before setup, say what to do when a host key changes 2026-11-16 20:31:18 +01:00
atlas
e621397252 swarm ui ssh row with target snippets, docs for the per-agent switch 2026-11-16 20:31:18 +01:00
iris
2fe5759cdf swarm ui: the send button's off rule is a tested function 2026-11-16 18:12:01 +01:00
iris
2f3c9253bf swarm ui: a lone /word goes without the space completion leaves 2026-11-16 17:53:58 +01:00
iris
db924d9e77 swarm ui: a fire now button on each schedule 2026-11-16 11:29:23 +01:00
iris
0db9868eee swarm ui: an unset fresh-session handle does not hold the soft handle up; docs vale fixes 2026-11-16 11:04:04 +01:00
iris
b16074e76b swarm ui: one slider for the fresh-session threshold and the soft context limit 2026-11-16 10:50:13 +01:00
iris
fb9d4b5040 swarm: /clear starts an agent's next turn on a fresh session 2026-11-16 03:21:20 +01:00
iris
fa2a75d499 swarm ui: an open todos section on the agent card 2026-11-16 01:21:52 +01:00
atlas
1edeb5c55d agents get a per-agent repo limit in their permissions record, orgs are locked
max_repos (default 0, 0..=100) lives in the agent's agent-permissions record and is edited on its permissions panel. The controller applies each agent's own value as max_repo_creation at CreateForgeUser and to existing accounts on change, restart and every five minutes; agent accounts may not create organizations.
2026-11-16 01:21:25 +01:00
iris
fc650f6af3 swarm ui: a command menu above an agent's message box 2026-11-15 21:37:59 +01:00
iris
5de20f31dd swarm: list an agent's bash tasks from their published status
GET /api/agents/{name}/bash-tasks reads the agent's keys of the bash-task-status
bucket and reports each task's state, command and times, with a live task whose
daemon stopped reporting as stale. The swarm UI shows them in a background tasks
section of the agent card, running ones first. The task output stays unread.
2026-11-15 19:51:37 +01:00
iris
e9af6cf2c7 swarm ui: a soft context limit field in an agent's inference settings
A whole percent from 5 to 100 of the model's context window, sent as
soft_context_percent next to max_subagents. The inference row shows it, the
edit dialog and the create form take it, and an archetype can carry it.
2026-11-15 17:30:29 +01:00
iris
c56faf9dff swarm ui: say what a subagent's age counts from, and the list's two lookup passes
A running status shows 'running since', a stale one shows no age, since its
time is when the run began. The reference now says the status reads and the row
lookups are two passes, so the list waits up to four seconds in all.
2026-11-15 17:17:10 +01:00
iris
e9bc28fe2f swarm: list subagents from their published run state
The subagents list reads each subagent's status from the subagent-status
bucket and reports its state, when it began and the exit status. A subagent
with no status keeps the newest-row lookup, so an older daemon lists as before.
The swarm UI uses the state when there is one and the row-age guess otherwise.
2026-11-15 17:17:10 +01:00
iris
78e063e78c swarm ui: the login button's wording is a tested function
The label that switches between log in and log in again moves next to the
stored login's other wording, so it has a test.
2026-11-15 16:13:15 +01:00
iris
c42db99f27 swarm-ui: the badge tooltips are built by a tested helper 2026-11-12 10:37:30 +01:00
atlas
5443c1c9ba an archetype flow can be customized for one agent 2026-11-11 22:57:02 +01:00
atlas
68c24643f6 archetype flows behave like the built-ins: switch off per archetype or per agent, board cards, duplicate
The document's disabled list takes archetype:<archetype>/<flow> (off for every member) and the same with @<agent> (off for one member); a key naming nothing is ignored. GET /api/notify/flows lists the archetype flows with their members, the board draws a card for each with a switch, a checkbox per agent and duplicate, and the dry run counts their hits. The flows keep following the archetype.
2026-11-11 21:40:17 +01:00
iris
6875a4f0f8 swarm-ui: set the review classifier's keys from the classifier settings
The classifier's Anthropic and ACP provider keys were written by hand in the
secret store's UI. The controller now stores them: GET
/api/review-classifier/keys says whether each is set and when it changed, and
PUT /api/review-classifier/keys/{runtime} writes one. No route answers a key.

The controller's store policy gains create and update on the two leaves with
no read of their values, and a metadata read for the set state. The swarm UI's
classifier settings card gets a key form beside the settings, saved apart
because it goes to the secret store.
2026-11-11 19:01:01 +01:00
damocles
748ef2da08 hives report an agent being updated: its status shows updating from the update's stop until the container is back up
A hive marks an agent updating when StopForUpdate stops its running container and clears it when the tail Reconcile or Start settles it, success or failure. The flag rides in the agent status snapshot (absent when false, so older readers and documents are unchanged), the status publisher sends a change at once instead of at the next sweep, and the swarm UI card shows an updating badge.
2026-11-11 16:51:42 +01:00
atlas
5233259b3b ruth is created from a ruth archetype that runs sonnet 2026-11-11 12:24:40 +01:00
iris
53224d877e swarm ui: the create form picks an archetype from tiles with their icons
An archetype's meta gets an optional icon, the SVG text (at most 16 KiB), which
the controller checks, stores and serves on GET /api/archetypes. The built-in
archetypes read theirs from nix/archetypes/icons. The create form shows each
archetype as a tile with its icon and name, laid out like the broadcast screen's
agent tiles, in place of the dropdown, and draws the SVG through an img data URL.
2026-11-11 10:09:50 +01:00
atlas
a5470d82ae an archetype's prompt prefills the new agent's agents.md in the create form 2026-11-11 02:16:22 +01:00
iris
356390befb swarm ui: the agent detail leaves out the config repo link for an archetype agent
An agent built from an archetype has no config repo on the forge, so the link
404ed. It shows again once the agent is turned into a custom one.
2026-11-11 01:48:37 +01:00
iris
cf5746188a review classifier: a setting makes the PR review list only the failed rules
failures_only (off by default, also for a stored document without it) makes the
review the classifier posts on a PR list just the rows that failed their rule,
or say that no check failed on an approval. A review with no clean verdict and
a try-out keep every row. The classifier settings form gets a checkbox for it.
2026-11-11 01:39:05 +01:00
iris
818d41eef3 swarm ui: the status age helpers live in status-fields.ts
StatusMessage.tsx and statusMessage.ts differ only by case, which the esbuild step in the nix build can't read on a case-insensitive builder.
2026-11-11 01:25:15 +01:00
iris
0547081138 swarm ui: the agent's status message shows how long ago it was set
The card and its detail showed the message alone, so a message from an hour
ago read like the current one. Both now add the age, (5m ago), which ticks
like the other relative times. An agent with no message still shows a dash.
2026-11-11 01:25:15 +01:00
atlas
e5c55257f8 a hive-side pause holds against the swarm's declared state until an operator resumes
the harness writes the reason into the pause marker when it pauses itself and reports it as paused_by_hive in its turn-state header. swarm-controller declares such an agent paused (only if declared up) and shows the reason on the agents status row and the swarm ui card.
2026-11-10 06:49:16 +01:00
iris
5f5933fde9 docs, swarm ui: a deleted login now logs the agent out, and the dialog and docs say so
With the harness poll, an agent that holds a session logs out within 5
minutes of its stored login being deleted. The confirmation and the
claude-login page said the agent keeps its session.
2026-11-09 23:03:08 +01:00
iris
71a4d1d255 swarm ui: the PR report's approvals column filters on whether the rule is met
The report had an approvals column (1/2) and a separate approved column.
They are one fact, so approvals now carries the filter, complete or missing,
and the approved column is gone.
2026-11-09 22:44:10 +01:00
iris
cac9b40714 swarm ui: the delete confirmation says the agent keeps its session
The dialog only said the agent has to log in again, which reads as a logout.
It now says the agent is not logged out and keeps its current session, and a
delete that succeeded shows the empty row at once instead of waiting on the
re-read.
2026-11-09 22:22:29 +01:00
iris
7dd147adb4 swarm ui: show when an agent's claude login was stored, and delete it
The agent's settings get a claude login row: when the swarm stored the
login, read by the minter from the leaf's metadata, or that none is, with a
delete that removes every version after a confirmation. New minter steps
(status, delete), controller routes (GET claude-login, DELETE
claude-login/stored) and a read and delete grant on the leaf's metadata,
pinned in the module-eval check.
2026-11-09 22:22:29 +01:00
iris
73f875eab8 swarm ui: a stored claude login closes the dialog and shows a toast
The login dialog stayed open with a success line after the code was
accepted, though nothing is left to do in it. It now closes and a toast
says the login is stored. The toast is a new swarm-ui primitive: a short
note raised with showToast, rendered by a ToastHost at the app root, gone
after a few seconds or on click.
2026-11-09 20:50:32 +01:00
iris
944fd5b726 swarm ui: a diff column on the pull requests card, and "approved" as its header
The pull requests card gets a diff column, the lines a PR adds and removes
(`+120 −8`), sortable on the total. The controller takes the counts from the
forge's pull request list, so no call is added. The column that said "has all
approvals" is now headed "approved".
2026-11-07 11:46:05 +01:00
iris
f633963b77 swarm ui: a pull requests card on the reports tab
The reports tab gets a "pull requests" card under the issue report. It lists
the open PRs of every repo, or of one picked in a repo select, with the
columns a reviewer or merger filters on: author, labels, requested
reviewers, base branch, WIP (the forge's draft flag), approvals against the
base branch's protection rule, has all approvals, conflicts, protected base
and CI. Every column sorts, the small-set columns filter by picking values,
and the browser keeps the filters and the repo. No filter applies at first.

swarm-controller resolves each row so the page makes no calls of its own:
GET /api/pr-report and GET /api/repos/{org}/{repo}/pr-report. The required
approvals come from the first matching branch protection rule (an
unprotected base asks for none); an approval counts when it is the
reviewer's latest decision, on the current head, neither stale nor
dismissed and official.

A free-text table cell gets a minimum width, so a table with many columns
scrolls sideways instead of wrapping a title to a word a line.
2026-11-07 11:46:05 +01:00
iris
cffe8895df review classifier: the most classifications a run carries is a setting
The limit was a constant of ten in swarm-wire, so a repo with eleven rules
could not be reviewed and nothing short of a rebuild changed it. It is now
`max_classifications` in the classifier settings, beside
`max_concurrent_reviews`: 1 to 1000, ten until set, and a document stored
before the field decodes with the default. The classifier settings form in
the swarm UI gets a "rules per review" field, and the try-out's add button
stops at the saved limit instead of a hard-coded ten.

The controller checks a try-out, and a requested review's rules file, against
the setting where the run starts. The rules file itself may hold up to the
1000 the setting allows, so raising the limit needs no change to a repo.
A review whose rules exceed the limit posts a no-verdict comment saying so.

A run's reply deadline was a constant that covered ten classifications, a
minute plus three each. It is now computed from the run's own size, so a
bigger run waits as long as it needs and a default-sized one still waits 31
minutes. The classifier's answer window in the queue permissions covers the
biggest run the setting allows.
2026-11-07 11:32:04 +01:00
iris
5d5df29687 swarm-ui: shared code leaves page folders; SectionHeading and Preformatted replace per-page copies
durationLabel moves to util.ts, termPaths to agent/terminal/term-paths.ts,
StateBadges and tokenTotal to agent/state, and TryOutResult to
pages/review-common, so the builds, runs and agent pages no longer import
across page folders. SectionHeading is the body-size section heading the
create form and the egress card each styled; Preformatted is the scrolling
text block of the builds tail and the AGENTS.md view, which now share one
chrome and are both keyboard-scrollable. The components page shows both.
2026-11-06 19:09:18 +01:00
iris
811b23cd6b swarm-ui: forms share one submit flow, result line and field column
useSubmit holds the idle, sending, done and error state and the request
flow that six forms each wrote out; FormResult shows the success line and
the problem panel; FormStack is the column the link, claude-login,
inference and limits forms each styled by hand. The create-agent, link
account, backend-env and agent-input forms use the submit flow; the link,
claude-login, inference and limits forms use FormStack.
2026-11-06 19:00:01 +01:00