:PROPERTIES: :ID: 2d455310-42a5-4ff5-be38-9af2b009aef7 :END: #+title: homey/work-history/recent #+filetags: :project: :work-history: * 2026-07-31 Fri - Restored EmulatorJS offline mode (previously removed because a cache-first Service Worker broke game loading). Rewrote =modules/services/emulatorjs-server.py= as a network-first PWA: SW only reads cache when offline, so it cannot break online play. - Added installable PWA (=/manifest.json=, stdlib-generated =/icon-256.png=), build-scoped =emujs-shell-= cache with auto-invalidation on redeploy, and an opt-in per-game ⬇ download button caching ROMs into a persistent =emujs-roms= cache. - Kept IndexedDB offline save queue with sync-on-reconnect; player loads =loader.js= directly (removed the preflight gate). - Verified via module import + live HTTP smoke test (all routes 200; =/sw.js= has =Service-Worker-Allowed: /=). - Decided against Background Sync and timestamp-merge for saves (owner said not relevant). Decided against PS1/disc hosting for now (scoped it: needs psx core + BIOS + streamed ROM serving). - Recorded design in new org-roam subnode [[id:7148e7ef-7741-42ad-9d3d-4025001e1018][homey/emulatorjs]]. - Fixed offline "Error downloading core (mgba-legacy-wasm.data)": the SW isn't controlling the page on first visit, so the core fetched during first online play was never cached. Added page-side =cacheLoadedStatic()= that reads =performance.getEntriesByType('resource')= and writes the actually-loaded =/static/= files into the shell cache directly (runs on game start + delayed + on reconnect). Download button now also caches the =/play/= document. ** Archives