8 Commits

Author SHA1 Message Date
Pooya Parsa
d8e442a641 Keep the page's data disk in OPFS in worker mode: OpfsDisk (8 MiB extent files), the SDK's backend option for the data disk, a one-way migration from IndexedDB, a storage quota block and a free Disk size in Settings, and a question in a second tab instead of an in-memory copy 2026-11-29 17:37:06 +00:00
Pooya Parsa
0d4be496af web: add llms.txt 2026-11-27 21:44:35 +00:00
Pooya Parsa
827dfa04d8 web: WebSockets in the guest preview: the service worker puts the shim /vm-ws.js into the HTML documents it relays, whose WebSocket reaches the guest (ws://localhost:<port>, /vm/<id>/<port>/, root-relative paths) through the page over a BroadcastChannel, where websocketOver() (js/core/ws.ts, RFC 6455 over vm.connect()) runs it, with credits, a socket cap and Web Locks for teardown; a preview document's root-relative requests are relayed to its port, so a Vite dev server's client and HMR work 2026-11-22 15:22:51 +00:00
Pooya Parsa
17cbb535ba web: add an Open Graph image and link preview tags 2026-11-19 20:23:23 +00:00
Pooya Parsa
3699f3aee4 web: move the saved session to kwsnap:session-v2 and delete older versions 2026-11-19 17:31:41 +00:00
Pooya Parsa
9f6353b7b6 web: drop the fx stand-ins and the libfx demo, rename ?smp= to ?cpus=, and refresh the demos 2026-11-19 16:04:23 +00:00
Pooya Parsa
cabc62f8f2 web: scope the service worker to /vm/ and drop the offline copy
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.
2026-11-16 12:29:32 +00:00
Pooya Parsa
26d08730cc Initial commit 2026-11-15 23:27:04 +00:00