Menu ▾ ▴

#22 Hide Names & Avatars toggle (Cmd/Ctrl+Shift+N)

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

Originally created by: kristofferR

Adds the Caprine "Hide Names and Avatars" privacy feature.

What

A toggle that blurs contact names, avatars and message previews in the conversation list — handy when screen-sharing, recording, or using Carrier in a public space.

Reachable three ways, all driving one setting (hide_names_avatars, default off):

  • Settings window checkbox
  • View ▸ Hide Names & Avatars menu item
  • Cmd/Ctrl+Shift+N accelerator (on that menu item — distinct from Cmd+N = New Window)

How

  • src-tauri/inject/messenger.js toggles a data-carrier-hide-names attribute on <html> from window.__CARRIER_SETTINGS__, re-applying on the carrier:settings push — same pattern as compact mode, no reload.
  • src-tauri/inject/messenger.css blurs the rows. Crucially it anchors on the proven a[href*="/t/"] conversation-list selector that the jump-to-chat shortcut already relies on, rather than a guessed deep selector — so it won't silently break as Facebook's class names churn.
  • src-tauri/src/lib.rs — Settings field + default, View-menu item with the accelerator, and the mutate_settings toggle handler.

Scope / follow-up

Deliberately scoped to the conversation list (the primary screen-share privacy surface: the names + faces of everyone you talk to). Blurring the open thread's header name and in-thread sender avatars is left as a follow-up because it needs verification against the live Messenger DOM — I'm avoiding shipping unverified selectors after the compact-mode stale-selector bug (#20).

Gate

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

Ref [#17]

https://claude.ai/code/session_01F7ysWachjSb1AiPZZ74pxN

Summary by CodeRabbit

  • New Features
  • Added a new “Hide Names & Avatars” option that blurs contact names and avatars in conversations while keeping rows clickable.
  • The setting is available in the app menu and is saved for future sessions.
  • The view updates immediately when the setting is changed.

Related

Tickets: #10
Tickets: #17
Tickets: #23

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

    No actionable comments were generated in the recent review. 🎉

    ℹ️ Recent review info
    ⚙️ Run configuration **Configuration used**: Organization UI **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `c2ed9618-3679-4b52-8bcf-284a684f4ae4`
    📥 Commits Reviewing files that changed from the base of the PR and between [1848a4] and 8adda70e0a98f7c37ab7c7755bff04287d206f2b.
    ⛔ Files ignored due to path filters (1) * `dist/settings.html` is excluded by `!**/dist/**`
    📒 Files selected for processing (3) * `src-tauri/inject/messenger.css` * `src-tauri/inject/messenger.js` * `src-tauri/src/lib.rs`
    📜 Recent review details
    🧰 Additional context used
    📓 Path-based instructions (3)
    src-tauri/inject/**/*.{js,css} **📄 CodeRabbit inference engine (AGENTS.md)** > Keep the Messenger injection layer in `src-tauri/inject/` limited to document-start behavior: `messenger.css` hides Facebook chrome and applies theme/compact/login CSS, and `messenger.js` handles shortcuts, zoom, image viewer, notifications, unread badge, force-theme, and login-page tidy-up. Files: - `src-tauri/inject/messenger.css` - `src-tauri/inject/messenger.js`
    {src-tauri/src/**/*.rs,src-tauri/inject/**/*.js,dist/settings.html} **📄 CodeRabbit inference engine (AGENTS.md)** > For Messenger-to-Carrier IPC, the remote Facebook page must not call Carrier commands directly; use Tauri plugins (`plugin:opener|open_url`, `plugin:notification|notify`, `plugin:window|set_theme`/`set_badge_count`, `plugin:event|emit`) and core events handled by `app.listen_any` (`carrier:open-settings`, `carrier:check-updates`, `carrier:unread`). Push settings to the page via `window.__CARRIER_SETTINGS__` plus a `carrier:settings` event. Files: - `src-tauri/inject/messenger.js` - `src-tauri/src/lib.rs`
    src-tauri/src/lib.rs **📄 CodeRabbit inference engine (AGENTS.md)** > Preserve the macOS theme-rendering workarounds in the Rust shell: do not rely on Tauri `set_background_color` for the window background, keep the WKWebView/title-bar transparency handling, recreate windows on theme switches, and apply the login page’s dark mode via JS rather than native theming. Files: - `src-tauri/src/lib.rs`
    🔇 Additional comments (3)
    src-tauri/src/lib.rs (1)
    `82-83`: LGTM! Also applies to: 100-100, 1011-1015, 1033-1033, 1108-1108
    src-tauri/inject/messenger.js (1)
    `463-476`: LGTM!
    src-tauri/inject/messenger.css (1)
    `102-113`: LGTM!

    📝 Walkthrough ## Walkthrough Adds a "Hide Names & Avatars" feature: a new `hide_names_avatars` boolean field in `Settings` (defaulting to `false`), a native View menu item that toggles and persists it, a JS IIFE that syncs the setting to a `data-carrier-hide-names` HTML attribute, and CSS that blurs conversation-row links when that attribute is present. ## Changes **Hide Names & Avatars** |Layer / File(s)|Summary| |---|---| |**Settings field and menu wiring**
    `src-tauri/src/lib.rs`|`hide_names_avatars: bool` added to `Settings` with `false` default; "Hide Names & Avatars" menu item created and inserted into the View submenu; `handle_menu_event` toggles the field via `mutate_settings` on the `"hide_names"` action.| |**JS and CSS injection**
    `src-tauri/inject/messenger.js`, `src-tauri/inject/messenger.css`|JS IIFE applies `data-carrier-hide-names` on `document.documentElement` from `__CARRIER_SETTINGS__.hide_names_avatars` at startup and on `carrier:settings` events; CSS blurs `a[href*="/t/"]` links inside grid/navigation regions when the attribute is set.| ## Estimated code review effort 🎯 1 (Trivial) | ⏱️ ~5 minutes ## Possibly related issues - **[kristofferR/Carrier#17](https://github.com/kristofferR/Carrier/issues/17)**: Directly implements the "Hide names & avatars" feature described in that issue, including the CSS blur, JS toggle, and menu-backed setting. - **[kristofferR/Carrier#15](https://github.com/kristofferR/Carrier/issues/15)**: Uses the same `Settings`/`carrier:settings` injection pattern as this PR adds another privacy setting. ## Poem > 🐰 A blur for the names, a blur for the face, > The avatars fade to a soft, gentle haze. > One toggle to hide them, one click sets the rule, > My CSS whiskers have made privacy cool! > Hop hop, your secrets are safe now — hooray! 🌸
    🚥 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 accurately summarizes the new Hide Names & Avatars feature and its keyboard shortcut. | | 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 `feature/hide-names-avatars`

    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

    @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
     

Log in to post a comment.