dashboard: selection-bar M0V3 affordances for re-parenting agents (#486)
Backend POST /api/topology/set-parent already shipped; the dashboard was missing the operator surface to drive it. Adds two affordances to the SW4RM tab's selection bar (alongside the existing R3ST4RT / ST0P / ST4RT / R3BU1LD / DESTR0Y / PURG3 actions): - '⇡ M0V3 → ROOT' (bulk): promote selected agents to top-level (parent=null). Disabled when all selected are already at root or the selection includes the manager (backend refuses anyway). - '⇢ M0V3 → [pick]' (single-agent only): inline <select> dropdown + button pair. Dropdown lists every container that isn't the target nor a descendant of it (client-side BFS via the existing c.parent map). On submit POSTs form-encoded 'child=<name>&new_parent=<target>' to /api/topology/set-parent; the backend re-checks the cycle invariant and re-emits a container snapshot so the tree repaints without a reload. Both POSTs hit a single URL, so addBulkButton grew an optional 'perAgentBodyFor(name)' hook to handle the body-driven endpoint shape (vs the URL-suffix /start/<name> shape every other action uses). Lifecycle endpoints unchanged. Mauve chrome (var(--mauve)) reads as 'structural change' rather than the destructive red / amber of destroy / rebuild. closes #486
This commit is contained in:
parent
b714ba15c2
commit
2950a7f9ee
3 changed files with 189 additions and 2 deletions
|
|
@ -440,6 +440,16 @@ frosted-mauve bar slides up from the bottom of the viewport
|
|||
- `▶ ST4RT` — stopped agents only
|
||||
- `↻ R3BU1LD` — always available
|
||||
- `DESTR0Y` / `PURG3` — sub-agents only (disabled if manager selected)
|
||||
- `⇡ M0V3 → ROOT` (#486) — promote selected agents to top-level
|
||||
(parent = null); disabled when all selected are already at root
|
||||
or when the selection includes the manager.
|
||||
- `⇢ M0V3 → [select]` (#486) — single-agent-only inline picker;
|
||||
the dropdown lists every container that isn't the target itself
|
||||
nor a descendant of it (client-side cycle prevention; the
|
||||
backend's `topology::set_parent` re-checks). On submit POSTs to
|
||||
`/api/topology/set-parent` (form-encoded `child=<name>&new_parent=<target>`),
|
||||
which writes `topology.json` and re-emits a container snapshot so
|
||||
the tree repaints without a page reload.
|
||||
- **`✕ clear`** button + `Esc` key clear the entire selection.
|
||||
|
||||
Stale selections (agents destroyed while selected) are pruned on
|
||||
|
|
|
|||
Loading…
Reference in a new issue