Update prompt and offline indicator #52

Member

Task 63f6c6c2-2936-4738-9869-432d7a11141d. Toast 'New version ready · Reload' with SKIP_WAITING and reload-once, dismiss hides until next update; 'Offline — showing saved data' pill on navigator.onLine false or a network-error fetch, hidden when back online. Head c1e49db87f.

Task 63f6c6c2-2936-4738-9869-432d7a11141d. Toast 'New version ready · Reload' with SKIP_WAITING and reload-once, dismiss hides until next update; 'Offline — showing saved data' pill on navigator.onLine false or a network-error fetch, hidden when back online. Head c1e49db87fc8b85726a067a2fb52c6d2cda12aa0.
dev_agent added 1 commit 2026-10-04 17:11:28 -04:00
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)
c1e49db87f
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>
review_agent left a comment
Member

Independent review — Codex gpt-6-sol, reasoning high

Verdict: CHANGES_REQUIRED
Reviewed SHA: c1e49db87fc8b85726a067a2fb52c6d2cda12aa0

{
  "verdict": "CHANGES_REQUIRED",
  "reviewed_sha": "c1e49db87fc8b85726a067a2fb52c6d2cda12aa0",
  "summary": "The update prompt and offline event handling match the requested behavior on inspection. Color lint passes. web/node_modules is absent, so typecheck, tests, and build could not be run without installing packages.",
  "findings": [
    {
      "id": "F1",
      "severity": "medium",
      "location": "web/src/api/client.ts:83",
      "failure_case": "Sending a cyclic request body shows “Offline — showing saved data” even though no network request was attempted.",
      "evidence": "JSON.stringify(body) executes inside the try block. Its TypeError is caught and passed to network.requestFailed(), just like a rejected fetch.",
      "suggested_correction": "Serialize the body before the fetch try/catch so only fetch failures can mark the network offline, and add a test for serialization failure."
    }
  ]
}

Posted unaltered by review_agent. This is transport, not a second review.

## Independent review — Codex `gpt-6-sol`, reasoning high Verdict: **CHANGES_REQUIRED** Reviewed SHA: `c1e49db87fc8b85726a067a2fb52c6d2cda12aa0` ```json { "verdict": "CHANGES_REQUIRED", "reviewed_sha": "c1e49db87fc8b85726a067a2fb52c6d2cda12aa0", "summary": "The update prompt and offline event handling match the requested behavior on inspection. Color lint passes. web/node_modules is absent, so typecheck, tests, and build could not be run without installing packages.", "findings": [ { "id": "F1", "severity": "medium", "location": "web/src/api/client.ts:83", "failure_case": "Sending a cyclic request body shows “Offline — showing saved data” even though no network request was attempted.", "evidence": "JSON.stringify(body) executes inside the try block. Its TypeError is caught and passed to network.requestFailed(), just like a rejected fetch.", "suggested_correction": "Serialize the body before the fetch try/catch so only fetch failures can mark the network offline, and add a test for serialization failure." } ] } ``` --- Posted unaltered by `review_agent`. This is transport, not a second review.
overseer added 1 commit 2026-10-05 07:50:23 -04:00
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
0573b39f6d
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>
review_agent requested changes 2026-10-05 07:54:08 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-05 07:59:23 -04:00
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
ce2e94869a
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>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 78c33370f9 into feature/ea4f47b4-6f1e-4735-a33e-6e91bf092564-pwa-shell 2026-10-05 08:13:51 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#52