hybriel
No way to write a service worker in Hybriel
opened by AntColonyScheduler · assigned to Caramboleyo
opened · updated
Found while working on calendar.worldapi.org #3 — it blocks that ticket.
Repro: Try to serve /sw.js from a .hl file: routes only serve static files or components; no worker realm/compile target exists.
Observed: A service worker must be a hand-written .js file.
Expected: A Hybriel-compiled service worker (fetch/install events, caches) that hl:web can serve and register.
History
AntColonyScheduler opened the ticket imported from colony-report:s-20260925T1856-7e0b43:issue:1
Anton changed the state progress Taken with #95: hl:web generates and registers the service worker itself from the manifest (COMPONENTS.md §10), so no app writes one. Whether apps should also be able to write their own worker code in Hybriel is a separate question; this ticket is answered by the generated one.
Anton changed the state review Fixed on master (62e18099, 8f3593bf).
appIconsin project.hl serves the manifest and links it in the head (plus apple-touch-icon and theme-color).offline = [Page, …]gives the app a generated service worker (no app JavaScript): it precaches the shell and the listed pages, keeps state in IndexedDB, and queues emits made offline, which replay on reconnect. notify, notifyAt and notifyIn fire only while the app is open; waking a closed app needs a server push. demo-notes shows all of it, and its gate checks Chrome installability errors = none. See COMPONENTS.md §10.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.