diff --git a/frontend/packages/dashboard/src/dashboard.css b/frontend/packages/dashboard/src/dashboard.css index e10073be..2578cbdd 100644 --- a/frontend/packages/dashboard/src/dashboard.css +++ b/frontend/packages/dashboard/src/dashboard.css @@ -2520,6 +2520,4 @@ body.dashboard-shell.has-selection { padding-bottom: 4.5em; } opacity: 0.5; cursor: default; } -.move-picker .btn-move { - margin-left: 0; -} + diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 1f55ca28..494ecb4d 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -933,33 +933,24 @@ window.marked = marked; disabledTitle: why('PURG3', managerNames.map((n) => `\`${n}\` is the manager`)), }); - // Move agent(s) in the topology tree — see - // docs/web-ui.md::Selection bar for the two affordances: + // Move agent(s) in the topology tree — selecting an option in the + // M0V3 dropdown immediately confirms + executes the move. "(no parent)" + // promotes to root (empty new_parent on the backend). Cycle-safe: + // dropdown filters out self and descendants on the client side; the + // backend rechecks via `topology::set_parent`. // - // ⇡ M0V3 → ROOT promote selected agent(s) to top-level (parent=null) - // ⇢ M0V3 → [sel] reparent the single selected agent under a picked - // parent (cycle-safe — the dropdown filters out self - // and own descendants on the client side; the - // backend rechecks via `topology::set_parent`). - // - // Backend lives at POST /api/topology/set-parent (dashboard.rs), - // form-encoded `child=&new_parent=`. The - // backend re-emits container snapshots on success, so the tree - // repaints without a separate refresh. + // Backend: POST /api/topology/set-parent (dashboard.rs), + // form-encoded `child=&new_parent=`. Re-emits + // container snapshots on success so the tree repaints without a + // separate refresh. addMoveActions(actions, selected, containers); } - // Render the M0V3 affordances inside the selection bar — separate - // helper because the picker variant needs a select + button pair, - // not the single-button shape addBulkButton ships. Backend - // `topology::set_parent` refuses moves it can't satisfy (manager - // included) and the refusal surfaces in the bulk-action error - // roll-up. + // Render the M0V3 picker in the selection bar. Selecting any real option + // (including "(no parent)") immediately fires a confirm + POST — no + // separate button. Backend `topology::set_parent` refuses invalid moves + // and the refusal surfaces in the alert roll-up. function addMoveActions(parent, selected, containers) { - // Unified M0V3 picker: a single `