Skip to content

fix: update-relaunch quit warning + crash-notice click (audit H4/M1) - #311

Merged
arzafran merged 1 commit into
mainfrom
fix/audit-h4-m1-crash-notice-followups
Aug 20, 2026
Merged

fix: update-relaunch quit warning + crash-notice click (audit H4/M1)#311
arzafran merged 1 commit into
mainfrom
fix/audit-h4-m1-crash-notice-followups

Conversation

@arzafran

Copy link
Copy Markdown
Member

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

  • persistSessionForUpdateRelaunch marks isQuitWarningConfirmed = true — choosing to install the update is the quit consent (audit H4).
  • handleNotificationResponse no-tabId branch activates the app instead of silently returning (audit M1); postAppNotification doc comment corrected to match reality.

Full audit report: docs/audits/codebase-audit-2026-08-20.md (uncommitted, local).

Test Plan

  • Unit tests green (no behavior covered by existing suites changes)
  • Manual: with Warn Before Quit ON, install an update — no quit dialog appears, relaunch is clean, no false crash notice
  • Manual: click the crash-recovery notification with the app inactive — a Programa window comes forward

…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.
@arzafran
arzafran merged commit 1966069 into main Aug 20, 2026
10 checks passed
@arzafran
arzafran deleted the fix/audit-h4-m1-crash-notice-followups branch August 20, 2026 12:19
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