Bulk decomission #41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
URL: http://192.168.31.41:5173/agents/installs
Under that url i need you to enable bulk agent decommission with two confirmations. workflow needs to be like this:
Claimed — branch
issue/41-bulk-decommission. Doing: bulk decommission on/agents/installsvia a right-click contextual menu (Select / Unselect / Decommission selected), row checkboxes in selection mode, two confirmations beforePOST /agents/bulk op:delete, header "Enroll agent" removed and "Install help" → primary "Install agent".Plan:
/home/eduardez/workspace/gotoi-wt/meta/issue-41.plan.mdrelatedin UC-FE-65/68/87) —python3 docs/use-cases/_check.pyUC-FE-95test indashboard/src/lib/usecases-frontend.test.ts—bun run testbulkDelete(); full gates + browser smoke on/agents/installsPARTIAL-DONE — harvested at the 45-min orchestrator cap. PR opened: #51 (issue/41-bulk-decommission -> agent-develop), commits
8032616+8458a86.Implemented: right-click context menu (Select / Unselect / Decommission selected), row checkboxes in selection mode, two confirmations before bulk delete, 'Enroll agent' removed, 'Install help' -> primary 'Install agent'. New UC-FE-95.
Gates green on orchestrator re-run: UC check, ai-headers, type-mirror, svelte-check 0 errors, vitest 240 passed. Not verified: live browser smoke of the menu flow (omp was cut mid smoke-check). Issue stays open — operator merges.
Issue #41 — Bulk decommission (
/agents/installs)Restated goal
On
http://192.168.31.41:5173/agents/installsthe operator must be able to select severalenrolled agents and decommission them in one request, behind two confirmations. "Machines" in
the issue means the agent rows of this list (task file says so explicitly). Concretely: drop the
header "Enroll agent" button, turn the header "Install help" button into a primary-blue
"Install agent", add a right-click contextual menu on the list with Select / Unselect /
Decommission selected, where choosing Select reveals a checkbox on every row, and where
Decommission selected runs a two-step confirmation before
POST /agents/bulk {op:'delete'}."Done" for the operator: right-click a agent row → menu; Select → checkbox column appears and rows
toggle on click; right-click again → Unselect / Decommission selected; Decommission asks twice
(second one typed
DECOMMISSION) and only then deletes; the header shows one blue "Install agent"action and no enroll button.
Scope
Change
dashboard/src/routes/agents/installs/+page.svelte— header actions, context menu, selectionmode + row checkbox, two-stage confirm, drop the dead empty
{#if}at the tail.docs/use-cases/frontend/UC-FE-95-bulk-decommission-select.md— new UC.docs/use-cases/frontend/UC-FE-68-bulk-agent-actions.md— Story now two dialogs;related:+=UC-FE-95; version bump.
docs/use-cases/frontend/UC-FE-87-decommission-live-warning.md—related:+= UC-FE-95.docs/use-cases/frontend/UC-FE-65-agents-views.md—related:+= UC-FE-95.dashboard/src/lib/usecases-frontend.test.ts—UC-FE-95describe block (repo convention issource-content assertions for pages; there is no component test layer).
Not touched
middleware/**(bulkop:'delete'and its zod schema already exist and are already called bythis page) and
agent/**.dashboard/src/app.css,$lib/components/ui/split-list/*(rows keep.list-rowas shipped).dashboard/src/routes/agents/+page.svelte(its own "Install help" button is not in the issue).EnrollForm/ the?id=__new__draft branch /UC-FE-05— only the header enroll button goes.plans/,main/master, any push.UC decision
New
UC-FE-95"Bulk decommission from an agent list",docs/use-cases/frontend/UC-FE-95-bulk-decommission-select.md.dashboard/src/routes/agents/installs/+page.svelte(real page file;app.tsforbidden).dashboard/src/lib/usecases-frontend.test.ts(will containUC-FE-95).related: [UC-FE-65, UC-FE-68, UC-FE-87], bidirectional; each of those three gains the link inboth YAML and the Related heading.
Ordered tasks (each with its verifying command)
test -f /home/eduardez/workspace/gotoi-wt/meta/issue-41.plan.mdpython3 $FJ issue 41shows bothUC-FE-95+ add the bidirectional links in UC-FE-65/68/87 (UC-FE-68 Story → twodialogs, version bump). →
python3 docs/use-cases/_check.pyusecases-frontend.test.ts:UC-FE-95describe. →cd dashboard && bun run testInstall agent, primary) + drop thedead
{#if}. →cd dashboard && bun run checkdata-agent-idrows,ContextMenu.Root/Trigger/Content(Select / Unselect / Decommissionselected), selection mode + row checkbox indicator, row click toggles while selecting.
→
cd dashboard && bun run checktyped DECOMMISSION→ final "Decommission now") routed throughbulkDelete(); headerLast:bump. →cd dashboard && bun run check/agents/installs(right-click, Select, Unselect, bothdialogs). → all gates exit 0,
rg -n 'Showing lines'emptytest -f /home/eduardez/workspace/gotoi-wt/meta/issue-41.report.mdOpen questions + assumptions taken
Assumption: Select enters selection mode (pre-ticking the right-clicked row) and every row then
shows a checkbox on the left; clicking a row toggles it instead of opening the detail.
<button>row.SplitList.Itemrenders<button class="list-row">; theinstalled
Checkboxis itself a<button>, so nesting is invalid. Assumption: in selection modethe row renders a presentational checkbox indicator with the same tokens and the row button
carries
aria-pressed+ the toggle action (a toggle button is the correct semantic for aselectable list row). Fallback if a reviewer wants a real input: restructure the row into
li > label > Checkbox + button.q+idsemantics of UC-FE-65 §6).label changes, as the issue asks.
PageActionis removed; the empty-state placeholder button andthe
?id=__new__draft branch stay, soEnrollForm(UC-FE-05) stays reachable and the existingUC-FE-65 assertion on
EnrollFormremains true.Risk + boring fallback
aimanage/chatpattern (bits-uiTriggerwrapping a divwhose
oncontextmenusets the row id). Risk: handler ordering vs bits-ui's own listener →fallback:
ContextMenu.Items read actxIdthat is also refreshed ononpointerdown.ConfirmDialogcallsoncancel()on every open→close transition, so advancingstage 1 → stage 2 would be mistaken for a cancel. Risk: stage 2 self-aborts. Fallback: guard each
oncancelwith the current stage (if (confirmStage === 'typed') …); if that still misbehaves,use one dialog whose props swap per stage.
bun run checknoise from the new markup → fallback: relative-position a plain span indicator andkeep all state in the page (already the design).
Rebased branch onto agent-develop (conflicts in UC-FE-65/68 resolved: kept the uuid-route text + version bumps, kept the UC-FE-95 related links). Gates re-run green on rebased head
89e7b70: UC catalog check, ai-headers, vitest 240/240, svelte-check 0 errors. PR #51 is now mergeable: true against agent-develop. Awaiting operator merge.