@hydra-acp/browser 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/sw.js CHANGED
@@ -17,12 +17,21 @@ self.addEventListener("activate", (event) => {
17
17
  event.waitUntil(self.clients.claim());
18
18
  });
19
19
 
20
- // A no-op passthrough. Chrome's install-eligibility check wants a
21
- // fetch handler present, even though this worker does no offline
22
- // caching; without one, the install prompt doesn't show.
23
- self.addEventListener("fetch", (event) => {
24
- event.respondWith(fetch(event.request));
25
- });
20
+ // Chrome's install-eligibility check wants a fetch handler present,
21
+ // even though this worker does no offline caching; without one, the
22
+ // install prompt doesn't show. Registering the listener is enough — it
23
+ // deliberately does NOT call respondWith, so every request falls
24
+ // through to the network exactly as if no service worker existed.
25
+ //
26
+ // This used to be `event.respondWith(fetch(event.request))`, described
27
+ // as a pure passthrough. It isn't: respondWith makes the worker the
28
+ // responder, so a rejected fetch becomes a synthetic network-error
29
+ // response plus an uncaught rejection in the worker, instead of the
30
+ // ordinary failure the caller already handles. Any moment the server
31
+ // is briefly unreachable (an extension restart, a dropped tailnet
32
+ // link) surfaced as a hard ERR_FAILED and console noise rather than a
33
+ // retryable poll error.
34
+ self.addEventListener("fetch", () => {});
26
35
 
27
36
  // Payload shape is whatever turn-notify-callback.ts's sendPushToAll
28
37
  // sends: { title, body, url, tag }. No push subscription rides through
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydra-acp/browser",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Browser-based UI for hydra-acp sessions.",
5
5
  "license": "MIT",
6
6
  "type": "module",