fix(app): bound the wake/quit paths implicated in the phone-session-ended freeze (#9447) (#9853)

* fix(app): bound the wake/quit paths implicated in the phone-session-ended freeze (#9447)

- relay-transport: waitForClose now times out (5s) so a half-open post-sleep
  socket can't wedge runtimeRpc.stop()
- will-quit: race teardown against a 20s deadline so app.quit() always runs
  (Force Quit was the only escape when any teardown member never settled)
- terminal-fit-restore: local restoreTerminalFit invoke gets the same 15s
  bound as the remote path so the held-fit modal buttons can't pin disabled

* fix(app): close wake recovery timeout gaps

* fix(relay): drop late frames after forced teardown

* fix(relay): fence detached socket callbacks

* fix(app): close timeout resource gaps

* fix(relay): detach retired mobile transports

* fix(types): exclude absent stat overloads

* fix(runtime): expire wedged terminal restore dedupe

* fix(runtime): keep restore retries on one reclaim

* chore(skills): refresh bundled skill manifests

* fix(window): fence quit acknowledgements by request

* fix(relay): bound revoked device socket cleanup
This commit is contained in:
Brennan Benson
2026-07-23 18:03:43 -07:00
committed by GitHub
parent 87c59dd27d
commit bded1fb2c0
17 changed files with 938 additions and 60 deletions
+8 -2
View File
@@ -3863,8 +3863,14 @@ const api = {
/** Fired by main when the user tries to close the window; renderer confirms running
* terminals then calls confirmWindowClose(). isQuitting (Cmd+Q / app.quit) skips that dialog. */
onWindowCloseRequested: (callback: (data: { isQuitting: boolean }) => void): (() => void) => {
const listener = (_event: Electron.IpcRendererEvent, data: { isQuitting: boolean }) =>
callback(data ?? { isQuitting: false })
const listener = (
_event: Electron.IpcRendererEvent,
data: { isQuitting: boolean; requestId?: number }
): void => {
// Why: main cannot reach will-quit while a frozen renderer owns the window close handshake.
ipcRenderer.send('window:close-request-received', data?.requestId)
callback({ isQuitting: data?.isQuitting ?? false })
}
ipcRenderer.on('window:close-requested', listener)
return () => ipcRenderer.removeListener('window:close-requested', listener)
},