Skip to content

macOS menubar: post a system notification when an update is available #1261

Description

@ShunmeiCho

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.

Environment: macOS 26 (Darwin 25.6.0), CodeBurnMenubar 0.9.24, CLI 0.9.24 via npm -g.

Proposal

  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions