Skip to content

feat: add auto-update checker via GitHub Releases API#10

Merged
pasrom merged 6 commits intomainfrom
feat/auto-update-checker
Mar 14, 2026
Merged

feat: add auto-update checker via GitHub Releases API#10
pasrom merged 6 commits intomainfrom
feat/auto-update-checker

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 12, 2026

Summary

  • Lightweight update checker that queries GitHub Releases API for new versions (no Sparkle dependency)
  • UpdateProviding protocol with GitHubReleaseProvider — mock-injectable for tests
  • Semver comparison, deduplication via checkTask, periodic checks (30s delay → every 24h)
  • Settings: "Check for Updates" toggle, "Include Pre-Releases" toggle, "Check Now" button with status
  • MenuBarView: "Update Available: vX.Y.Z" indicator with direct DMG download link
  • Supports stable-only and pre-release channels

Test plan

  • swift build succeeds
  • swift test — all 459 tests pass (27 new tests for UpdateChecker, AppSettings, SettingsView, MenuBarView)
  • Open Settings → Updates → "Check Now" → verify "Up to date" (current v0.3.0 > latest release v0.2.0)
  • Verify MenuBarView shows update indicator when a newer release exists

@pasrom pasrom force-pushed the feat/auto-update-checker branch from add1c74 to 3a113b4 Compare March 14, 2026 14:53
pasrom added 5 commits March 14, 2026 16:30
Lightweight update checker (no Sparkle) that queries GitHub Releases
API and compares semver versions. Includes UpdateProviding protocol
for testability, GitHubReleaseProvider, and deduplication via checkTask
pattern (like WhisperKitEngine.loadingTask).
New checkForUpdates (default true) and includePreReleases (default false)
properties with UserDefaults persistence.
New "Updates" section with check toggle, pre-release toggle, Check Now
button with spinner, status display (error/update/up-to-date), and
download button. Follows OpenAI connection test pattern.
Shows "Update Available: vX.Y.Z" menu item before Settings when an
update is detected. Clicking opens the DMG URL or release page.
Add @State updateChecker, pass to MenuBarView and SettingsView,
start periodic checks (30s delay, then every 24h) via .task modifier.
@pasrom pasrom force-pushed the feat/auto-update-checker branch from 3a113b4 to 716fc52 Compare March 14, 2026 15:30
@github-actions github-actions bot added the enhancement New feature or request label Mar 14, 2026
Small upward arrow in bottom-right of waveform icon when an update
is detected and the app is idle. Complements the existing "Update
Available" entry in the dropdown menu.
@pasrom pasrom merged commit fbd9288 into main Mar 14, 2026
3 checks passed
@pasrom pasrom deleted the feat/auto-update-checker branch March 14, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant