- Exclude /webui/* endpoints from the service worker cache; the
/webui/bootstrap endpoint issues fresh gateway credentials on every load
and must never be cached or replayed offline.
- Restrict cache-first handling to hashed /assets/ files (served immutable).
Un-hashed brand icons and the favicon stay network-first so future icon
swaps reach installed clients.
- Prune stale hashed assets whenever the app shell refreshes, so old build
assets cannot accumulate even when sw.js itself is unchanged.
- Serve the cached app shell for offline deep-link navigations.
- Ignore service worker registration failures; add unit tests for the
service worker and the main-entry registration.
- Add manifest.json with icons for install prompt
- Add service worker with cache-first for static assets
- Register SW in main.tsx
- Link manifest in index.html
`crypto.randomUUID` only exists in secure contexts (HTTPS or localhost).
Over LAN HTTP it is undefined, so `ChatPane`'s welcome-message flush and
streaming-message handlers crash mid-render with `TypeError`, unmounting
the React tree and leaving the user a blank page.
Install a Math.random-backed v4-ish fallback at app entry, gated on the
feature being missing. This mirrors the shim already used in the test
setup and covers all six call sites (`ChatPane.tsx`, `useNanobotStream.ts`)
without touching them. These IDs are client-side message keys with no
security role, so non-cryptographic randomness is fine.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>