hive dashboard: bulk pause + resume in the selection bar

Mechanical addition to the existing bulk-action framework
(renderSelectionBar/addBulkButton, swarm.js) -- two per-agent actions
already exist (POST /api/pause/, /api/resume/, see hive-agent-menu.js),
this just gives the selection bar the same all-or-nothing enablement
rule the other six bulk buttons already use (pause enabled only when
none of the selection is already paused, and vice versa for resume).

.btn-pause reuses .badge-paused's yellow so the trigger and the
resulting state pill read as one colour; .btn-resume is green like
.btn-start (both are "go" actions). Docs updated to list both in the
Selection bar reference.
This commit is contained in:
iris 2026-08-24 11:37:04 +02:00
commit 4af890f01d
3 changed files with 36 additions and 7 deletions

View file

@ -1070,13 +1070,13 @@ all no-ops and the layout reads like a plain flat list.
## Selection bar
Bulk actions (`R3ST4RT` / `ST0P` / `ST4RT` / `R3BU1LD` / `DESTR0Y` /
`PURG3`) live here rather than as per-card buttons — see **Container
row** above. Clicking an agent's icon toggles its selection (an
in-memory `Set<name>`); `Esc` or the bar's `✕ clear` button drops
everything. The selection persists across tab switches in-memory —
the bar just hides on non-SW4RM tabs since other tabs don't show the
agent cards needed to cross-reference.
Bulk actions (`R3ST4RT` / `ST0P` / `ST4RT` / `P4US3` / `R3SUM3` /
`R3BU1LD` / `DESTR0Y` / `PURG3`) live here rather than as per-card
buttons — see **Container row** above. Clicking an agent's icon
toggles its selection (an in-memory `Set<name>`); `Esc` or the bar's
`✕ clear` button drops everything. The selection persists across tab
switches in-memory — the bar just hides on non-SW4RM tabs since other
tabs don't show the agent cards needed to cross-reference.
When one or more agents are selected (via icon click), a sticky
frosted-mauve bar slides up from the bottom of the viewport
@ -1089,6 +1089,9 @@ frosted-mauve bar slides up from the bottom of the viewport
- `↺ R3ST4RT` — running agents only
- `■ ST0P` — running agents only
- `▶ ST4RT` — stopped agents only
- `⏸ P4US3` — unpaused agents only (orthogonal to running/stopped —
see **Container row**'s own pause/resume note)
- `▶ R3SUM3` — paused agents only
- `↻ R3BU1LD` — always available
- `DESTR0Y` / `PURG3` — always available
- `⇡ M0V3 → ROOT` — promote selected agents to top-level