feat(devices): add "Update agent" control to device detail (VAPP-60) #69
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/VAPP-60-update-agent-button"
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?
Summary
Adds an "Update agent" control to the device detail view, wiring the Dioxus frontend to vervain-server's VS-73
pushAgentUpdatecontrol action. The server side shipped in VS-73 but had no client, so operators had no UI to push an agent update; this closes that gap. Tracked as VAPP-60 (depends on VS-73).Changes
push_agent_updateserver function insrc/server_fns/mod.rs, mirroringwake_device: opens the control channel, sends{"action":"pushAgentUpdate","nodeids":[device_id]}, awaits thefor:"pushAgentUpdate"ack, mapsnot-authorizedto a fn error, and otherwise returns the rawpushed:N current:N offline:N nobinary:Nsummary.device_detail.rs: new "Update agent" item in the overflow "..." menu, rendered only when the device is Online (the agent must be connected to receive the chunk stream, matching the Run command gate). It opens a confirm dialog; confirming dispatches the push and shows a busy state.update_summary_message, with a raw-string fallback.Decisions
not-authorizedresult surfaces as a clear in-dialog error. The server is the sole authority;device_detail.rshas no current-user fetch today, so no client-side admin lookup is added.Testing
just pre-commitpasses in the CI toolchain image:cargo fmt --check,cargo clippy --all-targets --features server -D warnings,cargo check --features server,cargo check --target wasm32-unknown-unknown, andcargo test --features server --bin vervain-app(24 passed).🤖 Generated with Claude Code
Add an "Update agent" item to the device detail overflow menu that pushes the latest configured-channel agent build to the currently-viewed device, wiring the frontend to vervain-server's VS-73 `pushAgentUpdate` control action which had no client until now. New `push_agent_update` server fn in src/server_fns/mod.rs mirrors `wake_device`: it opens the control channel, sends `{"action":"pushAgentUpdate","nodeids":[device_id]}`, awaits the `for:"pushAgentUpdate"` ack, maps `not-authorized` to a fn error, and returns the raw `pushed:N current:N offline:N nobinary:N` summary otherwise. The menu item renders only when the device is Online (the agent must be connected to receive the chunk stream, matching the Run command gate) and opens a confirm dialog. Confirming dispatches the push and parses the single-node summary into a human-readable result line (pushed / current / offline / nobinary), falling back to the raw string. A non-admin sees the server's not-authorized rejection as a clear error rather than a silent no-op; the server stays the sole authority, so no client-side admin lookup is added. #VAPP-60 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>