Apply app updates automatically and survive proxy caching
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 29s

- Check for a new service worker on every return to the foreground and
  every 30 minutes; apply it in the background or just after launch,
  never with unsynced edits or an open sheet. The Update prompt remains.
- Register the worker at extension-less /sw (no-cache), so proxies that
  cache *.js regardless of headers cannot hide updates
- Return 404 for missing files instead of the HTML shell
- Tests for the static routes; smoke test covers /sw; document the Nginx
  Proxy Manager "Cache Assets" pitfall

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-10-22 11:19:30 -07:00
parent bb0bc430aa
commit 8f6981c8a2
7 changed files with 190 additions and 40 deletions

View file

@ -14,7 +14,7 @@ A single-user, self-hosted nutrition journal. PWA first, with a responsive deskt
- Settings save automatically as you change them: theme and accent switch instantly, and number fields commit after a short pause, on Return, or when you leave the field.
- On phones, swipe left/right through Today → Library → Weight → Settings. Neighboring screens are already rendered and move together under your finger; settling uses a composited slide with no fade-to-blank delay. Every tab retains its own scroll position. Vertical scrolling, form controls, horizontal macro scrolling, and browser edge gestures remain independent. The calorie simulation pauses on other tabs. Pull down from a sheet header to dismiss it. System Reduce Motion disables these transitions.
- Markdown, CSV and JSON export with date range, nutrient and weight selections. Markdown is designed for LLM analysis. Data is downloaded locally, never submitted to an LLM. Each download remembers the export format, range preset and selections for next time.
- Password authentication, IndexedDB offline journal/outbox, a precached app shell, automatic foreground/reconnect sync, and explicit PWA update prompts.
- Password authentication, IndexedDB offline journal/outbox, a precached app shell, automatic foreground/reconnect sync, and automatic app updates: each return to the foreground checks for a new version, which applies in the background or right after launch (never with unsynced edits or an open sheet), with an Update prompt to switch immediately.
### Phone layout