Skip to content

fix(window): preserve session close requests during iframe loading - #35492

Closed
OrcaWin wants to merge 1 commit into
mainfrom
audit/session-close-subframe-loading
Closed

OrcaWin wants to merge 1 commit into
mainfrom
audit/session-close-subframe-loading

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

LoC: +62/-5

Keep pending session-close acknowledgements alive while sandboxed iframes load or update. Electron emits did-start-loading for subframes even when the main document is intact; the relay previously rejected every request as renderer_unavailable. Filter that event with isLoadingMainFrame(), retaining cancellation at main-document load start and on crash/destruction/closure. Reuse the existing shared event fanout.

Validation: 23 configured tests across3 suites pass, including existing renderer close/confirmation controls; exact old relay fails3 new regressions and passes11 controls. Strict focused TypeScript and all five normal hook tasks pass. Exact baseline and committed production bundles run in16 hidden Linux Electron43.8.1 windows: sandboxed srcdoc creation/update and same-document changes preserveN1/10 live requests in final, with real preload IPC acknowledgements; main reload still rejects all. Frame identity/main-document markers prove subframe owner survival. All owned processes/profiles/windows clean up; no presentation/focus calls. Eight pinned production/caller blobs equal main5748d11d.

Required aggregate queued after #35490; no aggregate pass or Claude takeover claimed. Native evidence covers event/IPC contracts, with no rendered Orca confirmation UI/CDP screenshot, native macOS/Windows, CPU, heap or latency claim. An initial unconfigured renderer-test run failed alias resolution; the configured rerun passes. The earlier native final arm preceded formatting; the exact committed arm was repeated separately and is authoritative. No installs or dependency repair.

Mobile-initiated host close acknowledgements benefit without peer/wire changes. Folder/git routing and UI styling are unchanged. Frozen head 4909c82e237e3dd46fc55580770eb2746c1ac2aa, base 79dbada2c873bef3584a0c53b23ae98f2a84e536. Evidence: /home/neil/.local/state/orca-electron-audit/session-close-subframe-loading/report.md.72-payload seal: b2983791b7da40f76c176eeaf2ba118314bedec2b2ca72840c87de7f9f7391c5.

@OrcaWin

OrcaWin commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. The mechanism is real: a subframe did-start-loading cancels a pending session-tab close. But the renderer acks these requests synchronously unless it is showing the pinned-tab confirmation (session-tab-ipc-bridge.ts guardPinnedTabClose). So hitting this needs a pinned tab closed from the phone, confirmation turned on, and an iframe starting to load while the modal is open. Even then the only result is a wrong error on the phone. That is too rare to justify the change plus 55 lines of tests (including an it.each([1,10]) count variant), so closing.

Closing per maintainer triage (low-risk / zero user trade-off / material-gain bar).

@OrcaWin OrcaWin closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant