Files
open-design/apps/desktop/tests
e4e127d058 fix(desktop): recover from first-launch document-level 502 (#5186)
On initial packaged desktop launch the window could be covered by a raw
502 page near the end of the splash. Two root causes:

1. The od:// protocol handler proxied the top navigation to the web
   sidecar with a single fetch; a transient undici socket throw
   (setTypeOfService EINVAL, #895) on that one attempt became the 502
   document the window rendered.
2. An HTTP 502 response with a body is a successful load to Electron
   (did-fail-load only fires for net::ERR_*), so the existing renderer-
   recovery loop never retried it and the splash revealed the raw 502
   after its 15s ceiling.

Fixes:
- protocol.ts: retry idempotent (GET/HEAD) od:// fetches up to 3x with
  short backoff before surfacing the 502; resolved responses (incl.
  upstream 5xx) and non-idempotent methods keep single-attempt semantics.
- runtime.ts: route 5xx main-frame documents from did-navigate into the
  markRendererFailed reload path, clear rendererFailed before awaiting
  loadURL (so a mid-load did-navigate flag survives), and re-poll a still-
  failed renderer at the prompt cadence. The window now self-heals without
  a manual reload.

Red specs added first (protocol retry contract; 5xx-document recovery
wiring), verified red on main and green on this branch.

Co-authored-by: 박세원 <s-w.park@samsung.com>
2026-07-08 10:56:05 +00:00
..