Repository navigation
Close and quit vetoes are async AppKit hooks; deadline expiry keeps the window open #425
Description
Activity
- addedwayfinder:grillingWayfinder human decisionWayfinder human decisionelectron-compatElectron compatibility program areaElectron compatibility program area
on Oct 6, 2026 Generated by an AI agent (Claude Code, Fable 5.1) on behalf of @0monish during Wayfinder charting of the Electron compatibility program, 2026-10-06. Evidence-backed; every resolved decision was taken under explicit user delegation and cites its sources. Planning only — no implementation is authorized by this issue.
Resolution
The host never blocks its UI thread on Bun: windowShouldClose: returns NO and the host closes programmatically after Bun allows; app quit routes through applicationShouldTerminate: (delay, then reply(toApplicationShouldTerminate:)) because windowShouldClose is not called on quit. If Bun does not answer, the window stays open with a diagnostic and the role is flagged; the host closes a window on its own only when the Bun generation is revoked. Host auto-close on timeout is a fabricated completion and is refused. 'Suspend host→Bun CALL deadlines while parked' is dropped: 02 §7's deadline is a frame-stall clock, not a reply bound, and the clock that actually fires is the writer buffer. Neither AppKit primitive exists in keld-wv/keld-core today.
Evidence
- [fact] electron v44.4.5 shell/browser/ui/cocoa/electron_ns_window_delegate.mm windowShouldClose: 'shell_->NotifyWindowCloseButtonClicked(); return NO;' (fetched 2026-10-06)
- [fact] scratchpad/browser_window.cc:158-172 OnCloseButtonClicked sets *prevent_default=true, DispatchBeforeUnload when needed
- [fact] Apple windowShouldClose(_:) 'this method is not called when a user quits an application' (developer.apple.com JSON, fetched 2026-10-06)
- [fact] Apple applicationShouldTerminate(_:) 'delay it somewhat ... then terminate ... by calling the reply(toApplicationShouldTerminate:) method' (fetched 2026-10-06)
- [fact] kel142:321 'no UI thread blocks on Bun, app-link I/O, or handler completion'; kel139:354 mapping 'cannot fabricate a native completion/effect result'
- [fact] grep windowShouldClose|NSWindowDelegate|performClose|applicationShouldTerminate|NSTerminateLater in crates/keld-wv/src crates/keld-core/src = 0 hits
- [fact] drawio electron.js:947-963 preventDefault on every close, then contents.send('isModified')
Resolved autonomously under the user's delegation (map Notes); reopen by comment if evidence contradicts this.
Parent map: #391 · Unit: perspective panel (8 isolated personas → cross-critique → 3 judges) · Wayfinder type:
grillingQuestion
Close and quit vetoes are async AppKit hooks; deadline expiry keeps the window open
Summary
The host never blocks its UI thread on Bun: windowShouldClose: returns NO and the host closes programmatically after Bun allows; app quit routes through applicationShouldTerminate: (delay, then reply(toApplicationShouldTerminate:)) because windowShouldClose is not called on quit. If Bun does not answer, the window stays open with a diagnostic and the role is flagged; the host closes a window on its own only when the Bun generation is revoked. Host auto-close on timeout is a fabricated completion and is refused. 'Suspend host→Bun CALL deadlines while parked' is dropped: 02 §7's deadline is a frame-stall clock, not a reply bound, and the clock that actually fires is the writer buffer. Neither AppKit primitive exists in keld-wv/keld-core today.
Evidence
Context
Raised by the eight-persona perspective panel (isolated positions → cross-critique → three judges); judge extracts and persona positions are on the research branch (
wayfinder/electron-compat/panel/).