Plan for update button
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run

This commit is contained in:
David 2026-07-21 20:35:02 +02:00
parent b47b01d379
commit 06b937e213

View file

@ -913,6 +913,24 @@ Hugo 0.123.7 static site under `website/`. FR default at `/`, EN at `/en/`. Depl
---
### Backlog — Manual "Check for updates" button in Settings
**Status:** 🔲 To do — not yet planned in detail, not implemented
**Requested:** 2026-07-21, user request — the PWA doesn't seem to update automatically; add a manual update button in Settings.
**Why:** Step 24 (`useAppUpdate.js`, `AppUpdateDialog.vue`) already shows an update prompt when the browser detects a new service worker, but that detection only runs on the browser's own schedule (roughly on navigation/reload) — if the PWA is left open, an update can go unnoticed for a long time. A manual trigger in Settings lets the user force a check on demand.
**Discussed approach (not yet implemented):**
- `useAppUpdate.js` — capture the SW `registration` via `useRegisterSW`'s `onRegisteredSW` callback; add `checkForUpdate()` that calls `registration.update()` to force the browser to re-fetch the SW script. If it changed, the existing `needRefresh` flow fires and `AppUpdateDialog` appears as usual (same "Update now" / "Later" choice — user retains the option to defer even when an update is found).
- `SettingsView.vue` — new "Application" card: a "Check for updates" button, with a brief inline status message ("You're up to date") shown for a few seconds when a check finds nothing (via a timeout heuristic, since there's no direct "no update" event from the SW API).
- Explicitly out of scope: no periodic/background auto-check — checking stays a deliberate user action, and updating stays optional even when available (user decision 2026-07-21).
**Not started:** no code, no tests, no i18n keys yet.
---
## Data Model
```mermaid