aboutsummaryrefslogtreecommitdiffstats
path: root/tools/sw-reload-test.js
Commit message (Collapse)AuthorAgeFilesLines
* Browser tests: public relays answered in the page, never reachedAdam Soltys8 days1-1/+1
| | | | | | | | | | | | | | A suite run let ~90 throwaway test wallets subscribe and publish on public relays from one home address, and nos.lol and relay.damus.io banned it. tools/puppeteer.js wraps puppeteer-core: every socket to a non-local host gets an in-page stand-in relay (EVENT -> OK, REQ -> EOSE). Tests that read real content launch with { relays: 'read' } (real reads, publishes answered in place); feed-live, chat-layout and cordn-ui launch with { relays: 'live' }. LIVE_RELAYS=read|1|host,... overrides per run. profile-key-qr: measure the QR again if a repaint swapped it out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* unread-dot, sw-reload tests follow the bottom nav and the split buildAdam Soltys8 days1-1/+3
| | | | | | | | | - unread-dot: the front door's way to import is Create a new wallet → Have an existing seed; the dot is the Messages bottom-nav button's - sw-reload: the split build loads app-<token>.js, so a restamped build asks for app-deadbeef….js; serve the real entry for it Co-Authored-By: Claude Opus 5.5 <[email protected]>
* A deploy shouldn't refresh the page out from under youAdam Soltys2026-08-031-0/+95
The app is inlined in the page, so when a new service worker took control the page reloaded — otherwise it would keep running the old build. But navigations are network-first: the refresh that triggered the update had already fetched the new page, so the reload landed a second or two later as an unasked-for second refresh. The page and the worker now carry the same build token and the page asks which build took over, reloading only on a real mismatch. The token is hashed before substitution, since a page cannot contain a hash of itself. tools/sw-reload-test.js pins all three cases against a swappable server: a first visit doesn't reload itself, a refresh after a deploy is the only refresh, and a page left sitting open across a deploy is still reloaded — exactly once. The previous build takes two loads for one manual refresh; this one takes one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi