Menu ▾ ▴

#230 feat: complete macOS integration push

closed
nobody
None
2026-10-05
2026-08-14
Anonymous
No

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:

  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test --lib
  • bun run check
  • Apple-target Rust type-check

Ref [#173]
Ref [#174]
Ref [#176]
Ref [#178]
Ref [#179]
Ref [#232]

Summary by CodeRabbit

  • New Features
  • Added notification grouping, clearing when conversations are viewed, and message-attention alerts on macOS.
  • Added symbolic tray icon support on macOS and Linux.
  • Added actions for opening conversations, settings, and specific threads from menus, links, and command-line options.
  • Added macOS inline notification replies and conversation routing.

  • Improvements

  • Quick replies now preserve existing drafts and support longer messages.
  • Improved active-conversation tracking and notification matching to prevent ambiguous or stale notifications.
  • Improved notification delivery, routing, and cleanup across supported platforms.

Related

Tickets: #173
Tickets: #174
Tickets: #176
Tickets: #178
Tickets: #179
Tickets: #232

Discussion

1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-14

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

    Anonymous - 2026-08-14

    Originally posted by: coderabbitai[bot]

    Review Change Stack

    [!WARNING]

    Review limit reached

    @kristofferR, you've reached your PR review limit, so we couldn't start this review.

    Next review available in: 57 minutes

    Limit details: You’ve used all 1 included review currently available under your plan.

    You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.


    How can I continue?

    After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

    To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.


    How do review limits work?

    CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

    For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

    Please refer docs for additional details.


    Review details


    ⚙️ Run configuration

    Configuration used: Path: .coderabbit.yaml

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 4c7e1eac-c466-4642-9596-8da69d14bfb4


    📥 Commits

    Reviewing files that changed from the base of the PR and between [e238d2] and 96b3cdc7b04c58fa61b83db732f8f428552938e2.


    📒 Files selected for processing (12)

    • dist/settings.html
    • inject/src/messenger/features/notifications.ts
    • inject/src/messenger/lib/injected-assets.test.ts
    • inject/src/messenger/lib/native-call-factory.test.ts
    • inject/src/messenger/lib/notification-fallback.test.ts
    • inject/src/types.d.ts
    • src-tauri/Cargo.toml
    • src-tauri/inject/messenger.js
    • src-tauri/src/lib.rs
    • src-tauri/src/notifications.rs
    • src-tauri/src/settings.rs
    • src-tauri/src/window.rs
    📝 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 help to get the list of available commands.

     

    Related

    Commit: [e238d2]

  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-14

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

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-14

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

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-14

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

    Anonymous - 2026-08-14

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-15

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-15

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

    Anonymous - 2026-08-16

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-16

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

    Anonymous - 2026-08-16

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-16

    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.

     
  • Anonymous

    Anonymous - 2026-08-16

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-16

    Originally posted by: kristofferR

    @codex review

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.