Originally created by: kristofferR
Issue [#179] tracks the remaining gaps in Carrier’s macOS integration.
This adds inline notification replies with restart-safe routing and fallback handling; configurable notification grouping, clear-on-view, and Dock attention; strict carrier:// automation URLs; and a live-switchable symbolic menu-bar icon. The native action plumbing is shared with existing CLI and Dock actions, and the new notification settings remain independent.
It also fixes an unrelated macOS audio bug found while testing (#232): with a Bluetooth output selected, leaving Carrier open silenced AirPods system-wide. Messenger keeps a running AudioContext, so WebKit registers an audio session for the page; with the default .suspend inactive-scheduling policy the hidden window's WebContent process drops to its suspended state ~240 s after hiding, and from then on every process resume/suspend (driven by Carrier's own watchdog ping and Tauri IPC) makes WebKit reactivate and deactivate that session milliseconds apart — regardless of whether anything is playing — so audioaccessoryd re-routes Bluetooth ~60×/min. Suspending the AudioContext is not enough (a suspended context stays registered and WebKit re-toggles its session anyway); the fix builds the Messenger window with background throttling disabled (WKPreferences.inactiveSchedulingPolicy = .none) so the process stays in the background state instead of cycling through suspension. Carrier already keeps the page alive in the background, so this fits. Verified on macOS 27: hidden past the grace, zero audio-session flips.
Validation:
Ref [#173]
Ref [#174]
Ref [#176]
Ref [#178]
Ref [#179]
Ref [#232]
Added macOS inline notification replies and conversation routing.
Improvements
Tickets: #173
Tickets: #174
Tickets: #176
Tickets: #178
Tickets: #179
Tickets: #232
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
⚠️ Action not completed
Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: coderabbitai[bot]
📝 Walkthrough
## Walkthrough The PR adds shared native action routing, route-aware macOS notifications and replies, persistent notification routes, viewed-thread reporting, notification clearing, macOS tray styling, and related settings and validation. ### Changes **Native actions and notifications** |Layer / File(s)|Summary| |---|---| |**Shared native action routing**`src-tauri/src/actions.rs`, `src-tauri/src/cli.rs`, `src-tauri/src/lib.rs`, `src-tauri/src/menu.rs`, `src-tauri/src/window.rs`, `src-tauri/Info.plist`|CLI flags, menus, macOS URLs, and page lifecycle events use validated `AppAction` dispatch with pending-action handling.| |**macOS notification delivery**
`src-tauri/src/macos/notifications.rs`, `src-tauri/Cargo.toml`|macOS notifications support persisted thread routes, conversation grouping, inline replies, reply categories, delayed pairing, and conversation-based cleanup.| |**Notification routes and reply workers**
`src-tauri/src/notifications.rs`, `inject/src/messenger/features/quick-reply.ts`, `src-tauri/inject/messenger.js`|Notification routes persist across restarts. Linux and macOS replies use bounded workers, route-aware fallbacks, acknowledgements, whitespace trimming, and cleanup.| |**Notification route matching**
`inject/src/messenger/features/notifications.ts`, `inject/src/messenger/lib/notification-fallback.ts`, `inject/src/messenger/lib/notification-fallback.test.ts`, `src-tauri/inject/messenger.js`|Notification matching rejects ambiguous signals, validates unique conversation candidates, and preserves routes through fallback and duplicate-delivery retries.| |**Viewed-thread reporting**
`inject/src/messenger/lib/thread-viewed.ts`, `inject/src/messenger/features/thread-nav.ts`, `src-tauri/src/lib.rs`, `src-tauri/inject/messenger.js`|The focused visible thread is reported on activation, visibility changes, thread changes, and five-second rechecks. macOS validates reports before clearing notifications.| |**Platform settings and tray integration**
`src-tauri/src/settings.rs`, `src-tauri/src/tray.rs`, `dist/settings.html`, `inject/src/types.d.ts`, `inject/src/messenger/lib/injected-assets.test.ts`|macOS notification settings and tray icon styling are persisted, displayed, tested, and applied at runtime. Linux retains tray icon style support.| **Estimated code review effort:** 5 (Critical) | ~120 minutes **Merge Risk:** _🟡 Moderate_ · up to `e238d` Inline reply actions may be lost during Messenger reloads or window recreation, and dismissed notification routes can leave conversation identifiers stored indefinitely across restarts. These bounded correctness and data-retention risks should be fixed or explicitly accepted before merging. ### Sequence Diagram(s) :::mermaid sequenceDiagram participant CLI participant AppAction participant AppState participant Messenger CLI->>AppAction: parse supported flags AppAction->>AppState: store or dispatch action AppState->>Messenger: evaluate validated action script Messenger-->>AppState: report page readiness :::mermaid sequenceDiagram participant Messenger participant ThreadNav participant Carrier participant macOSNotifications Messenger->>ThreadNav: report focused visible thread ThreadNav->>Carrier: emit carrier:thread-viewed Carrier->>macOSNotifications: validate thread and clear notifications macOSNotifications-->>Carrier: remove matching notification identifiers **Possibly related PRs** - [[kristofferR/Carrier#13](https://github.com/kristofferR/Carrier/issues/13)](https://github.com/kristofferR/Carrier/pull/13): Earlier native notification flow changes in the same Messenger and notification modules. - [[kristofferR/Carrier#34](https://github.com/kristofferR/Carrier/issues/34)](https://github.com/kristofferR/Carrier/pull/34): Earlier macOS notification implementation using the same notification center flow. - [[kristofferR/Carrier#195](https://github.com/kristofferR/Carrier/issues/195)](https://github.com/kristofferR/Carrier/pull/195): Earlier changes to quick replies, tray settings, CLI actions, and notifications.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation | | :------------------------: | :------- | :--------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title clearly identifies the main change: completing the remaining macOS integration work. | | Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |✨ Finishing Touches
📝 Generate docstrings
- [ ] Create stacked PR - [ ] Commit on current branch🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `t3code/implement-issue-179`Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands.Related
Commit: [e238d2]
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@codex review
Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. 🎉
Reviewed commit:
5f52ed3484ℹ️ About Codex in GitHub
[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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".
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@codex review
Originally posted by: chatgpt-codex-connector[bot]
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: kristofferR
@codex review