Skip to content

Add Apple Shortcuts and webhook actions for CodexBar notifications#801

Open
kibermaks wants to merge 3 commits intosteipete:mainfrom
kibermaks:kibermaks/notification-settings-v1
Open

Add Apple Shortcuts and webhook actions for CodexBar notifications#801
kibermaks wants to merge 3 commits intosteipete:mainfrom
kibermaks:kibermaks/notification-settings-v1

Conversation

@kibermaks
Copy link
Copy Markdown

Summary

Adds automation delivery options for CodexBar notification events, plus a dedicated Notifications tab in Preferences.

CodexBar can now route important events to:

  • local macOS notifications
  • configurable notification sounds
  • Apple Shortcuts
  • webhook-style URLs
  • custom URL schemes

This makes notifications useful when the user steps away from the Mac, and it also enables autonomous workflows. For example, a quota-restored event can run an Apple Shortcut that alerts an iPhone or Apple Watch, triggers HomeKit/Home Assistant automation, calls Pushover/ntfy/Telegram/Pushcut, or invokes a webhook that resumes a paused agent/task once quota is available again.

What Changed

  • Adds a new Preferences → Notifications tab.
  • Adds a global notifications toggle.
  • Adds global custom sound volume.
  • Adds per-event settings for:
    • session quota depleted
    • session quota restored
    • provider login successful
    • Augment session expired
  • Adds per-event sound selection and preview.
  • Adds per-event webhook URL delivery.
  • Adds per-event Apple Shortcut execution by shortcut name.
  • Adds starter Shortcut templates/docs under docs/shortcuts.
  • Migrates existing session quota depleted/restored notifications onto the new configurable delivery path.
  • Preserves the legacy session quota notifications setting by mapping it to the split depleted/restored event settings.

Why

The current local macOS notification is useful while actively sitting at the computer, but it does not cover common “step away from the machine” workflows or longer autonomous runs.

This PR lets CodexBar act as the event source and lets users decide what happens next:

  • send an iPhone or Apple Watch notification through Shortcuts
  • flash a light or trigger a HomeKit/Home Assistant scene when quota is restored
  • call a webhook when a provider becomes usable again
  • resume an external automation, queue, or agent workflow after quota recovers
  • route provider-login or Augment-session-expired events to external automations
  • keep local banners/sounds for desktop use
  • disable or customize noisy events independently

The goal is not to make CodexBar own every integration. It exposes clean notification events that can be connected to the automation system users already rely on.

Scope

This PR focuses on notification delivery and notification settings.

It does not add configurable quota threshold warnings yet. That remains a separate feature request, but this gives that work a cleaner delivery layer to build on.

It also does not implement CLI permission-prompt detection yet. The event model should make that easier to add later without duplicating delivery logic.

Related

Related to:

Testing

  • git diff --check
  • swift test
  • swift test --filter SubprocessRunnerTests

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f76fb2c99c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBar/AppNotifications.swift Outdated
Comment thread Sources/CodexBar/AppNotifications.swift Outdated
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