Menu ▾ ▴

#140 Harden Carrier reliability and desktop behavior

closed
nobody
None
2026-07-18
2026-07-18
Anonymous
No

Originally created by: kristofferR

Summary

  • restore reliable document-start injection so Facebook chrome stays hidden, and isolate feature startup so one failure cannot disable Carrier
  • harden Windows lifecycle behavior: notification activation, durable hidden-menu repair, tray escape hatches, minimize/focus/taskbar options, overlap-safe reveals, and correct repeat-launch behavior
  • serialize every Settings mutation away from the UI thread, including zoom/menu/tray writers, so concurrent saves cannot deadlock or overwrite newer state
  • reuse the Windows Settings WebView after close so removed native chrome cannot resurface and WebView2 does not retain shared-memory sections across teardown
  • make Messenger integration locale-independent, keep DNS failures on Carrier's recovery screen, and constrain remote IPC/download/notification surfaces
  • add opt-in autoplay suppression, complete shortcut help, correctly sized reaction emoji, live media-track state, and privacy/notification reliability fixes
  • add safe, reloadable custom.css support with origin/size/UTF-8 guards
  • add automatic signed-update discovery at startup and every four hours, with an opt-out and explicit install/restart consent retained in Settings
  • follow Linux portal color-scheme changes live while Theme is set to System, with no-portal recovery and deduplicated logging
  • correct all ten landing-page locales so notification, update-consent, signing, and Windows SmartScreen claims match the shipped app
  • bound the development MCP page-map inspector by depth, visibility, nodes, elements, and output size

Testing

  • bun run check — 110 tests / 435 assertions; Biome, TypeScript, and generated-injection drift checks pass
  • bun test --coverage — 99.72% lines / 99.19% functions overall; update controller production source is 100% covered
  • bun audit — no vulnerabilities
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test --lib — 87 passed
  • cargo clippy --all-targets --features mcp -- -D warnings
  • cargo test --lib --features mcp — 88 passed
  • 200 complete Bun-suite loops and 200 final injected-asset loops completed with zero failures
  • 50 MCP Rust-suite loops (88 tests each) completed with zero failures
  • 5,000 concurrent mixed Settings/zoom operations completed with zero rejects in 7.336 seconds; valid JSON, no temporary files, stable handles, and exact user settings restored
  • exact-head Windows MCP debug executable and NSIS installer built; the installer contains 8 valid files and passes 7-Zip integrity testing
  • live Windows/WebView2 checks cover recovery navigation, update discovery and consent recovery, settings commands, notification activation, autoplay, shortcuts, reaction sizing, privacy markers, zoom, and bounded MCP inspection
  • native HWND checks keep main and Settings menu-free (GetMenu = 0) through focus/resize/maximize/restore and 50 exact-head close/reopen cycles; Settings keeps one HWND and a flat 598-handle process count
  • production and MCP-debug single-instance probes restore hidden/close-to-tray windows and terminate the second process
  • 20 close-to-tray/relaunch, 10 minimize-to-tray/relaunch, and a separate 50-cycle lifecycle load test completed with zero failures or memory/handle growth
  • current user settings and custom.css state were preserved after destructive-edge probes
  • exact-head CI passes inject, dependency audit, Rust, macOS, and Windows jobs
  • CodeRabbit exact-head incremental review on 4e10c66 finished with zero findings; all prior actionable threads were fixed and resolved

