Installable web app with offline app shell #39

Open
opened 2026-10-01 11:36:34 +02:00 by kawa · 2 comments
Owner

PWA installation, offline app shell caching, safe updates, storage persistence and quota handling.

Plan: docs/PLAN.md section 4

Commit: ce81297

PWA installation, offline app shell caching, safe updates, storage persistence and quota handling. Plan: docs/PLAN.md section 4 Commit: ce81297
kawa added this to the Pokemon Crystal - Web project 2026-10-01 11:36:34 +02:00
kawa moved this to A faire in Pokemon Crystal - Web on 2026-10-01 11:36:34 +02:00
samy was assigned by PestoRosso 2026-10-03 15:12:42 +02:00
PestoRosso added the P2 - later label 2026-10-03 15:19:51 +02:00
Collaborator

Direction set by PestoRosso: the installable web app (PWA) is the first app step and the default UX once hosted, on iPhone and Android. An Android .apk wrapper and a native iPhone app would come after it. Priority stays P2 for now.

Direction set by PestoRosso: the installable web app (PWA) is the first app step and the default UX once hosted, on iPhone and Android. An Android .apk wrapper and a native iPhone app would come after it. Priority stays P2 for now.
samy moved this to En cours in Pokemon Crystal - Web on 2026-10-03 20:51:59 +02:00
Collaborator

Pushed in ce81297.

Done

  • Manifest (standalone, relative start URL and scope for subdirectory hosting) and icons rendered from icon.svg: 192, 512, maskable 512 and the Apple touch icon (scripts/make-icons.mjs).
  • Build-time service worker (scripts/service-worker.mjs): precaches exactly the built files under a content-versioned cache, serves them first, passes everything else to the network. ROMs are local files and never reach the cache. No worker in the reference build or in development.
  • Safe updates: a new version waits; an Update banner saves the session, then the worker takes over and the page reloads. Old shells are deleted on activation.
  • Savegames → App and Storage: install prompt where the browser offers it, Safari steps on iPhone/iPad, persistent storage status, usage and request (also requested at start when installed). Quota errors get their own save message.
  • check:release allows only the four known icons and checks the worker's list against the build. Unit tests run the generated worker against a fake cache; a Chromium test opens the production build offline.

Left

  • Acceptance on a physical iPhone (Safari, Add to Home Screen) and Android (Chrome install): install, offline start, update, background/resume.
  • Keeping the ROM between launches stays a separate explicit preference for later.
Pushed in ce81297. **Done** - Manifest (standalone, relative start URL and scope for subdirectory hosting) and icons rendered from `icon.svg`: 192, 512, maskable 512 and the Apple touch icon (`scripts/make-icons.mjs`). - Build-time service worker (`scripts/service-worker.mjs`): precaches exactly the built files under a content-versioned cache, serves them first, passes everything else to the network. ROMs are local files and never reach the cache. No worker in the reference build or in development. - Safe updates: a new version waits; an Update banner saves the session, then the worker takes over and the page reloads. Old shells are deleted on activation. - Savegames → App and Storage: install prompt where the browser offers it, Safari steps on iPhone/iPad, persistent storage status, usage and request (also requested at start when installed). Quota errors get their own save message. - `check:release` allows only the four known icons and checks the worker's list against the build. Unit tests run the generated worker against a fake cache; a Chromium test opens the production build offline. **Left** - Acceptance on a physical iPhone (Safari, Add to Home Screen) and Android (Chrome install): install, offline start, update, background/resume. - Keeping the ROM between launches stays a separate explicit preference for later.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kawa/Crystal#39