fix(pwa): fail offline mutations fast instead of pausing + silent write loss

Mutations ran in TanStack's default 'online' network mode, which PAUSES a
write fired offline: isPending stays true forever, onError never fires,
and the paused mutation is dropped on reload — a health entry vanishes
with no 'not saved' signal. Switch mutations to 'always' network mode so
an offline write rejects immediately and the form surfaces an honest
failure, and add a global OfflineMutationToaster backstop for call sites
without their own onError. Correct the offline banner copy, which promised
changes would auto-save.
This commit is contained in:
Marc-André Bombeck committed 2026-07-08 23:51:08 +02:00
1 parent a53dd2b59c
commit 081bb2289d
9 files changed
+144 -18

No files matched your search

+2 -1
View File
@@ -210,7 +210,8 @@
"backToDashboard": "Powrót do panelu"
},
"offlineBanner": {
"message": "Brak połączenia — twoje zmiany zostaną zapisane, gdy ponownie pojawisz się online.",
"message": "Brak połączenia — zmian nie można zapisać, dopóki nie wrócisz online.",
"saveFailed": "Nie udało się zapisać — jesteś offline. Spróbuj ponownie, gdy wrócisz online.",
"showingCached": "Wyświetlane są ostatnio zsynchronizowane dane."
},
"demoBanner": {