Menu ▾ ▴

#247 fix(windows): crisp monochrome tray icon, live theme retint, NSIS carrier:// registration

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

Originally created by: kristofferR

First hands-on Windows QA pass on a real Windows 11 machine (Ref [#28]), covering the [#187] integration push. Everything from PR [#233] works in practice: badge buckets and clearing, WinRT toast delivery/grouping/clear-on-read, Action Center activation after banner timeout, inline-reply failure handling, taskbar flash, jump-list dispatch, warm/cold CLI and protocol launches, and the 1.11 to 1.12 updater flow were all verified on the release build. The pass found several tray issues (Ref [#185]), plus the documented installer follow-up from [#233] (Ref [#184]).

Problems

  • The monochrome tray icon was aliased and undersized. The padded 128px symbolic asset went straight to the shell, which downscaled it without filtering, and the glyph occupied only about 63% of the canvas.
  • A taskbar theme flip only retinted the glyph on a settings save or unread re-emit. A logged-out webview never emits, so the glyph could stay dark-on-dark indefinitely.
  • Theme notifications racing unread or recent-menu updates could deadlock the app because shared tray/cache mutexes were held across Tauri's blocking main-thread tray dispatches. Tray creation and removal had the same unsafe lock scope.
  • NSIS installs relied on the runtime register("carrier") call. Install-time registration and guarded uninstall cleanup were documented as a follow-up in [#233].

Changes

  • Render the symbolic glyph in-app: crop to the alpha bounding box, area-average down to the system small-icon metric, fill the icon cell edge-to-edge, then tint. Pure helpers have unit coverage on every platform.
  • Watch HKCU\...\Themes\Personalize with RegNotifyChangeKeyValue, queue the retint on the main thread, and immediately re-arm the one-shot registry notification. Query the shell taskbar's own DPI, key the cache on the rendered icon size, refresh immediately on Carrier window scale events, and independently check the notification area's DPI for multi-monitor changes.
  • Clone tray handles and release app/cache mutexes before every blocking tray setter. Build, remove, and drop tray resources outside the shared mutex to prevent lock inversions between unread, settings, menu, and theme paths.
  • Label the style option "Monochrome" instead of "Symbolic" (stored value unchanged).
  • Add tauri.windows.conf.json with plugins.deep-link.desktop.schemes: ["carrier"]. The NSIS installer writes the protocol keys at install time and removes them only when they still point at that installation. Runtime registration stays for portable zips.

Verification

  • cargo fmt, cargo clippy --all-targets -- -D warnings, 234 Rust tests, bun run check, and 446 Bun tests pass.
  • CI is green on Rust, inject scripts, audit, macOS, and Windows.
  • Cross-built the current NSIS installer with cargo-xwin and makensis, installed that exact artifact on Windows 11, and verified install-time carrier:// registration.
  • The final release build survived 20 consecutive stress rounds that interleaved light/dark taskbar changes, unread IPC, and forced recent-menu rebuilds. IPC stayed responsive and the tray landed on the correct final tint.

Summary by CodeRabbit

  • New Features
  • Added Windows deep-link support using the carrier URL scheme.
  • Tray icons now refresh automatically when the Windows taskbar theme or display scaling changes.

  • Improvements

  • Improved monochrome tray icon rendering for a clearer, sharper appearance.
  • Enhanced tray icon updates and settings changes for smoother, more reliable behavior.
  • Improved Windows notification setup and compatibility.
  • Renamed the tray icon style option from “Symbolic” to “Monochrome” without changing its behavior.

Related

Tickets: #180
Tickets: #181
Tickets: #182
Tickets: #183
Tickets: #184
Tickets: #185
Tickets: #187
Tickets: #233
Tickets: #28
Tickets: #56
Tickets: #86

Discussion

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

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review: Didn't find any major issues. Bravo.

    Reviewed commit: d75553ee0d

    ℹ️ 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-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review: Didn't find any major issues. Keep it up!

    Reviewed commit: 69c65a2a3c

    ℹ️ 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-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-28

    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-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**: Path: .coderabbit.yaml **Review profile**: ASSERTIVE **Plan**: Pro Plus **Run ID**: `13902d4b-4788-4984-9ca8-8c8282836112`
    📥 Commits Reviewing files that changed from the base of the PR and between [852c49] and 78b7cd3ba9eeb19be553c589a6f38d3365e4fe42.
    📒 Files selected for processing (5) * `src-tauri/Cargo.toml` * `src-tauri/src/lib.rs` * `src-tauri/src/notifications.rs` * `src-tauri/src/tray.rs` * `src-tauri/src/windows/toast.rs`
    **Included review availability:** Your plan provides up to 1 included review per hour; 0 remain after this review.

    📝 Walkthrough ## Walkthrough The changes rename the tray style label, improve Windows symbolic tray rendering, add taskbar theme and DPI monitoring, reduce tray mutex scope, update Windows notification identity handling, and register the Windows `carrier` deep-link scheme. ### Changes **Windows tray icon updates** |Layer / File(s)|Summary| |---|---| |**Symbolic glyph rendering and cache**
    `src-tauri/src/tray.rs`|Symbolic tray glyphs are cropped to alpha bounds, resampled to the native tray size, colored for the taskbar theme, and tracked with generation-aware cache keys. Tests cover rendering and stale updates.| |**Tray state reconciliation**
    `src-tauri/src/settings.rs`|Tray creation, removal, and icon-style updates no longer perform tray operations while holding the tray mutex.| |**Windows theme and DPI refresh**
    `src-tauri/Cargo.toml`, `src-tauri/src/lib.rs`|Registry, DPI, unread-indicator, and scale-factor paths refresh Windows tray icons. The required Windows UI bindings are enabled.| |**Tray style label and assertion**
    `dist/settings.html`, `inject/src/messenger/lib/injected-assets.test.ts`|The symbolic tray style now displays as “Monochrome”. The asset test expects the updated label.| **Windows notification identity** |Layer / File(s)|Summary| |---|---| |**Dedicated toast identity and registration**
    `src-tauri/src/windows/toast.rs`|Windows notifications use a dedicated AppUserModelID with registered display-name and icon values.| |**Notification and group-clear integration**
    `src-tauri/src/notifications.rs`, `src-tauri/src/lib.rs`, `src-tauri/src/windows/toast.rs`|Toast options no longer carry an app identifier. Group clearing receives the AppHandle and targets dedicated and legacy identities.| |**Legacy notification opt-out**
    `src-tauri/src/windows/toast.rs`|Toast delivery preserves the legacy disabled-notifications setting. Tests cover the opt-out decision and identity list.| **Windows deep-link configuration** |Layer / File(s)|Summary| |---|---| |**Windows deep-link registration**
    `src-tauri/tauri.windows.conf.json`|The Tauri Windows configuration enables the `deep-link` plugin with the `carrier` URL scheme.| **Estimated code review effort:** 4 (Complex) | ~60 minutes **Merge Risk:** _🔵 Low_ · up to `78b7c` This release adds Windows deep-link and notification registrations. The tested install path works, but upgrade, rollback, and uninstall behavior is not fully demonstrated, so stale registrations could affect link routing or notification identity; the PR is mergeable with explicit Windows installer follow-up. ### Sequence Diagram(s) :::mermaid sequenceDiagram participant WindowsRegistry participant TaskbarDpiWatcher participant refresh_windows_tray_icon participant set_windows_tray_icon_style WindowsRegistry->>TaskbarDpiWatcher: Notify Personalize registry change TaskbarDpiWatcher->>refresh_windows_tray_icon: Queue tray refresh refresh_windows_tray_icon->>set_windows_tray_icon_style: Read style, theme, and icon size set_windows_tray_icon_style->>set_windows_tray_icon_style: Resample and apply tray icon
    🚥 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 summarizes the main Windows changes: crisp monochrome tray icon rendering, live theme retinting, and NSIS carrier:// registration. | | Docstring Coverage | ✅ Passed | Docstring coverage is 83.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 6 files. (1 skipped: 1 … | | 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. |
    Full details: Docstring Coverage **Explanation** Docstring coverage is 83.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 6 files. (1 skipped: 1 unsupported.)
    ✨ 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 `fix/windows-qa-pass`

    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.

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-28

    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-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review Summary

    This comment shows the latest Codex review activity on this pull request.

    Review Status Commit Review trigger
    📝 Code Review ✅ Completed <relative-time datetime="2026-08-28T22:37:40.269176Z">2026-08-28T22:37:40.269176Z</relative-time> 78b7cd3 Manual request
    ℹ️ 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" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-28

    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-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-28

    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-28

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review: Didn't find any major issues. Swish!

    Reviewed commit: 697e4823af

    ℹ️ 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-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @codex review

     
  • Anonymous

    Anonymous - 2026-08-28

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-08-28

    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.
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.