feat: gentle scheduled update reminders#120
Merged
Merged
Conversation
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
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:updateAvailableflips on, so the in-app Check for Updates menu item reads "Install Update…". The user applies it when ready.Notes
@unchecked Sendablesingleton follows the project convention (ProcessRegistry); Sparkle invokes the delegate on the main thread, so each callback hops throughMainActorbefore touchingNSApp/@Published(required under the project's Swift 6 complete-concurrency setting).SparkleUpdaterDelegate.swiftregistered inproject.pbxproj;check.updates.availableEN string added to the catalog (Crowdin handles translations).Verification
xcodebuild ... -scheme Whisky— BUILD SUCCEEDED (verified withset -o pipefail).swiftformat --lint/swiftlint lint --strict— clean.