Update prompt and offline indicator #52

3 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 ce2e94869a Refuse a GET request with a body before fetching so it never marks the network offline
CI / ci (push) Successful in 1m34s
CI / ci (pull_request) Successful in 1m34s
fetch rejects a GET with a body with a TypeError before sending anything,
which the client took for a network failure and showed the offline pill.
apiFetch now refuses such a request with its own error before calling fetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:56:33 -04:00
dev_agentandClaude Opus 5.5 0573b39f6d Serialize the request body before fetching so it never marks the network offline
CI / ci (push) Successful in 1m33s
CI / ci (pull_request) Successful in 1m33s
A body JSON.stringify cannot serialize, such as a cyclic one, threw inside
the fetch try/catch and was recorded as a network failure, showing the
offline pill. It now fails before the fetch with its own error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:49:15 -04:00
dev_agentandClaude Opus 5.5 c1e49db87f Add the update prompt and the offline pill
CI / ci (push) Successful in 1m36s
CI / ci (pull_request) Successful in 1m33s
Independent review Changes required — 1 medium finding(s) (#52)
When a new service worker is waiting to replace the one controlling the
page, a "New version ready · Reload" toast offers to reload. Reload sends
SKIP_WAITING, which src/sw.ts answers with skipWaiting(), and reloads once
on the controllerchange; dismissing hides the toast until a different
worker is waiting.

An "Offline — showing saved data" pill shows while navigator.onLine is
false or the last API request failed with a network error. The network
status store the API client reports to clears on the online event or the
next response, and removes its window listeners on unsubscribe.

Maestro task 63f6c6c2-2936-4738-9869-432d7a11141d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:11:08 -04:00