mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
#6492: while the SQLite text data is being recovered/remediated, users should see a maintenance spinner instead of errors or half-loaded data. - A published singleton status (models/recoveryStatus.js) carries an "active" flag + message. The publication (server/publications/recoveryMaintenance.js) is PUBLIC so even logged-out users on the sign-in page see it; the toggle method (setRecoveryMaintenance) is admin-only. - The client overlay (client/components/main/recoveryMaintenance.*) shows a full-screen spinner + message when active; it is subscribed globally and rendered in both the app (defaultLayout) and sign-in (userFormsLayout) layouts, above modals/popups. - The startup scripts write a RECOVERY_IN_PROGRESS marker when they restore/re-migrate. On startup the WeKan server (server/recovery.js) shows the spinner while the marker is present, verifies the database serves reads (probe), then clears the marker and the spinner — or, if it still cannot read, keeps the spinner and records that manual recovery is required. Admins can also toggle maintenance for a server-initiated re-migration. Tests: tests/recoveryMaintenance.test.cjs (wired into npm run test:unit:node) — the publication is public while the toggle is admin-gated, the overlay is subscribed and rendered in both layouts above everything, the server shows the spinner from the marker and clears it only after a health probe, and the scripts write the marker. Mirror- validated (no Node runtime here); shell/brace/JSON all checked. Thanks to bluetopaz1204, mueschel and xet7 ! Fixes #6492,