Skip to content

feat: gentle scheduled update reminders#120

Merged
frankea merged 1 commit into
mainfrom
feat/gentle-update-reminders
Jun 13, 2026
Merged

feat: gentle scheduled update reminders#120
frankea merged 1 commit into
mainfrom
feat/gentle-update-reminders

Conversation

@frankea

@frankea frankea commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Closes the last gap from the upstream review: upstream #765 "Create a Custom Update UI" — implemented as the lighter-touch variant (per discussion), keeping Sparkle's proven update mechanism rather than replacing its user driver wholesale.

Problem

Sparkle's default behaviour pops a focus-stealing update dialog the instant a scheduled background check finds a new version — the abrupt UX the upstream PR set out to improve.

Change

A SPUStandardUserDriverDelegate (SparkleUpdaterDelegate) that opts into Sparkle's gentle scheduled reminders:

  • When a scheduled check finds an update and the app isn't active, the modal is deferred: a Dock-tile badge appears and updateAvailable flips on, so the in-app Check for Updates menu item reads "Install Update…". The user applies it when ready.
  • When the app is active, or the user initiated the check, Sparkle shows its standard alert as before.
  • The actual download / install / relaunch flow is unchanged — still Sparkle's standard, battle-tested UI. This is the key reason for the lighter-touch approach: the parts that can't be CI-verified are left exactly as they are today.

Notes

  • @unchecked Sendable singleton follows the project convention (ProcessRegistry); Sparkle invokes the delegate on the main thread, so each callback hops through MainActor before touching NSApp/@Published (required under the project's Swift 6 complete-concurrency setting).
  • New SparkleUpdaterDelegate.swift registered in project.pbxproj; check.updates.available EN string added to the catalog (Crowdin handles translations).

Verification

  • xcodebuild ... -scheme WhiskyBUILD SUCCEEDED (verified with set -o pipefail).
  • swiftformat --lint / swiftlint lint --strict — clean.
  • Fully CI-buildable; no live-update path was replaced, so nothing here depends on an un-testable update server interaction.

Background update checks no longer interrupt with a focus-stealing dialog.
A SPUStandardUserDriverDelegate defers the alert when the app isn't active:
a Dock badge appears and the Check-for-Updates menu item reads "Install
Update…" so the user can apply it when ready. User-initiated checks and the
download/install/relaunch still use Sparkle's standard UI unchanged.

Closes Whisky-App#765.
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Whisky/Utils/SparkleUpdaterDelegate.swift 5.26% 18 Missing ⚠️

📢 Thoughts on this report? Let us know!

@frankea frankea merged commit 7b2f132 into main Jun 13, 2026
10 checks passed
@frankea frankea deleted the feat/gentle-update-reminders branch June 13, 2026 22:31
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