Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/frontend/packages/swarm-ui
Author SHA1 Message Date
iris
32a4821cb4 swarm-ui: an open dropdown closes only on a scroll that moves it 2026-10-25 17:19:51 +01:00
iris
a2e8a2bda0 swarm-ui: dropdowns open a themed list of their own instead of the browser's
SelectField and the refresh-interval picker are built on a new Listbox, a
select-only combobox: a button that keeps focus and a listbox in the top
layer, so it works the same in every current browser, is not clipped by a
scrolling ancestor and shows above a modal dialog. Keys, type-ahead and
placement are pure functions with tests. required becomes aria-required, as a
button has no native form validation.
2026-10-25 17:15:04 +01:00
atlas
dd2f0d3ece let notification flows start from submitted pull request reviews 2026-10-25 16:56:12 +01:00
iris
31f8a521e0 swarm-ui: the broadcast composer is its own folded card above the messages card
Replaces the broadcast button in the messages card's header: a Disclosure
titled broadcast, folded by default, over the messages card. The composer is
built on the first open and kept, so it polls the agent list only once used.
The broadcast page wording in broadcast-types.ts and its test now says
composer.
2026-10-25 16:28:26 +01:00
iris
6cf89755e2 swarm-ui: broadcast is a composer on the messages page, not a tab of its own
The messages page gets a broadcast button that opens the agent picker and
message box above the stream, so a sent message shows up in the list below
it. The broadcast route and nav tab go, with no redirect: the page is now the
composer, BroadcastComposer, in the messages page.
2026-10-25 16:28:26 +01:00
atlas
711e413901 swarm-ui: tooltip on the inert wanted badge says to create the agent at swarm level; docs note destroy needs it too 2026-10-25 16:09:14 +01:00
atlas
716290e4d2 swarm-controller: state route refuses an agent the swarm has not declared on that hive
A placing state is accepted only for an agent declared or queued on the hive; anything else gets 404 telling the caller to create it at swarm level. swarm-ui's wanted badge no longer offers a first declaration for an undeclared row.
2026-10-25 15:58:25 +01:00
iris
cd41e1d510 swarm-ui, hive dashboard, agent page: one profile menu with the signed-in user, avatar and authelia links
The swarm UI's user menu moves to @hive/shared and takes the whoami URL and
authelia's URL as props; the swarm UI keeps a thin wrapper, and the hive
dashboard and the per-agent page mount the same component. The dashboard's
nginx vhost proxies /api/whoami to authelia (the agent page is served from
the same vhost), and hive-c0re's state carries authelia_public_url, set from
services.hyperhive.swarm.authelia.url. The agent page shows the menu only
behind the gateway.
2026-10-25 15:25:20 +01:00
iris
10b8422d93 swarm-ui: the state row offers reconnect when its stream closes, and says no report yet 2026-10-25 15:07:39 +01:00
iris
705160c0fd swarm-ui: move the terminal preview's state badges into a state row of the agent details table
The small preview in the detail panel keeps only the connection badge and
expand, and no longer follows the agent's state stream; the full terminal
tab keeps all its badges. The table gets a state row with the turn state, a
paused badge, and the context and billed tokens (not the model, which the
inference row shows). The preview's top padding drops to one badge row, and
the showHeaderBadges prop goes since the full-tab mount is now the only one
with badges.
2026-10-25 14:52:57 +01:00
iris
b6da2bc9d0 swarm-wire, swarm-ui: the flow schema lists the values a field takes, and the editor picks them instead of asking for typed names
The schema's event fields gain values, a values_from marker (agents, repos)
and a closed flag; a node field gains the marker and the flag. kind is now
listed as issue and PR, what the router sends. The flow editor shows a
dropdown where the list is complete, suggestions where it is only examples,
and a plain box where there is none.
2026-10-25 12:14:46 +01:00
iris
81fd4466a5 swarm-ui: say 1 hit, not 1 hits, in a box's screen-reader label 2026-10-25 11:00:38 +01:00
iris
404d8334aa swarm-ui: preview a draft flow's hit counts in the editor with the dry-run route
The editor's preview button posts the draft to POST /api/notify/dry-run and
puts each box's hit count on the canvas; any edit hides the numbers. Boxes of
kind request_reviewer label themselves "reviewer", so the long kind name no
longer runs into the hit count shown beside it.
2026-10-25 11:00:38 +01:00
iris
6e7b5f84e9 swarm-ui: give the new-flow draft a route no flow id can take, and drop the dead hit-count rule
/notifications/new could be a saved flow's own page, so the draft now opens at
/notifications/draft/new, which has a segment more than any flow's route. The
placeholder id no longer needs reserving. The .notify-node-hits rule styled the
removed tree rows; nothing renders it.
2026-10-25 02:05:54 +02:00
iris
d0a55502a8 swarm-ui: draw notification flows as graphs in the list and make a new or copied flow a draft until saved
The flows list draws each flow as the editor's graph, read-only and with the
dry run's hit counts in the boxes, in place of the indented tree. A box's line
of text is cut by the browser at the box's edge, so it no longer runs out of it.

