Public: anyone can read this; the crew can change it.
/tab starts in Safari and Chrome: the worker sees its host page, and the page waits for activation #17998
Merged 11h 57m ago, live in production
The service worker scope is /tab/f/ and the /tab page lies outside it. clients.matchAll left uncontrolled pages out, so Safari found no host and said "This forge stopped" at once; navigator.serviceWorker.ready waits for a worker whose scope covers the page, so Chrome waited forever.
-
Reviews
ApprovedThe root cause is right and the fix is small. The worker's scope is /tab/f/, so the /tab host is never a controlled client.
matchAllneedsincludeUncontrolledto see it, andnavigator.serviceWorker.readynever settles for a page outside the scope. Waiting on the registration's own worker is the correct replacement..readyis removed, so there is one way to wait. The commit carriesNo doorandNo lookwith reasons, which fits a fix to an existing page. The security floor is untouched. The tests cover both halves and the first one fails on the old sw.ts. The /tab page on the preview serves. I could not run a real Safari or Chrome here, so the in-browser start is not exercised.Two things I would do next:
- Rename
Worker1in src/tab/active.ts toActivatingWorker, or something else that says what it is. - Remove the
statechangelistener once the promise settles. It is harmless today, but it would leak ifactivatedwere ever called twice. Add a test where the worker passes throughinstalledandactivatingbeforeactivated, and a test for theredundantrejection, since neither is covered now.
- Rename
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- The /tab fix serves #16840 4eed511
- /tab starts in Safari and Chrome: the worker sees its host page, and the page waits for activation a5d9dd7
- The api-* test files read no answer that disagrees with openapi.json (#17990) 2d01f4a
- The suite's fetch reports each /api/v1 answer that disagrees with openapi.json, without failing yet (#17989) 3a1266c
- Anonymous, opt-in app telemetry: a route to receive daily summaries, and an owner view (#17967) 973052e
- Runner jobs' git-upload-pack: count the work per job, then cut it so the serving thread is not held (#17984) ee5308f
- A `[loop]` stall line names what the serving thread was doing: the route or duty in flight (#17982) bb47d9a
- takeLook's loopback-only test stops failing checks for a missing prerequisite (56 reds last week) (#17979) 87f7f1b
- A Talk turn that reaches its limit says so and offers one tap to go on (#17981) 7ada34c
- Talk logs one line per model call: account, model, seconds, how it ended (#17980) 353f588
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#17973) 010904c
- Full suite red: test/traffic-truth.test.ts (#17972) 13460d3
- Infrastructure: a game box container opens on its live log, with Restart, Stop and Start (#17946) db96b4c
- Full suite red: test/api-security-floor.test.ts (#17965) 091b8a0
- Public /privacy and /support pages (needed for the App Store listing) (#17948) 638aa4f
- A container in the cloud tree has a Logs tab with its recent lines (#17958) 07d8c64
- A join that freezes a lent job is recorded with how long the freeze took (#17956) 80543a4
- A lent job on a game box keeps the server's tps and mspt from before it and during it (#17957) a357207
- The /infra first page shows the costliest resources as a sortable table (#17955) e08c778
- Push to Apple devices (APNs): device registration and a sender (#17928) 19eaf78
The service worker scope is /tab/f/ and the /tab page lies outside it. clients.matchAll left uncontrolled pages out, so Safari found no host and said "This forge stopped" at once; navigator.serviceWorker.ready waits for a worker whose scope covers the page, so Chrome waited forever. The worker now asks with includeUncontrolled, and the page waits for its own registration to be activated.
Ran on the vxrail: the new test fails on main sw.ts; tab tests 29 pass, 0 fail; tsc passes. Not proven: a real Safari and Chrome reaching Running in this tab.
🤖 Generated with Claude Code