Watch
0
0
Fork
You've already forked hyperhive
0

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.
This commit is contained in:
iris 2026-11-19 18:42:34 +01:00 • committed by mara
commit c3e24fe2c6

View file

@ -28,6 +28,15 @@ scrolls sideways. Nothing makes the page itself scroll sideways at 360px.
A dialog grows to fit its content, up to 64em or nine tenths of the window, whichever is
smaller; short confirm dialogs stay short.
An action that can't be undone asks first, in a dialog with a red confirm button and
the focus on **cancel**, so a stray **Enter** doesn't confirm it. These ask:
destroying an agent, deleting a linked account or a claude login, removing a schedule,
a flow or a stored API-key environment, **fire now** on a schedule, removing an
allowed domain (swarm-wide, or for every agent from an agent's popover), moving an
agent's internet to a looser mode, sending `/clear` as a message, reloading over
unsaved instructions, and **push a branch for a PR** on the review try-out. A page
asks from inside a handler with the `useConfirm` hook, with no dialog state of its own.
| 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 |
@ -338,11 +347,11 @@ again. The page saves no classification and no result, and a run posts nothing
to the forge; like every table in the UI, the result table remembers its column
filters in the browser. It shows no token counts, cache counts or cost.
When a classification answers the way you want, **open a PR** proposes the
classifications on the page to the repo. The classifier's forge account pushes
a branch that adds them to the repo's rules file, with you as the commit's
author, and the page links to the forge's page for opening the PR from that
branch, where you log in as usual. A classification named like one the file
When a classification answers the way you want, **push a branch for a PR** (it asks
first) proposes the classifications on the page to the repo. The classifier's forge
account pushes a branch that adds them to the repo's rules file, with you as the
commit's author, and the page links to the forge's page for opening the PR from
that branch, where you log in as usual. A classification named like one the file
already holds replaces it, and the file's other rules stay. It needs no PR
number. If the forge has no account of yours yet, log in to the forge once
first. If the classifier's account may not push to the repo, the page says so: