Review-round fixes for the unsaved-settings close guard:
- A pending quit intent is never downgraded by a repeated close click
while the dialog is open, and choosing Stay now explicitly cancels the
intercepted intent in the main process (WINDOW:CANCEL_CLOSE), so a
later close cannot replay a stale quit. Renderer navigation or a crash
also drops the unanswered intent. (Greptile P1)
- Irreversible teardown (MPV/VLC sessions, embedded MPV, DB worker)
moves from 'before-quit' to 'will-quit': the guard can cancel a quit
mid-flight, and 'before-quit' has already fired by then — the old
placement left a cancelled quit with playback and database work
destroyed. (Codex P1)
- The self-updater's quitAndInstall() stands the guard down for exactly
one close (allowNextClose): on macOS it closes windows before
'before-quit', so an armed guard would strand the requested install as
a plain window close. (Codex P2)
- The EPG source e2e now saves the staged form edit before closing the
app; leaving it dirty made the new guard block the close, leaking the
Electron process and timing out the Playwright worker teardown on CI.
closeElectronApp additionally escalates to SIGKILL when SIGTERM is
refused, so a future dirty-form slip cannot wedge the suite again.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>