mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-02 04:59:49 +08:00
The worker now answers only /vm/<id>/<port>[/...], the guest preview's relay. The page and its assets load from the network: a cache-first page stayed old whenever caching a new build failed. Root-relative requests from a preview are no longer relayed; guest pages use relative URLs. sw.ts calls registration.update() on every load and after an hour hidden, since register() with an unchanged URL never looks for a new script. The old scope-/ registration gets the new script on its next navigation, deletes the kw-app-* caches and tells old pages an update is ready; the next load unregisters it. The update indicator, the Offline copy row and /kw-assets.json go with the offline copy.