Menu ▾ ▴

#21 Notification privacy controls: mute all + hide message preview

closed
nobody
None
2026-06-29
2026-06-28
Anonymous
No

Originally created by: kristofferR

Closes the notification half of the Caprine privacy-parity set.

What

Two new settings gate Carrier's page→native notification bridge (notificationBridge in src-tauri/inject/messenger.js):

  • Mute Notifications (mute_notifications) — suppress all desktop notifications for new messages. Carrier had no master mute before. The auto-refresh nudge (__carrierOnNotification) still fires, so a backgrounded window keeps catching up.
  • Hide Message Preview (hide_notification_preview) — notify with a generic Messenger / New message instead of the sender name and message text.

Both default off (current behaviour), read live from window.__CARRIER_SETTINGS__, and re-apply on the carrier:settings push (no reload). Surfaced as checkboxes in the Settings window.

Files

  • src-tauri/src/lib.rs — two Settings fields + defaults.
  • dist/settings.html — two checkboxes.
  • src-tauri/inject/messenger.js — gate the CarrierNotification shim.

Notes

  • Built against main's notification path (plugin:notification|notify). The richer avatar/preview rework in open PR [#13] (feat/notification-content-avatar) touches the same shim — these will need a small reconcile whichever merges second; the gating logic (mute / generic-text) carries over directly.

Gate

cargo fmt ✓ · cargo clippy --all-targets -- -D warnings ✓ · cargo test --lib (26 passed) ✓ · node --check inject/messenger.js ✓

Ref [#16]

https://claude.ai/code/session_01F7ysWachjSb1AiPZZ74pxN

Summary by CodeRabbit

  • New Features
  • Added notification controls to settings: Mute Notifications and Hide Message Preview.
  • Settings UI now includes these new options and persists them.

  • Bug Fixes

  • Desktop notifications are fully suppressed when Mute Notifications is enabled.
  • Notification details are minimized when Hide Message Preview is enabled.
  • Notifications are only shown when the app window is not focused.

  • Documentation

  • Updated architecture notes to reflect the new notification behavior and privacy options.

Related

Tickets: #10
Tickets: #13
Tickets: #16
Tickets: #21
Tickets: #25

Discussion

  • Anonymous

    Anonymous - 2026-06-28

    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, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

     
  • Anonymous

    Anonymous - 2026-06-28

    Originally posted by: coderabbitai[bot]

    Review Change Stack

    [!CAUTION]

    Review failed

    The pull request is closed.

    ℹ️ Recent review info
    ⚙️ Run configuration **Configuration used**: Path: .coderabbit.yaml **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `c7ba9fda-5fef-4f22-b348-7f752a7432c4`
    📥 Commits Reviewing files that changed from the base of the PR and between [4cd04f] and b5423b9dc4b5fb7c7cd175d5dd36c84d04de4c61.
    📒 Files selected for processing (1) * `AGENTS.md`

    📝 Walkthrough ## Walkthrough Two notification preferences are added, shown in settings, and used by the native notification bridge to suppress notifications or replace message details with generic text. ## Changes **Notification privacy controls** |Layer / File(s)|Summary| |---|---| |**Settings fields and UI options**
    `src-tauri/src/lib.rs`, `dist/settings.html`|`Settings` gains `mute_notifications` and `hide_notification_preview` with `false` defaults, and the settings page renders both as new checkbox rows.| |**CarrierNotification runtime gating**
    `src-tauri/inject/messenger.js`, `AGENTS.md`|`CarrierNotification` checks `window.__CARRIER_SETTINGS__` to skip `notify` when muted or send generic Messenger notification content, and the architecture notes are updated to describe that behavior.| ## Estimated code review effort 🎯 2 (Simple) | ⏱️ ~8 minutes ## Possibly related issues - [kristofferR/Carrier#16](https://github.com/kristofferR/Carrier/issues/16): Directly matches the new mute and hide-preview notification controls implemented here. ## Possibly related PRs - [[kristofferR/Carrier#13](https://github.com/kristofferR/Carrier/issues/13)](https://github.com/kristofferR/Carrier/pull/13): Touches the same `CarrierNotification` bridge and related runtime notification behavior. ## Poem > 🐇 Hop, hop—soft paws on the floor, > New settings arrived and asked for more. > Pings can hush, or whisper less loud, > A rabbit-approved shield from the crowd. > Tiny UI toggles, neat and snug ✨
    🚥 Pre-merge checks | ✅ 4 | ❌ 1 ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
    ✅ Passed checks (4 passed) | Check name | Status | Explanation | | :------------------------: | :------- | :------------------------------------------------------------------------------------------------------------ | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title clearly summarizes the main change by naming the new notification privacy controls added in the PR. | | 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 unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feature/notification-privacy`

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Originally posted by: kristofferR

    Heads-up on a merge-order reconcile with [#10]. That PR redesigns dist/settings.html from the flat list into a tabbed GUI (General, Tray & Startup, Notifications, Advanced) and was just rebased on main (now mergeable).

    This PR adds mute_notifications + hide_notification_preview as checkboxes in the old flat FIELDS list, so whichever of [#10] / [#21] merges second will conflict on settings.html.

    Suggested path: merge [#10] first, then rebase this branch to drop the two checkboxes into the tabbed Notifications tab (TABS → notifications.fields) instead of the flat list — the tab already has headroom for them. The backend (lib.rs) and messenger.js gating here are unaffected.

     

    Related

    Tickets: #10
    Tickets: #21

  • Anonymous

    Anonymous - 2026-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Ticket changed by: kristofferR

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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-06-29

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-06-29

    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.
     

Log in to post a comment.