dashboard: agent selection + bulk action bar (#443)
per mara on #443: "dont show all the restart buttons etc., just show state and links. instead, clicking an agent icon selects that agent. you can select as many as you like. then you can run an action on all of them." selection model - module-level selectionState = Set<string> of agent logical names. clicking a container-row icon toggles membership; Esc clears the whole set (ignored when an editable element has focus so typing in compose / answer / journal-search isn't intercepted). - icon now has role="button" + tabindex="0" so it's keyboard-accessible; aria-pressed reflects the toggle state. hover + focus-visible get a mauve ring. - selected rows get a .selected class — mauve outline + faint mauve wash on the row, brighter ring on the icon. - on every renderContainers pass, stale selections (agents destroyed while selected) are pruned defensively. sticky action bar - new #selection-bar in index.html — fixed bottom strip with count chip, name list, action buttons, clear button. hidden when selection empty. styled to match the flow composer's frosted-mauve chrome (vibecore family). - per mara's option B answer: every action button is visible; buttons that don't apply to the whole selection are disabled with a tooltip explaining WHY ("iris is already stopped" etc). .btn:disabled styling added. - actions: R3ST4RT / ST0P / ST4RT / R3BU1LD / DESTR0Y / PURG3. per-action confirm prompt lists the names being acted on. when the selection includes the manager the ST0P prompt calls out the consequence (approvals + meta operations pause until manager is restarted). DESTR0Y/PURG3 stay sub-agent-only; including the manager disables them with a clear tooltip. - actions POST per agent in a loop to the existing endpoints (/restart/{name}, /kill/{name}, etc.); no new backend wire surface. event-driven derived stores (containersState, rebuildQueueState) already update live via SSE — no manual refetch. - failures from any individual POST surface in a single alert at the end rather than spamming dialogs mid-loop. per-card actions removed - the in-card R3ST4RT / ST0P / ST4RT / R3BU1LD / DESTR0Y / PURG3 block is gone. cards now show identity / state / nav-strip / status text / drill-ins only — "state and links" per mara. the contextual needs-update chip in the head row stays. manager stop - the "also make manager stoppable" half of #443 ships as PR #445 (separate small backend change). this PR depends on #445 for the bulk-stop button to actually work on selections containing the manager; until #445 merges, ST0P on a manager-included selection will fail individually with a 500 for the manager (other selected agents are still stopped; failures bucket into the end-of-loop alert). build clean: npm run build --workspace=@hive/dashboard. no backend changes here.
This commit is contained in:
parent
b42b219f9b
commit
a366c00e0e
3 changed files with 336 additions and 42 deletions
|
|
@ -159,6 +159,20 @@
|
|||
</aside>
|
||||
</div>
|
||||
|
||||
<!-- Selection action bar (#443). Sticky-bottom strip that slides
|
||||
into view when one or more agent cards is selected (click the
|
||||
icon to toggle). Shows the selection count + actions that
|
||||
apply to ALL selected; disabled-with-tooltip for actions that
|
||||
don't (mara picked option B). Hidden when selection is empty. -->
|
||||
<div id="selection-bar" class="selection-bar" hidden role="toolbar"
|
||||
aria-label="bulk agent actions">
|
||||
<span class="selection-count" id="selection-count"></span>
|
||||
<span class="selection-names" id="selection-names"></span>
|
||||
<span class="selection-actions" id="selection-actions"></span>
|
||||
<button type="button" class="btn selection-clear" id="selection-clear"
|
||||
title="clear selection (esc)">✕ clear</button>
|
||||
</div>
|
||||
|
||||
<!-- Single bundled entry. esbuild folds @hive/shared/terminal.js and
|
||||
the marked npm package into app.js; load order is preserved by
|
||||
the module bundler. -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue