Keep cold launches usable during dashboard HTTP outages #230

Closed
opened 2026-08-07 21:28:00 +00:00 by timmy · 0 comments
Owner

Problem

The installed dashboard only falls back to its cached app shell when fetch() rejects. A 500, 502, 503, or 504 navigation is returned directly, and an initial API failure while navigator.onLine is true does not hydrate the opted-in private My Work snapshot. Deploy, proxy, application, and upstream outages therefore strand mobile users despite valid cached data.

User value

Keep saved My Work and drafts readable during server-side outages, clearly marked stale and read-only, then recover live behavior automatically when polling succeeds.

Acceptance criteria

  • Same-origin navigation responses with 500/502/503/504 use the cached shell when available; other statuses, APIs, non-GET, and cross-origin requests retain current behavior.
  • If no shell is cached, preserve the original HTTP error.
  • An initial live-context failure hydrates a valid opted-in My Work snapshot even when the browser reports online and shows honest degraded/outage status.
  • A healthy poll exits degraded mode and restores live actions.
  • Focused behavioral tests and the full suite pass.

Non-duplication evidence

Issues #226/#227 added network-error app-shell fallback; #228/#229 added the private snapshot; #149/#150 retained already-live snapshots during refresh failure. None handles a cold launch receiving an HTTP error, and the current service-worker test explicitly expects a 503 to remain 503.

## Problem The installed dashboard only falls back to its cached app shell when `fetch()` rejects. A `500`, `502`, `503`, or `504` navigation is returned directly, and an initial API failure while `navigator.onLine` is true does not hydrate the opted-in private My Work snapshot. Deploy, proxy, application, and upstream outages therefore strand mobile users despite valid cached data. ## User value Keep saved My Work and drafts readable during server-side outages, clearly marked stale and read-only, then recover live behavior automatically when polling succeeds. ## Acceptance criteria - Same-origin navigation responses with 500/502/503/504 use the cached shell when available; other statuses, APIs, non-GET, and cross-origin requests retain current behavior. - If no shell is cached, preserve the original HTTP error. - An initial live-context failure hydrates a valid opted-in My Work snapshot even when the browser reports online and shows honest degraded/outage status. - A healthy poll exits degraded mode and restores live actions. - Focused behavioral tests and the full suite pass. ## Non-duplication evidence Issues #226/#227 added network-error app-shell fallback; #228/#229 added the private snapshot; #149/#150 retained already-live snapshots during refresh failure. None handles a cold launch receiving an HTTP error, and the current service-worker test explicitly expects a 503 to remain 503.
timmy closed this issue 2026-08-07 21:34:13 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#230
No description provided.