feat(client): admin update-available banner #23

Merged
nrupard merged 2 commits from feat/update-banner into main 2026-05-15 17:52:16 +02:00
Owner

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/version endpoint on mokosh-server (server.running, server.latest, client_latest sourced from a server-side registry poll); the SPA pairs client_latest with its own compile-time CARGO_PKG_VERSION to derive client.running, because the server can't know which bundle a given browser actually has loaded. A new admin-only UpdateBanner mounts at the top of AppLayout, renders an amber bar with "Client: x.y.z to a.b.c" / "Server: x.y.z to a.b.c" plus the docker compose pull && docker compose up --detach runbook 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-unknown clean on top of main.

Signed-off-by: nrupard natrsmith11@gmail.com

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/version` endpoint on mokosh-server (server.running, server.latest, client_latest sourced from a server-side registry poll); the SPA pairs `client_latest` with its own compile-time `CARGO_PKG_VERSION` to derive client.running, because the server can't know which bundle a given browser actually has loaded. A new admin-only `UpdateBanner` mounts at the top of `AppLayout`, renders an amber bar with "Client: x.y.z to a.b.c" / "Server: x.y.z to a.b.c" plus the `docker compose pull && docker compose up --detach` runbook 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-unknown` clean on top of main. Signed-off-by: nrupard <natrsmith11@gmail.com>
feat(client): admin update-available banner
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 4s
0d07352b17
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/version` endpoint on mokosh-server (server.running, server.latest, client_latest sourced from a server-side registry poll); the SPA pairs `client_latest` with its own compile-time `CARGO_PKG_VERSION` to derive client.running, because the server can't know which bundle a given browser actually has loaded. A new admin-only `UpdateBanner` mounts at the top of `AppLayout`, renders an amber bar with "Client: x.y.z to a.b.c" / "Server: x.y.z to a.b.c" plus the `docker compose pull && docker compose up --detach` runbook 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-unknown` clean on top of main.

Signed-off-by: nrupard <natrsmith11@gmail.com>
Merge branch 'main' into feat/update-banner
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 3s
Create release / Create release from merged PR (pull_request) Has been skipped
8f54151729
Signed-off-by: nrupard <natrsmith11@gmail.com>

# Conflicts:
#	src/modules/mod.rs
nrupard deleted branch feat/update-banner 2026-05-15 17:52:16 +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/mokosh-apps!23
No description provided.