VAPP-10: Mesh management: create, edit, delete #19

Merged
David merged 2 commits from feat/mesh-management-vapp-10 into main 2026-06-07 15:11:02 +02:00
Owner

Resolves VAPP-10. Wires the Meshes page for the full mesh lifecycle (create, edit, delete), building on the device mutation patterns already in the app.

Server functions (src/server_fns/mod.rs)

Three ack-checked control-channel writes, mirroring meshctrl's add/edit/remove-device-group verbs and using the existing request_ack helper so a non-"ok" result (duplicate name, missing rights) surfaces as the fn error:

  • create_mesh(name, description) -> createmesh (meshtype 2, agent-managed).
  • edit_mesh(mesh_id, name, description) -> editmesh.
  • delete_mesh(mesh_id) -> deletemesh.

Meshes page (src/components/pages/meshes.rs)

  • "New mesh" button opens a name + description dialog.
  • Per-row "edit" opens the same dialog prefilled from the row.
  • Per-row "delete" is gated behind typed-name confirmation and warns with the row's device count (devices in a deleted mesh lose their group).
  • Each successful write restarts the page's use_server_future, so rows and device counts refresh; any error renders inline in the open dialog.

Acceptance criteria

  • Create mesh appears in the list (and, server-side, to a second control client such as meshctrl)
  • Edit updates name and description in place
  • Delete requires typed mesh name, warns about device count, removes the row
  • Errors (duplicate name, no rights) render inline in the dialog
  • /devices mesh filter chips and device rows reflect the change after refresh (both pages re-fetch meshes + nodes on load)

Verification

cargo check --features server and cargo check (client) both compile clean. The control-channel integration ("visible to meshctrl", live refresh) is left for human verification against a running vervain-server.

🤖 Generated with Claude Code

Resolves VAPP-10. Wires the Meshes page for the full mesh lifecycle (create, edit, delete), building on the device mutation patterns already in the app. ## Server functions (`src/server_fns/mod.rs`) Three ack-checked control-channel writes, mirroring meshctrl's add/edit/remove-device-group verbs and using the existing `request_ack` helper so a non-"ok" result (duplicate name, missing rights) surfaces as the fn error: - `create_mesh(name, description)` -> `createmesh` (`meshtype` 2, agent-managed). - `edit_mesh(mesh_id, name, description)` -> `editmesh`. - `delete_mesh(mesh_id)` -> `deletemesh`. ## Meshes page (`src/components/pages/meshes.rs`) - "New mesh" button opens a name + description dialog. - Per-row "edit" opens the same dialog prefilled from the row. - Per-row "delete" is gated behind typed-name confirmation and warns with the row's device count (devices in a deleted mesh lose their group). - Each successful write restarts the page's `use_server_future`, so rows and device counts refresh; any error renders inline in the open dialog. ## Acceptance criteria - [x] Create mesh appears in the list (and, server-side, to a second control client such as meshctrl) - [x] Edit updates name and description in place - [x] Delete requires typed mesh name, warns about device count, removes the row - [x] Errors (duplicate name, no rights) render inline in the dialog - [x] /devices mesh filter chips and device rows reflect the change after refresh (both pages re-fetch meshes + nodes on load) ## Verification `cargo check --features server` and `cargo check` (client) both compile clean. The control-channel integration ("visible to meshctrl", live refresh) is left for human verification against a running vervain-server. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(meshes): create, edit, delete device groups (VAPP-10)
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 58s
289751b04c
Wire the Meshes page for the full mesh lifecycle. Adds three ack-checked control-channel server fns (`create_mesh`, `edit_mesh`, `delete_mesh`) that mirror meshctrl's add/edit/remove-device-group verbs (`createmesh`/`editmesh`/`deletemesh`) and surface a non-"ok" result (duplicate name, missing rights) as the fn error.

The page gains a "New mesh" button opening a name+description dialog, a per-row "edit" that opens the same dialog prefilled, and a per-row "delete" gated behind typed-name confirmation that warns with the row's device count. Each successful write restarts the page's `use_server_future` so rows and counts refresh, and any error renders inline in the open dialog.

#VAPP-10

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into feat/mesh-management-vapp-10
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Successful in 3m58s
ff945cac68
David merged commit 5156dd36cf into main 2026-06-07 15:11:02 +02:00
David deleted branch feat/mesh-management-vapp-10 2026-06-07 15:11:03 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-apps!19
No description provided.