Originally created by: kristofferR
On macOS, Messenger voice and video calls say "not supported on this browser", and file attachments (PDFs, Office files, archives) always fail with "Download failed".
Calls (Ref [#335]). Since v1.13 Carrier has used WKWebView's native user agent, which names no browser. Messenger identifies it as an unknown browser, and its call check (RTWebIncomingRingConfiguration.isSupportedClient) only accepts known ones such as Safari >= 16 or Chrome >= 77. Carrier now appends Safari's own Version/<v> Safari/605.1.15 suffix on macOS, reading the version from the system Safari, which shares WKWebView's WebKit. If that version can't be read, the native user agent stays. docs/user-agent-policy.md records this as the policy's exception, with the evidence.
Attachments (Ref [#334]). Encrypted file attachments arrive as page blobs named after the file, but the download policy only accepted media. Common documents, text files and archives are now allowed. Executables, Office formats that can carry VBA macros (doc/xls/ppt, docm/xlsm/pptm) and scriptable markup stay blocked. WebKit already quarantines what it downloads on macOS, so Gatekeeper still checks archive contents.
Blocked Downloads folder (Ref [#334]). If macOS denies Carrier access to the Downloads folder, every download failed with the generic toast, or silently for downloads the WebView starts itself. When a download fails, Carrier now checks whether the OS refused access to the folder and marks the signed completion event. The page then warns that Carrier isn't allowed to save there; on macOS an Open Settings button opens Privacy & Security > Files & Folders.
The rest of [#252] (Downloads view, Open action) is not part of this PR.
Validation: cargo fmt, cargo clippy --all-targets -D warnings, cargo test --lib (325) and bun run check (733 tests, bundles regenerated) pass on macOS. Checked in the running app: the native user agent and Facebook's browser detection, attachment markup, WebKit's quarantine attribute on downloads, and that the settings link opens Files & Folders on macOS 27. Not yet exercised end to end: a real call, a real attachment download, and the warning with access turned off.
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.
Originally posted by: chatgpt-codex-connector[bot]
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
d7c38a9ℹ️ 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.
Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. Hooray!
Reviewed commit:
7a96631f27ℹ️ 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".
Originally posted by: coderabbitai[bot]
<picture>
</picture>
Walkthrough
The changes expand eligible downloads to include selected attachments, add authenticated reporting for folder-access denials with a macOS privacy-settings action, and apply a validated Safari-based user agent to macOS Messenger windows. **Changes: Download handling** |Layer / File(s)|Summary| |:---|:---| |**Attachment download eligibility**
`AGENTS.md`, `README.md`, `src-tauri/src/download.rs`, `src-tauri/src/window.rs`, `src-tauri/src/lib.rs`|The download policy allows selected attachment extensions for eligible blob and HTTPS downloads. `data:` URLs remain limited to media. Documentation and policy logs now describe media and attachments.| |**Verified folder-access denial reporting**
`src-tauri/src/download.rs`, `src-tauri/src/window.rs`, `src-tauri/src/lib.rs`, `src-tauri/inject/messenger.js`, `inject/src/messenger/*`|Completion signatures now include a `denied` flag. The native and injected code detect folder-access denials, verify completion events, and show a warning for confirmed denials.| |**Download privacy-settings action**
`src-tauri/Cargo.toml`, `src-tauri/src/download.rs`, `src-tauri/src/lib.rs`, `src-tauri/src/window.rs`, `src-tauri/inject/panel.js`, `inject/src/panel/toast.ts`, `inject/src/types.d.ts`, `inject/src/messenger/lib/downloads.ts`, `inject/src/messenger/lib/downloads.test.ts`|The warning offers an Open Settings action on macOS and permission guidance on Windows and Linux. The action invokes an authorized native listener to open the macOS download-folder privacy settings URL.| **macOS Messenger user agent** |Layer / File(s)|Summary| |:---|:---| |**Safari-based user-agent policy**
`docs/user-agent-policy.md`, `src-tauri/src/user_agent.rs`|The resolver uses the installed Safari version for a macOS user-agent override when the version passes validation. Other platforms retain their native identity. The policy and tests describe the exception and fallback behavior.| **Estimated code review effort:** 3 (Moderate) | ~25 minutes **Change:** Bug fix ### Sequence Diagram(s) :::mermaid sequenceDiagram participant DownloadHandler participant CompletionVerifier participant AccessDeniedToast participant User participant PrivacyBridge participant TauriListener participant SettingsOpener DownloadHandler->>CompletionVerifier: Send signed completion with denied flag CompletionVerifier->>AccessDeniedToast: Show warning after verifying denied completion User->>AccessDeniedToast: Select Open Settings AccessDeniedToast->>PrivacyBridge: Call carrierOpenDownloadPrivacy PrivacyBridge->>TauriListener: Emit carrier:open-download-privacy TauriListener->>SettingsOpener: Open platform privacy URL **Possibly related issues** - Issue 334 reports that Carrier downloads fail on a Mac while Safari downloads succeed. This PR changes attachment eligibility and adds macOS folder-access denial reporting. - Issue 335 reports unavailable Messenger voice and video calls on an ARM Mac. This PR changes the macOS user agent used for Messenger.
Merge Risk: <picture>
</picture> Moderate · previous review
7a966On older supported macOS versions, Messenger may accept the Safari version check while the embedded webview lacks the needed features, so calls may still fail or break. The folder-permission warning could also be missed when a folder is readable but not writable. Verify the call behavior on Big Sur or restrict the override before merging.
Pre-merge checks: <picture>
</picture> 3 · <picture>
</picture> 2
<picture>
<picture>
</picture> Passed checks: 3 passed
| Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check |  | The title "fix: Messenger calls on macOS and file attachment downloads" matches the two main changes in the changeset: the macOS Safari user-agent override for Messenger calls, and the expanded attach… | | Linked Issues check |  | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check |  | Check skipped because no linked issues were found for this pull request. |
Full details: Title check
**Explanation** The title "fix: Messenger calls on macOS and file attachment downloads" matches the two main changes in the changeset: the macOS Safari user-agent override for Messenger calls, and the expanded attachment allowlist for downloads. It omits the third change, the Downloads-folder access-denied handling, which is a secondary but real part of the PR. The title is specific and follows a conventional commit style.
Full details: Description check
**Explanation** The description follows the template's Summary section with a clear problem and change description, and it covers all three changes with issue references. The "AI models used" section is missing. The template makes it required for contributors other than the repository owner, and the description does not state a value such as "None" or list models. The "Reasoning levels" section is optional and does not block the PR. **Resolution** Add the "AI models used:" line under the Summary section. Replace the placeholder with the model names and versions used to create or edit code, tests, or PR text, or write "None" if no AI helped. Optionally add the "Reasoning levels" line, using "Unavailable (not exposed by tool)" if the tool does not expose it.
Full details: Docstring Coverage
**Explanation** Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 18 functions across 14 files. (4 skipped: 4 unsupported.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
- [ ] Commit to this branch - [ ] Create a new PR
Generate unit tests (beta)
- [ ] Commit to this branch - [ ] Create a new PR
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)
Related
Commit: [7a9663]
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.
Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. Keep it up!
Reviewed commit:
d7c38a92faℹ️ 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".
Originally posted by: coderabbitai[bot]
Action not completed
Pull request is closed. > 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.
Ticket changed by: kristofferR