Skip to content

[codex] Add silent update availability checks - #32

Merged
ygsgdbd merged 2 commits into
mainfrom
codex/silent-update-check
Jul 16, 2026
Merged

[codex] Add silent update availability checks#32
ygsgdbd merged 2 commits into
mainfrom
codex/silent-update-check

Conversation

@ygsgdbd

@ygsgdbd ygsgdbd commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a quiet Sparkle update probe when ListenBar launches. The app does not present an update window during this probe; instead, the menu entry changes from “Check for Updates…” to “New Version Available…” when a valid release is found.

Problem and user impact

ListenBar previously started Sparkle with automatic checks disabled and only checked for updates after the user selected the menu command. Users therefore had no passive indication that a newer release was available.

A naive probing implementation also risks leaving the menu command disabled forever: Sparkle documents that checkForUpdateInformation() is a no-op when another update session is already in progress, so no completion callback is delivered in that case.

Root cause

The app had no updater delegate or observable update state. The menu label was static and called the user-initiated Sparkle flow directly. There was also no guard around Sparkle's sessionInProgress state before entering the local checking state.

Changes

  • Add SparkleUpdateMonitor to track idle, checking, and update-available states through SPUUpdaterDelegate callbacks.
  • Run checkForUpdateInformation() once at app launch while keeping SUEnableAutomaticChecks=false.
  • Skip the silent probe when Sparkle already has an active update session, leaving the menu usable.
  • Disable the menu command only while a probing cycle is actually running.
  • Keep all update windows user initiated through the existing menu command.
  • Add Simplified Chinese, Traditional Chinese, and English copy for the update-available label.
  • Add regression tests for successful probes, no-update and error results, active Sparkle sessions, and user-initiated checks.

Validation

  • rtk tuist generate --no-open
  • rtk xcodebuild build-for-testing -quiet -project ListenBar.xcodeproj -scheme ListenBar -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation CODE_SIGN_IDENTITY='' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
  • rtk xcodebuild test-without-building -quiet -project ListenBar.xcodeproj -scheme ListenBar -destination 'platform=macOS' -testLanguage zh-Hans CODE_SIGN_IDENTITY='' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
  • SwiftFormat 0.62.1 lint
  • String Catalog JSON validation
  • git diff --check

The build continues to emit the repository's existing Swift 6 Sendable warnings; all validation commands completed successfully.

@ygsgdbd
ygsgdbd marked this pull request as ready for review July 16, 2026 07:06
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ygsgdbd
ygsgdbd merged commit 8e150d1 into main Jul 16, 2026
2 checks passed
@ygsgdbd
ygsgdbd deleted the codex/silent-update-check branch July 16, 2026 07:06
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