Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/frontend/packages/swarm-ui
Author SHA1 Message Date
iris
f4421b216f swarm ui: the header's tabs can be dragged onto each other to reorder them
Group tabs now show the grip and drag like agent tabs, and every tab in the strip takes the place of the tab another one is dropped on; the order is kept with the open tabs. An agent's tab keeps its other drag, onto a terminal to split it. moveTab is a pure function with tests.
2026-11-20 18:32:29 +01:00
iris
0a72f212da swarm ui: a terminal keeps 2000 rows and folds a burst of rows in at once
useSwarmTermStream appended each event with [...rows, row] and never dropped one, so a tab on a busy agent grew without bound in memory and DOM and each event cost a copy of the whole list. appendRows (a pure module, tested) folds a batch in with one copy, coalesces as before, and keeps the newest 2000. Events are collected for 50ms and folded in together, so a burst is one render.

The comments that described the old coalescing in useSwarmTermStream.ts's header and in termMsg.ts's TermEnvelope doc named a hook that no longer exists (useLiveStream), so both now point at term-rows.ts, where the rule lives.
2026-11-20 17:18:10 +01:00
iris
da187f8368 swarm ui: a popover stays on the page, and the ssh popover folds its explanations
A popover hung from its anchor and ran off the foot of the window when the anchor sat low. It now goes over the anchor when it fits neither way better below, and otherwise takes the roomier side with its height cut so it scrolls inside itself; the placement is a pure function with a test, and the box places itself again when its content changes size. The ssh popover showed three long paragraphs above its switch: the explainer and the host-key text now sit in a folded how it works section, and the warning and the switch stay visible. Its sections can no longer give the popover a sideways scroll.
2026-11-20 17:15:20 +01:00
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
16a5bff2b1 dashboard: action buttons use the swarm UI's button, with its danger tone and touch height
Button.css moves to @hive/shared, a rename from swarm-ui/src/ui/button/Button.css to shared/src/button/Button.css; the swarm UI's Button imports it from there and the dashboard imports it too. The dashboard's own .btn rules and its eleven per-action colour modifiers are gone: the bulk action buttons, the per-row purge and the selection bar's clear are ui-button, destroy and purge are ui-button-danger, and all of them have the 2.75em height the dashboard buttons were under. The form() and addBulkButton helpers take a tone (danger or default) in place of a btn-* class. The danger variant is the one the confirmations PR adds, identical, so the two merge in either order.
2026-11-20 12:55:25 +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
f29435fcf1 swarm ui: the messages page's feed is a folded card named message log
The messages page had a card called messages under a nav tab called messages, and its feed was the only part of the page open on arrival. The feed is now the folded message log card, like the broadcast and schedules cards above it. Its header carries the connection badge (live, reconnecting, disconnected) so the state shows while it is folded; the reconnect button moves into the bar inside it. The stream keeps running while the card is folded, and opening it scrolls the list to the newest message.
2026-11-20 02:14:26 +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
bb344f780e swarm ui: the swarm page's cards are one gap apart, as on the reports page
The swarm page spaced its cards with a 0.5em bottom margin on a wrapper each; the reports, review, jobs and messages pages use a column with a 1em gap. The swarm page is now a column with the same gap, and the wrappers are gone. Measured in a browser: the cards are 16px apart on both pages, at the same left edge and width.
2026-11-20 00:48:12 +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
c9e6cd2e61 swarm ui: landmarks, a skip link, a page heading, named repeated buttons and a log role on the terminal
The shell now has a main landmark that takes the focus when a page opens, a skip link as the first Tab stop, a labelled nav, aria-current on the active tab, and a hidden h1 with the page's name (no page drew one). The tab close button and tab link get a visible focus ring and a larger target. Repeated edit, remove, delete, fire now, pause, duplicate buttons and the icon-only terminal, expand and close badges get a name that says what they act on (Button gains ariaLabel). A badge can be pressed (aria-pressed), used for the internet modes and the SSH target form, whose fake tablist is now a labelled group. The terminal is a focusable role=log with live announcements off, and a latest badge scrolls back to the newest row once the operator has scrolled up and the terminal has stopped following.
2026-11-20 00:23:07 +01:00
iris
1ca82b3e09 frontend: one glass token pair in place of three copied light and dark blocks
Headers, badges, terminal panes, the message box and the dashboard's bars read --glass-clear and --glass-filter from theme.css; the light palette (colors.css) and the solid-backgrounds setting set them. Each surface keeps a single rule, the per-theme override blocks and the quiet-badge specificity workaround go, and the dashboard and agent page now follow the light palette like the swarm UI.
2026-11-20 00:22:35 +01:00
iris
2a719a52e8 swarm ui: a narrow-screen header, a one-row terminal badge strip and no sideways page scroll at 360px
There was no width media query anywhere. At 360px the header wrapped into three rows covering a third of the screen, an agent card's trailing controls pushed the page 100px wider than the screen, and the terminal's state badges wrapped onto its first rows of text. At 40em or less the brand and the menus share the first header row, the nav is one row that scrolls sideways (its indicator accounts for the scroll), a card's header line wraps and its icon is smaller, and the state badges over a terminal are one row that scrolls sideways.
2026-11-19 22:33:52 +01:00
iris
a1e5855859 frontend: remove the unused vanilla terminal and tab strip, and fix comments that describe removed UI
shared/src/terminal/terminal.js (and its index.js re-export and package export) had no importer: the Preact Row replaced it. The .tail-pill and .load-more-pill rules were only made by it, and the preview's own tail-pill override styled a pill that no longer exists. hive-tab-strip.js had no importer either. Four constants nobody imports are no longer exported. The shared terminal pane section of the web-ui shape doc now describes Row, linkify and markdown instead of the removed factory. Header comments that named removed components (StatusChips, MetaNav, Root.tsx, the cost badge, four folded sections, a detail dialog) now describe the current code.
2026-11-19 21:47:37 +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
9ec67d7a18 swarm ui: a send error sits under the badges with a solid fill
The error over the terminal took the newest rows. It now sits at the top, under the badges, and has an opaque tint so the rows behind do not show through the text.
2026-11-18 20:48:20 +01:00
iris
8cb7f3b6e1 swarm ui: the agent terminal's message box is frosted glass 2026-11-17 06:49:30 +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
maia
07ca0b6100 swarm-ui: say in the revoke checkbox that it deletes the key-backup passphrase; docs: active voice for vale 2026-11-16 22:49:16 +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
7d0641edf6 swarm ui: the card's terminal fills its section 2026-11-16 18:29:51 +01:00
iris
25adb9774a swarm ui: the message box pill has wider margins 2026-11-16 18:24:45 +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
58e7cbf261 swarm ui: the message box is a floating pill with a round send button 2026-11-16 18:09:30 +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
144d958208 swarm ui: format the section list the way treefmt does, and say the todos are not editable in active voice 2026-11-16 01:21:52 +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
76882ec3b8 swarm ui: the command menu follows the keyboard selection 2026-11-16 00:06:59 +01:00
iris
fc650f6af3 swarm ui: a command menu above an agent's message box 2026-11-15 21:37:59 +01:00
damocles
1bfee54414 hive-agent: no hard-coded context window sizes, the window is what the API reports 2026-11-15 21:08:51 +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
cb7a9badf7 swarm ui: the inference dialog's intro names the soft context limit 2026-11-15 17:30:29 +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
91cf4d2ae1 icons for the swarm's own forge accounts, and a default agent icon
The builder, ci-metrics and review-classifier forge accounts get an avatar: an
icon each in a hexagonal frame, the hyperhive logo when one is missing. The
controller sets them with a short-lived write:user token it mints for the
account, since only an account can set its own avatar.

An agent with no icon of its own shows a default agent icon in the swarm UI, a
robot head in a round frame, instead of the dimmed hyperhive mark.
2026-11-15 17:14:16 +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
e9ddfd61ec swarm ui: a log in button in the claude login row of an agent's settings
An agent with no stored login, or one to log in again, can be logged in from
the settings panel instead of waiting for its turns to fail with a login needed
badge first. The button opens the same dialog as the card's.
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