App-Start ohne Wartezeit + vollstaendige Offline-Nutzung (lokale Daten auf dem Telefon, laufende Synchronisation) #220
Labels
No labels
priority/could
priority/must
priority/should
priority/wont
status/blocked
status/claimed
status/done-migrated
type/bug
type/feature
type/infra
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/todo#220
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Story: Listen sofort sehen - auch ohne Netz
As a Nutzer der App auf dem Telefon,
I want to dass meine Listen beim Oeffnen der App sofort da sind, ohne Ladezeit, und dass ich die App auch komplett offline nutzen kann, waehrend sich die Daten im Hintergrund laufend mit dem Server abgleichen,
so that ich z. B. im Supermarkt ohne Empfang oder bei langsamem Netz nicht warten muss, bevor ich meine Einkaufsliste sehe.
Wortlaut des Nutzers: "Die Ladezeit am Anfang von der App ist mir zu lang. Ausserdem moechte ich die App offline nutzen koennen. Gibt es eine Moeglichkeit die Daten lokal auf dem Telefon zu haben (ggf. lightweight ohne das LLM) und diese konstant zu synchronisieren. Ich meine, das wurde bereits eingebaut? Ich haette gerne keine Ladezeit, bevor ich meine Listen sehe"
Ist-Stand (PO-Recherche im Code, 2026-09-29): Teilweise vorhanden, aber nicht vollstaendig:
ReactUi/src/offline/offlineReadCache.ts). To-Do-Listen, Masterpacklisten, priorisierte Listen und die Listenuebersicht selbst werden nicht lokal vorgehalten.ReactUi/public/sw.js) cached bewusst nichts (kein fetch-Handler, nur Push/Installierbarkeit). Ohne Netz startet die App deshalb gar nicht erst; der lokale Cache hilft nur, wenn die App schon offen war.Acceptance criteria:
Out of scope for this story:
Open questions: (escalate to human if unanswered)
Als Backlog-Item vom Nutzer eingereicht (per Chat, nicht im laufenden Loop-Zyklus geclaimt).
Claimed by the go loop (2026-09-29). Start: Architect design for the offline shell caching, instant start from local data and caching all list types. Progress follows as commits on master.
Architect design (go loop, 2026-09-29) - one pass, no phase split:
Security pre-review: no new endpoints. Cached data is only a mirror of what the server already returned to this user; the server still authorizes everything. Cached admin/password-change flags are UI hints only (an admin password reset revokes all sessions -> 401 -> cache wiped). The service worker never caches /api responses or anything cookie-bound, only the public static shell. Cache wiped on logout / session loss (AC 7).
Done (go loop, 2026-09-29). Commits on master:
a75a27c9,6204cd28,e0653187(plus memory918688b7).Scope:
Tests: +30 unit tests (callApiCached, offlineDb owner/quota, store logout wipe, offline toasts, appRefresh, SW registration/update toast, lazy worker, banner). Full suite 1526 passing, build green. Verified live with Playwright against the production review container: SW controls the page and caches the shell (no .wasm); with the server delayed by 4 s the list overview appeared after ~300 ms; a cold start of a list URL in offline mode showed the overview and the list with the read-only banner.
Decisions / not done: no phase split. Storage limit: only the user's own list data in localStorage (no photos/avatars). "Last opened list": the app reopens the URL it was on, or the configured default list. It does not additionally remember the last list when no default is set. Security review: no findings. The cached admin/password flags are UI hints only (the server authorizes everything, and an admin reset revokes sessions -> cache wiped).