create flow (a primary button beside the refresh interval) and duplicate open
the editor on an unsaved draft at /notifications/new, with ?from= naming the
flow to copy; the flow is made by save, under an id taken from its name. Edit
and duplicate are buttons in the flow's header row. The editor's head and
inspector are laid out as sections.
2026-10-25 02:05:54 +02:00
iris
b93eaaff51 swarm-ui: fix the stale refusal comment, guard the create dialog's submit, say what create another keeps
The refusal comment still described collapsed sections the dialog no longer
has. The form's submit now returns while a create is in flight. The docs say
create another keeps only the hive.
2026-10-25 01:44:24 +02:00
iris
339da0aebe swarm-ui: make agent creation a five-step dialog with a fixed header and footer
The create dialog was one tall form that scrolled as a whole, so its header
and button moved out of view. It is now steps you go through in order:
identity, instructions (AGENTS.md in a box of its own), permissions,
resources and inference, then a summary of what will be sent and what the
agent creation queues, where create is. The header, step tabs and footer stay
put and only the step's own fields scroll. A refused AGENTS.md text sends the
dialog back to its step. The request is unchanged.
2026-10-25 01:40:20 +02:00
atlas
f0a80c9812 notify router: bound the deliveries log append, note doubled retry rows 2026-10-25 01:26:25 +02:00
iris
78c48272ee swarm-ui: edit an agent's permissions on its detail panel
The detail panel had editors for inference, instructions, resource caps and
accounts, but nothing for the permissions the swarm grants, which could only
be set at create time or with swarmctl. A permissions row shows the grant
(the default set, none, or the list) and an edit dialog ticks the catalogue
from GET /api/permissions and saves with PUT /api/agents/{agent}/permissions.
Ticking exactly the default set sends the DELETE, as the create form sends no
list for it.
2026-10-25 01:18:26 +02:00
atlas
ed1fd053e7 notify router: deliveries log, dry-run hit counts, api and page 2026-10-24 22:13:07 +02:00
atlas
0b1669a364 request the review classifier's review when a PR's head moves
The router gets a request_reviewer node and a pull_request_sync source;
the built-in head-classifier flow asks swarm-controller, over
$SWARM.router.sink.request-reviewer, to request review-classifier on
every push, unless its review of the head already stands. The controller
subscribes to pull_request_sync on its pull-request hook and answers
the router; nats-auth grants the router the publish and the controller
the subscribe.
2026-10-24 17:23:36 +02:00
iris
68e289fff5 swarm-ui: rewire a notification flow by drag or keyboard
The flow editor can now change a flow's shape on the canvas, not only
through the inspector's fields:

- drag a box onto another to move it and its branch there; a drop the
  save would refuse shows the target dashed red and gives the reason;
- a palette of node kinds adds a node below the picked box on click, or
  below any box it is dragged onto; it offers what the controller lists;
- arrow keys walk the tree, M picks a box up and Enter drops it under
  the focused one, Alt+Up/Down reorder a node among its siblings, Delete
  removes a branch; focus follows the edit;
- each box with siblings says when it runs, and the inspector can move
  it earlier or later, since the router runs children in edge order;
- request_reviewer is a second leaf kind beside todo, with a reviewer
  field;
