Skip to content

Check for updates once daily#771

Merged
FuJacob merged 2 commits into
FuJacob:mainfrom
akramj13:codex/update-daily-check-cadence
Jul 5, 2026
Merged

Check for updates once daily#771
FuJacob merged 2 commits into
FuJacob:mainfrom
akramj13:codex/update-daily-check-cadence

Conversation

@akramj13

@akramj13 akramj13 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • enforce a 24-hour Sparkle update-check interval for existing and new installations
  • remove the unconditional background update check on every app launch
  • preserve manual update checks from the menu bar and Settings

Fixes #768

Root cause

Sparkle persists its update interval in user defaults, which take precedence over the value in CotabbyInfo.plist. Existing installations could therefore retain a shorter interval. Cotabby also called checkForUpdatesInBackground() on every launch, bypassing Sparkle's normal last-check scheduling.

User impact

Automatic update checks now occur at most once per day. Sparkle continues to use its persisted last-check date, while users can still request an immediate check manually.

Validation

  • git diff --check
  • plutil -lint CotabbyInfo.plist
  • unsigned production build: xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build -derivedDataPath build/DerivedData CODE_SIGNING_ALLOWED=NO -quiet
  • verified the built app contains SUScheduledCheckInterval = 86400

Greptile Summary

This PR changes Sparkle update checks to follow a daily cadence. The main changes are:

  • Applies a 24-hour automatic update-check interval in code.
  • Starts Sparkle with that interval before scheduling begins.
  • Replaces the launch-time unconditional background check with a last-check-date catch-up check.
  • Keeps manual update checks available through existing UI paths.

Confidence Score: 4/5

This is close, but one launch-check behavior should be fixed before merging.

  • The catch-up path can still run a background update check when automatic checks are disabled.
  • The interval and last-check-date logic otherwise matches the intended daily cadence.

Cotabby/Services/Utilities/AppUpdateManager.swift

Important Files Changed

Filename Overview
Cotabby/Services/Utilities/AppUpdateManager.swift Applies the daily Sparkle interval and adds a launch catch-up check based on the persisted last-check date.

Fix All in Codex Fix All in Claude Code

Reviews (3): Last reviewed commit: "fix: catch up overdue update checks at l..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@akramj13 akramj13 changed the title [codex] check for updates once daily Check for updates once daily Jul 4, 2026
@akramj13

akramj13 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai

Comment thread Cotabby/Services/Utilities/AppUpdateManager.swift
@akramj13

akramj13 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai

@akramj13 akramj13 marked this pull request as ready for review July 5, 2026 06:09
Comment on lines +73 to +75
if shouldCatchUp {
updater.checkForUpdatesInBackground()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Respect Disabled Checks

When automatic update checks are disabled, this catch-up path can still call checkForUpdatesInBackground() after the stored last-check date is missing or older than 24 hours. That makes launch contact the update feed even though the user disabled automatic checks. Gate the catch-up call on automaticallyChecksForUpdates so manual checks still work while automatic launch checks stay off.

Suggested change
if shouldCatchUp {
updater.checkForUpdatesInBackground()
}
if updater.automaticallyChecksForUpdates && shouldCatchUp {
updater.checkForUpdatesInBackground()
}

Fix in Codex Fix in Claude Code

@FuJacob FuJacob merged commit acfd548 into FuJacob:main Jul 5, 2026
5 checks passed
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.

[Bug] Tries to look for updates every 2 minutes.

2 participants