fix: update-relaunch quit warning + crash-notice click (audit H4/M1) - #311
Merged
Conversation
…el notification click Two defects in yesterday's crash-recovery work, surfaced by today's correctness audit (docs/audits/codebase-audit-2026-08-20.md, H4 and M1): - persistSessionForUpdateRelaunch never set isQuitWarningConfirmed, so a default-config user got the modal quit warning in the middle of a silent update relaunch — and a Sparkle force-kill past the stalled dialog left cleanShutdown=false, firing the crash-recovery notice as a false positive on the next launch. Installing the update IS the quit consent; record it. - handleNotificationResponse's tabId guard was a bare return, so clicking the crash-recovery notice (which carries no tab routing) did nothing beyond the OS's default activation — and action-button clicks did nothing at all. The no-tabId branch now activates the app explicitly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Fixes two defects in Tuesday's crash-recovery work, caught by today's correctness audit: updating no longer risks a modal "Quit Programa?" dialog mid-relaunch (which could stall Sparkle into a force-kill and then show a false "restored after an unexpected exit" notice), and clicking the crash-recovery notification now reliably brings the app forward.
Summary
persistSessionForUpdateRelaunchmarksisQuitWarningConfirmed = true— choosing to install the update is the quit consent (audit H4).handleNotificationResponseno-tabId branch activates the app instead of silently returning (audit M1);postAppNotificationdoc comment corrected to match reality.Full audit report:
docs/audits/codebase-audit-2026-08-20.md(uncommitted, local).Test Plan