feat(client): admin update-available banner #23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/update-banner"
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?
Closes Milestone 1's "instance reports whether an update is available" acceptance criterion on the SPA side. Adds a typed client for the planned
GET /api/v1/system/versionendpoint on mokosh-server (server.running, server.latest, client_latest sourced from a server-side registry poll); the SPA pairsclient_latestwith its own compile-timeCARGO_PKG_VERSIONto derive client.running, because the server can't know which bundle a given browser actually has loaded. A new admin-onlyUpdateBannermounts at the top ofAppLayout, renders an amber bar with "Client: x.y.z to a.b.c" / "Server: x.y.z to a.b.c" plus thedocker compose pull && docker compose up --detachrunbook line, and is dismissable per-version via localStorage (a fresh release reshapes the dismissal key so the banner re-surfaces). Progressive enablement: until mokosh-server ships the endpoint, the fetch errors and the banner renders nothing for everyone, so this is safe to land ahead of the server PR. Non-admins never see the banner because the role check is in the component, not the layout. Smoke:cargo check --target wasm32-unknown-unknownclean on top of main.Signed-off-by: nrupard natrsmith11@gmail.com