You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS menubar: post a system notification when an update is available #1261
Today UpdateChecker polls the GitHub releases API every 2 days and surfaces the result only as the "Update" badge inside the popover, the "CLI x.y.z available" banner, and the "Check for Updates" menu item. If I do not open the popover I never learn that a release shipped, and releases land roughly weekly (v0.9.23 on 08-29, v0.9.24 on 09-04). There is no UNUserNotificationCenter usage anywhere under mac/, so nothing proactive reaches the user.
When check() detects updateAvailable or cliUpdateAvailable, post one UNUserNotificationCenter notification per new version (deduped with a UserDefaults key so it does not repeat every 2 days).
Clicking the notification calls the existing performFullUpdate(), so the one-click path stays the single update code path.
Add a "Notify me about updates" toggle in Settings. Notification permission is requested lazily the first time a notification would be posted. I can default it to off if you prefer no new permission prompt.
No change to the CLI, the check interval, or the release/install flow.
Scope is contained to UpdateChecker.swift, CodeBurnApp.swift (notification delegate + click handling) and SettingsView.swift, with unit coverage for the dedupe logic under mac/Tests.
I am happy to implement this if the approach is acceptable. Filing here first per CONTRIBUTING.
Thanks for the write-up, the diagnosis was exact. We took it on directly since it touched the app delegate and settings we were already in: #1283 follows your proposal (one notification per version pair, UserDefaults dedupe, click runs performFullUpdate, Settings toggle default on, lazy permission request) with two adjustments. The notification only fires from the background poll, since a manual Check for Updates already shows its result in an alert. And the notification side sits behind a small protocol so tests never touch UNUserNotificationCenter, which aborts outside an app bundle.
One caveat you may hit: release builds are ad-hoc signed, so macOS can re-ask for notification permission after an update. Proper signing is a separate item on our side.
Activity
iamtoruk commentedon Sep 10, 2026
Thanks for the write-up, the diagnosis was exact. We took it on directly since it touched the app delegate and settings we were already in: #1283 follows your proposal (one notification per version pair, UserDefaults dedupe, click runs performFullUpdate, Settings toggle default on, lazy permission request) with two adjustments. The notification only fires from the background poll, since a manual Check for Updates already shows its result in an alert. And the notification side sits behind a small protocol so tests never touch UNUserNotificationCenter, which aborts outside an app bundle.
One caveat you may hit: release builds are ad-hoc signed, so macOS can re-ask for notification permission after an update. Proper signing is a separate item on our side.