Ref [#51], Ref [#57], Ref [#58], Ref [#71], Ref [#72], Ref [#85], Ref [#87], Ref [#88], Ref [#90], Ref [#113], Ref [#118], Ref [#119], Ref [#122], Ref [#127], Ref [#128], Ref [#129], Ref [#130], Ref [#131], Ref [#135]

Summary by CodeRabbit

  • New Features
  • Separated update discovery from consent-based installation; F2 now opens update settings.
  • Added best-effort Custom CSS support in Settings (Advanced).
  • Added “Open anyway” to bypass Messenger connection DNS prechecks on failures.
  • Improved Linux system theme syncing; added media autoplay suppression.
  • Refined Windows tray visibility/hide behavior and added keyboard shortcut overlay entries (including F1//).

  • Bug Fixes

  • Improved notification rate limiting plus more reliable click vs dismiss behavior.
  • Refined unread-badge readiness, cookie/login context detection, and Windows zoom relayout.

  • Documentation

  • Updated update/maintenance and marketing/shortcut wording, including “Optional signed-update checks.”

Related

Tickets: #113
Tickets: #118
Tickets: #119
Tickets: #122
Tickets: #127
Tickets: #128
Tickets: #129
Tickets: #130
Tickets: #131
Tickets: #135
Tickets: #32
Tickets: #51
Tickets: #57
Tickets: #58
Tickets: #71
Tickets: #72
Tickets: #85
Tickets: #87
Tickets: #88
Tickets: #90

Discussion

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

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: coderabbitai[bot]

    Review Change Stack

    [!NOTE]

    Reviews paused

    It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

    Use the following commands to manage reviews:
    - @coderabbitai resume to resume automatic reviews.
    - @coderabbitai review to trigger a single review.

    Use the checkboxes below for quick actions:
    - [ ] ▶️ Resume reviews
    - [ ] 🔍 Trigger review

    📝 Walkthrough ## Walkthrough The PR separates update discovery from consent-based installation, adds autoplay and custom CSS controls, refines Messenger and tray behavior, introduces bounded MCP page inspection, narrows capabilities, adds Linux theme observation, and updates documentation and validation. ### Changes **Update and settings controls** |Layer / File(s)|Summary| |---|---| |**Update commands and settings UI**
    `src-tauri/src/commands.rs`, `dist/settings.html`, `src-tauri/src/lib.rs`, `src-tauri/src/settings.rs`|Update discovery is separated from consented installation with single-flight installation and remembered availability. Settings expose autoplay, Windows tray, custom CSS, and update-install controls.| |**Shortcuts and Help menu**
    `inject/src/panel/*`, `src-tauri/inject/panel.js`, `src-tauri/src/menu.rs`|Shortcut metadata, F1 and `/` toggles, Keyboard Shortcuts, and Report an Issue actions are added.| **Messenger and native behavior** |Layer / File(s)|Summary| |---|---| |**Media and Messenger refinements**
    `inject/src/messenger/*`, `src-tauri/inject/messenger.js`|Autoplay suppression, live-track counting, cookie-policy detection, emoji reaction tagging, settings-button detection, unread readiness, feature diagnostics, and Windows zoom relayout are updated.| |**Notifications and tray lifecycle**
    `src-tauri/src/{notifications,settings,tray,window}.rs`|Notifications are rate-limited, tray notices are persisted and guarded, Windows reveal behavior uses generation tokens, and auto-hide behavior depends on tray availability.| |**Reachability and custom CSS**
    `src-tauri/src/{commands,custom_css,url_rules,window}.rs`, `dist/index.html`, `dist/settings.html`|DNS failures are surfaced with an Open anyway bypass, while custom CSS is provisioned, validated, scoped to Messenger URLs, and injected after page load.| **Capabilities and platform support** |Layer / File(s)|Summary| |---|---| |**MCP bridge and capability scopes**
    `src-tauri/inject/mcp-bridge.js`, `src-tauri/capabilities/*`, `src-tauri/dev-capabilities/*`|Release permissions are narrowed, development event listening is isolated, and bounded `get-page-state` and `get-page-map` responders are added.| |**Linux theme and documentation**
    `src-tauri/src/linux.rs`, `src-tauri/src/lib.rs`, `src-tauri/Cargo.toml`, `README.md`, `docs/index.html`, `inject/src/messenger/lib/injected-assets.test.ts`|Linux portal theme observation is added, update and trust documentation is revised, build metadata is refreshed, and injected-asset tests verify generated artifacts and locale content.| **Estimated code review effort:** 4 (Complex) | ~60 minutes ### Sequence Diagram(s) :::mermaid sequenceDiagram participant SettingsWindow participant UpdateCommands participant Installer SettingsWindow->>UpdateCommands: check_for_updates() UpdateCommands-->>SettingsWindow: available version or up-to-date SettingsWindow->>UpdateCommands: install_update() after confirmation UpdateCommands->>Installer: download and install update Installer-->>SettingsWindow: installation result **Possibly related issues** - [kristofferR/Carrier#135](https://github.com/kristofferR/Carrier/issues/135) — Covers the bundled update, capability, shortcut, tray, autoplay, and heuristic changes. - [kristofferR/Carrier#71](https://github.com/kristofferR/Carrier/issues/71) — Covers the Windows zoom resize dispatch. **Possibly related PRs** - [[kristofferR/Carrier#10](https://github.com/kristofferR/Carrier/issues/10)](https://github.com/kristofferR/Carrier/pull/10) — Related to the Settings-window update flow and tabbed settings UI. - [[kristofferR/Carrier#41](https://github.com/kristofferR/Carrier/issues/41)](https://github.com/kristofferR/Carrier/pull/41) — Related to the Messenger reachability and Open anyway flow. - [[kristofferR/Carrier#11](https://github.com/kristofferR/Carrier/issues/11)](https://github.com/kristofferR/Carrier/pull/11) — Related to the shared unread-badge and MCP bridge paths. **Suggested labels:** `javascript`
    🚥 Pre-merge checks | ✅ 5
    ✅ Passed checks (5 passed) | Check name | Status | Explanation | | :------------------------: | :------- | :----------------------------------------------------------------------------------------------------------- | | 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. | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title is broad, but it accurately reflects the PR’s focus on reliability and desktop behavior hardening. |
    ✨ 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 `codex/windows-issue-sweep`

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

     
  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    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-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: coderabbitai[bot]

    Rate Limit Exceeded

    @kristofferR have exceeded the limit for the number of chat messages per hour. Please wait 11 minutes and 43 seconds before sending another message.

     
  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    @coderabbitai review

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.