Menu ▾ ▴

#343 fix: macOS calls on older macOS versions with a newer Safari

closed
nobody
None
2026-11-05
2026-11-05
Anonymous
No

Originally created by: kristofferR

Messenger calls on macOS still say "not supported on this browser" in 2.0.7 on older macOS versions (reported again on macOS 15.7.5, Ref [#335]).

2.0.7 identifies as Safari, using the installed Safari's version only when Safari runs the same WebKit build as Carrier. On macOS versions older than the current one, a newer Safari installs its own staged WebKit that only Safari can load, while apps keep the system WebKit. For example, on macOS 15.7.3 with Safari 27.2, Safari reports 20625.2.8.18.4 while apps load 20621.3.11.11.3 (observed by safarier). The builds never match there, so Carrier kept WKWebView's native user agent and Messenger still refused calls.

When the builds differ, or Safari can't be read, Carrier now derives the Safari version from the WebKit it actually loads. The engine's release family (621.3 in 20621.3.11.11.3) maps to the Safari release that shipped it (18.6). A family missing from the table takes the newest listed release below it, so Carrier never claims a newer Safari than the engine. When Safari and the engine match, nothing changes. Startup now logs both build numbers, so a report can be settled from one log line. docs/user-agent-policy.md records the cause and the rule.

Validation on macOS 27.2: cargo fmt, cargo clippy --all-targets -D warnings and cargo test --lib (330, including the reported macOS 15.7 case and a test that reads the real system WebKit) pass. Not tested on an older macOS; the reporter is the end-to-end check.

Summary by CodeRabbit

  • Improvements
  • On macOS, the browser identity now reflects the running WebKit version. Safari’s version is used when its build matches WebKit; otherwise, the closest applicable listed Safari release is selected. Older or unreadable WebKit builds retain the native identity.
  • Documentation
  • Updated the macOS user-agent policy guidance to explain version selection, fallback behavior, logging, and maintenance of the Safari release table.

Related

Tickets: #335
Tickets: #344
Tickets: #355

Discussion

  • Anonymous

    Anonymous - 2026-11-05

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-11-05

    Originally posted by: kristofferR

    @codex review for consequential defects introduced by this PR; do not expand its original scope with unrelated refactors, features, or speculative hardening

     
  • Anonymous

    Anonymous - 2026-11-05

    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-11-05

    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-11-05T14:41:01.248427Z">2026-11-05T14:41:01.248427Z</relative-time> 1c718b9 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-11-05

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

    Codex Review: Didn't find any major issues. Another round soon, please!

    Reviewed commit: bbafd85528

    ℹ️ 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-11-05

    Originally posted by: coderabbitai[bot]

    <picture>Explain Change →</picture>

    Walkthrough

    On macOS, Carrier now derives the Safari user-agent version from the running WebKit build. It uses Safari’s version when the builds match and maps the WebKit build to a Safari release otherwise. The change also updates logging, tests, and policy documentation. **Changes: macOS User-Agent Selection** |Layer / File(s)|Summary| |:---|:---| |**WebKit-to-Safari version mapping**
    `src-tauri/src/user_agent.rs`|A WebKit-family table maps engine builds to Safari releases. When Safari’s build matches the engine, selection uses Safari’s version; otherwise, it uses the newest listed release at or below the engine family.| |**Build acquisition and user-agent wiring**
    `src-tauri/src/user_agent.rs`|The macOS path reads the WKWebView build and optionally Safari’s build and short version. It logs the resolved version and build details, or warns when no release matches.| |**Selection tests and policy documentation**
    `src-tauri/src/user_agent.rs`, `docs/user-agent-policy.md`|Tests cover matching builds, mapped fallbacks, and unavailable or older builds. The documentation describes the mapping and when Carrier retains the native user agent.| **Estimated code review effort:** 3 (Moderate) | ~20 minutes **Change:** Bug fix **Possibly related issues** - [kristofferR/Carrier#335](https://github.com/kristofferR/Carrier/issues/335): The issue reports unsupported voice and video calls on macOS 15.7.5. This change updates Safari and WebKit version selection used by the browser-support check, but the summaries do not establish that it resolves the call issue. **Possibly related PRs** - [[kristofferR/Carrier#342](https://github.com/kristofferR/Carrier/issues/342)](https://github.com/kristofferR/Carrier/pull/342): This PR adds the macOS Safari user-agent override that this PR changes.
    Merge Risk: <picture></picture> Minimal · up to 1c718

    The WebKit-derived identity selection preserves the native fallback, and no concrete merge-blocking defect remains established.
    Pre-merge checks: <picture>Passed</picture> 3 · <picture>Failed</picture> 2

    <picture>Failed</picture> Failed checks: 2 warnings | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description check | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | The description provides a detailed summary, problem statement, implementation details, validation results, and limitations. It does not include the required AI models used field. | Add the required section with the models and versions used to create or edit the code, tests, or pull request text, or write `AI models used: None` if no AI assisted the contribution. | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 57.14% 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. Documenta… | Write docstrings for the functions missing them to satisfy the coverage threshold. |
    <picture>Passed</picture> Passed checks: 3 passed

    | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly identifies the main change: fixing macOS calls when an older macOS system uses a newer Safari. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. |
    Full details: Docstring Coverage

    **Explanation** Docstring coverage is 57.14% 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 7 functions across 1 files. **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
    • [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

    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)
     
  • Anonymous

    Anonymous - 2026-11-05

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-11-05

    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-11-05

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

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

    Reviewed commit: 1c718b9161

    ℹ️ 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-11-05

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-11-05

    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-11-05

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.