Repository navigation
fix(pwa): keep app windows out of shell fallback - #13205
Conversation
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Verify on a real multi-display run that a blanked Crew Companion overlay reappears within the reconcile cadence after gateway recovery — the author's manual repro covered Mochi, not Crew Companion. [UX-REVIEWED] 01cfebb |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify rollout: an already-installed stale Suggestions
[DESIGN-REVIEWED] 01cfebb |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the did-navigate/did-fail-load-before-did-finish-load ordering premise on Windows/Linux Electron — manual repro covered macOS only, and the reveal guard rests on it. What this change shipsInventory (8 items) — 8 justifiedIntent: stop a failed standalone app-window navigation from filling a frameless full-display overlay with the cached Dashboard shell or an error document — a FIX, with regression test failing on base.
Checks run: base [FIRST-PRINCIPLES-REVIEWED] 01cfebb |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
e40a370 to
a13135d
Compare
|
span=be25fce19271
|
|
span=fc1563beba2e
|
|
span=3cd865fb85b6
|
a13135d to
c2c060f
Compare
|
span=f1b008c24e58
|
|
span=5a6f5c9634fc
|
c2c060f to
7b4ff3a
Compare
|
span=7c01a9c496a7
|
|
span=9164f7121eb4
|
|
span=084fa6883c12
|
|
span=1fb8db357f2d
|
|
span=f329890e9247
|
Standalone app-window navigations are not SPA routes. Let the browser handle them so an offline shell cannot fill a frameless overlay.
7b4ff3a to
01cfebb
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving after an automated readiness screen against this head:
readiness: passedlabel present and thePR Readinessrequired status is green on this head- no failing, cancelled or pending required check on this head
mergeablewith no conflict against currentmain- no live reviewer
CHANGES_REQUESTED(GitHubreviewDecisionis notCHANGES_REQUESTED) - every review-lane finding on this head is either PASS, withdrawn, disposed of by the author, or advisory-only — no unresolved blocking change request
Auto-merge (squash) is enabled; branch protection still gates the merge.
Standalone app-window navigations are not SPA routes. Let the browser handle them so an offline shell cannot fill a frameless overlay. Co-authored-by: Rui Tao <ruit@amazon.com>
Problem / Motivation
A macOS dogfood run with Mochi enabled on an external display left a full Dashboard page covering that display inside an always-on-top, non-focusable window. The window had no controls and could not be dismissed normally. Inspection showed that the Mochi overlay requested its standalone pet page, but the active Service Worker satisfied the failed navigation from the cached Dashboard shell. This latent behavior predates #12126; validating that merged fix made the failure visible.
Why it matters
Mochi and Crew Companion use frameless windows that cover an entire display. Showing the Dashboard shell or a browser error document inside one can make that display unusable until the overlay is destroyed or the app exits.
What changed
The Dashboard Service Worker in
website/public/sw.jsnow leaves every/app-windows/request to the browser instead of treating standalone window documents as SPA routes. Dashboard navigation fallback and the existing retry behavior for/assets/and/vendor/resources remain unchanged.A shared Electron error-document latch now owns the HTTP status, transport failure, sub-frame, superseded-navigation, and blanked-window semantics used by Mochi and Crew Companion. Each host keeps its own visibility, credential delivery, retry cadence, target switching, and ownership lifecycle. No dependencies or lockfiles change;
website/electron/package.jsononly includes the shared module in electron-builder's explicit packaging allowlist.Crew Companion's host under
website/electron/crew-companion/uses that latch for both display overlays and its hidden notification owner. A main-frame 4xx/5xx response or transport failure immediately hides a display overlay, restores click-through input, and keeps an error document from becoming the notification owner. The existing enabled-state reconcile loop reloads only failed windows, and only after the gateway accepts the current credential.docs/system-specs/modules/app-kit-platform.mdand the remote/mobile cache guide now describe this boundary.Pattern harvest
Rule candidate: every frameless full-display app window must bypass the Dashboard SPA shell fallback and fail closed before a non-successful main-frame navigation can reveal content or establish background ownership.
Tests
/app-windows/navigation, then passes with the exclusion.serviceWorkerSkipRules.test.ts: 16/16 passed, including Dashboard fallback preservation and app-window asset retry coverage.main; GitHub CI remains authoritative for that matrix.Manual verification
The original failure was reproduced on Electron 43 and macOS 26 with an external display. WindowServer and Electron inspection identified the covering window as a live Mochi overlay whose pet-page request was served the cached Dashboard shell. The abnormal overlay was destroyed and rebuilt with the correct pet page without restarting the Dashboard session or gateway.
Related Issues
No linked issue: this latent cross-surface cache bug was discovered while validating post-merge feedback on #12126.
Checklist