- leaving with unsaved edits asks first, also for in-app links and the
  back button (a router hook runs navigation past a page's guard).
2026-10-24 15:08:48 +02:00
iris
fb8aa23e66 swarm-ui: a todo switched from clear to upsert drops its prefix flag 2026-10-24 14:40:39 +02:00
iris
f28e1e9063 swarm-ui: edit a notification flow on a canvas
A custom flow opens at /notifications/<id>: its nodes drawn left to right
(source, then matches, then todos), and a panel to edit the picked node: the
source's events, a match's conditions, a todo's recipients, op, key and text.
Add a match or todo below a node, move a branch under another match, or remove
it; an edit the controller would refuse (a todo with children, a second
parent, a cycle, over the node or depth cap) is turned away with the reason.

Edits stay in a draft until save, which sends the whole document at the
revision read. A stale revision is told apart from a refused document: the
editor offers to reload or to keep the draft on top of the latest. The form
choices come from the controller's schema when it sends one.

The list page gains edit and duplicate on custom flows, duplicate on the
built-ins, and a new-flow box; a new flow's id avoids the built-ins' too.
2026-10-24 14:40:39 +02:00
iris
d19bd83aa5 swarm-ui: draft edits for the notification flow editor
Pure edits on a flow (add a child, remove a branch, move a branch, replace a
node, new and duplicate flow) that refuse what the controller's tree rules
would, plus the save request and what its status means. Nothing uses them
yet: the editor page that does comes next.
2026-10-24 13:46:03 +02:00
atlas
ada364a482 notify flows: refuse unknown placeholders and require the revision read on every save 2026-10-24 12:12:27 +02:00
atlas
0512862b3d swarm-ui: show the notification router's flows and switch built-ins off 2026-10-24 12:12:27 +02:00
iris
31b7452e56 swarm-ui: let a closed stream reconnect and a failed caps read retry
When the server answers an event stream with an error status the browser
gives up and the badge stayed on disconnected with nothing to press. The
terminal, its state header and the messages page now offer a reconnect,
and the one rule for the state after an error moved into a tested helper.
The resource caps panel gets a retry beside its error, and its loading
state announces itself.
2026-10-22 07:13:32 +02:00
iris
9ae56e0fec dashboard: inline the frost background fallback and fix a stale flow-page reference
The frost variable was defined only in the removed flow stylesheet, so its
fallback always applied. The messages page header no longer points at the
flow page.
2026-10-21 23:57:37 +02:00
iris
acf82beba3 swarm-ui: add CheckboxField and use it for the issue report toggle and the account delete option 2026-10-21 23:56:30 +02:00
iris
46a6fc36d8 swarm-ui: say when the hive or permission list failed to load, and name the permissions group 2026-10-21 23:33:54 +02:00
iris
8c67ac01fe swarm-ui: show, sort and filter the hive domain by one value, say when the roster is empty, keep the schedule agent picker current
The domain column showed a dash unless a hive had a dashboard but sorted
and filtered on the domain alone, so rows looked mis-sorted. It now shows
the domain as text when there is no dashboard to link. An empty hive
roster says so. The schedule form's agent names reload with the schedules
and the form says when that load failed.
2026-10-21 23:22:22 +02:00
iris
885c051b33 swarm-ui: ignore a saved table filter whose column is gone 2026-10-21 23:15:44 +02:00
iris
8917ba27b6 swarm-ui: one polled-resource hook for the refreshing pages
Each polling page repeated its own fetch-and-set code on a fixed timer,
so a slow answer could be overtaken by the next tick, an older response
could overwrite a newer one, and nothing aborted a request when the page
went away.

usePolled skips a tick while a request is in flight, aborts on unmount
or refresh, ignores answers from dropped requests, and keeps the last
good data under an error. The alerts, hives, agents, schedules, builds,
review runs and broadcast pages and the subagent list use it.
2026-10-21 23:05:35 +02:00
iris
9338496e24 swarm-ui: unit test the popover focus helpers
The helpers take the active element and body as arguments, so the cases
(focus into the box, keep a control that took focus, restore only when
focus was lost, find the trigger) run under node's test runner.
2026-10-21 23:01:56 +02:00
iris
d4f58b3667 swarm-ui: make popovers and table filters usable from the keyboard
Opening a popover or a table filter now moves focus into it, closing one
that left focus on nothing puts it back on the trigger, and the triggers
carry aria-haspopup and aria-controls. The shared Popover covers every
caller; the table filter popover, which has its own portal, does the
same.
2026-10-21 23:01:56 +02:00
iris
f6acc1e976 swarm-ui: keep the issue report's table, errors and repo filter consistent
A failed report dropped its error under the previous repo's rows, the
repo list and the report shared one error slot, a remembered repo that
the list lacked left the select on all repos, and the report URL did not
encode the repo path. Each request now has its own error, a failed report
clears the rows, the remembered repo keeps an option, and the path parts
are encoded.
2026-10-21 22:58:51 +02:00
iris
e727774dc8 swarm-ui: show agent panel read failures as text and keep loaded data
Inference, resource caps and linked accounts showed a failed read as a
badge with the reason in a hover title, which keyboard and touch users
cannot read. They now use ApiErrorPanel, and a list that already loaded
stays on screen under a failed refetch.
2026-10-21 22:57:51 +02:00
iris
ef156d9d23 swarm-ui link-account forms: keep the sent name, drop secrets, one word for forge
The success line of both link forms read the live text field, so editing
the name after a link changed the sentence. The result now carries the
name that was sent.

The matrix form held the typed token and password after a failed submit,
and kept them across a switch of credential mode. It now drops them when
the request ends and when the mode changes.

The linked-accounts list and the delete dialog said forgejo where the
link menu and forms say forge; they now say forge.
2026-10-21 22:06:49 +02:00
iris
e03bd4caa4 swarm-ui try-out: stable live region, reasons for disabled buttons
The running line is a live region whose text changed every second, so a
screen reader announced the counter again each time. The sentence is now
stable and the elapsed seconds sit outside it.

The run and open-a-PR buttons point at the hint that says why they are
off, and add-a-classification says why it is off at the cap.
2026-10-21 21:45:05 +02:00
iris
e81aaef7e3 swarm-ui: give a header tab's close button an accessible name 2026-10-21 21:31:11 +02:00
iris
16c9e0ae3b swarm-ui: keep the table filter popover inside the window 2026-10-21 21:31:00 +02:00
iris
c2f17799fc swarm-ui: only the newest start's late stop ends a claude login 2026-10-21 21:14:53 +02:00
iris
41cc2f5e8e swarm-ui: stop a claude login whose dialog closed while it was starting 2026-10-21 21:14:53 +02:00
iris
393213054d swarm-ui: close a subagent terminal when its subagent leaves the list 2026-10-21 21:12:00 +02:00
iris
3fe53fe323 swarm-ui: try-out copy says the run appears under recent runs 2026-10-21 21:01:43 +02:00
atlas
266be0a5db swarm-wire: take wanted's wire types 2026-10-18 22:50:02 +02:00
atlas
6ea13c02e3 move the review classifier, agent login and inference types into swarm-wire 2026-10-18 19:27:30 +02:00
iris
bdeec3f744 swarm-ui: key message rows on an arrival id and follow the tail on it
At the 2000-message cap the count stops changing, so the page stopped
following the newest message, and every row's index key shifted on each
arrival, remounting all of them. Each message now gets an id when it
arrives; the rows key on it and the scroll follows the newest id. Rows
are memoised on the message, and the events of one frame join the list
in a single update.
2026-10-18 18:39:11 +02:00
iris
447498fef7 swarm-ui: add a messages page for the swarm-wide message feed
/messages reads GET /api/messages/stream. A history select picks the window
(live only up to 24 hours) and a filter keeps the messages whose sender or
recipient contains the text. Each message is a row of the terminal list an
agent's terminal uses: one summary line with the time, the two parties and
the start of the body, and the whole body under it. The list follows the
newest message and holds the last 2000.

The feed has no event id, so a reconnect sends the history again. The page
empties its list each time the connection opens and fills it from the
replay, where the terminal stream hook, which keeps its rows across a
reconnect, would list every message twice.

The stream URL, filter, cap and row logic is in its own module with tests,
and docs/swarm/ui.md describes the page.
2026-10-18 18:19:30 +02:00