Skip to content

feat(webclient): warn users when browser version is below minimum requirement#687

Merged
yanziz-nvidia merged 7 commits into
mainfrom
yanziz/browser-version-check
Jun 15, 2026
Merged

feat(webclient): warn users when browser version is below minimum requirement#687
yanziz-nvidia merged 7 commits into
mainfrom
yanziz/browser-version-check

Conversation

@yanziz-nvidia

@yanziz-nvidia yanziz-nvidia commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds checkBrowserVersion() to BrowserCapabilities.ts that parses the user-agent and returns a warning when the browser is below the documented CloudXR.js minimum versions
  • Meta Quest Browser: warns if OculusBrowser major version < 40 (approximate proxy for Quest OS v79; browser 41.2 was the first to declare OS v81 as its minimum — 40 is the conservative lower bound for the v79 era)
  • Pico Browser: warns if Chrome in the Pico UA < 125 (Pico UA is detected first since it includes an OculusBrowser/7.0 compat token that would otherwise trigger the Quest path)
  • Desktop Chrome: warns if Chrome < 125
  • Safari and Firefox: no warning (Safari works with IWER emulator; Firefox not officially tested)
  • Warning is non-blocking: injected at the top of checkCapabilities() warnings, shown as an info notice in the 2D UI without disabling the Connect button

Test plan

  • Load the web client in a current Meta Quest browser — no warning
  • Spoof UA to OculusBrowser/39.x — confirm warning appears
  • Load in a current Pico browser (Chrome 125) — no warning
  • Spoof Chrome UA to Chrome 110 — confirm warning appears
  • Load in Safari with IWER — confirm no warning
  • Verify checkBrowserVersion() is exported and callable independently

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added browser version compatibility validation to detect if your browser meets CloudXR minimum requirements
    • Displays warning notifications when browser version falls below supported minimums
    • Enhanced capability checks to include browser version verification as the first validation step

…imum

Adds checkBrowserVersion() to BrowserCapabilities.ts that detects the
current browser from the user-agent and returns a warning when it is
below the documented CloudXR.js minimum versions:
- Meta Quest Browser: OculusBrowser < 40 (proxy for Quest OS v79 era)
- Pico Browser: Chrome < 125 in the Pico UA
- Desktop Chrome: Chrome < 125

Pico is detected before Quest because Pico UAs include an
"OculusBrowser/7.0" compat token that would otherwise trigger the Quest
path. Safari and Firefox are not warned since they work with IWER and
are not officially tested respectively.

The warning is non-blocking: it is injected at the top of the
checkCapabilities() warnings array and surfaced as an info notice in the
2D UI, without disabling the Connect button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c165af8d-d5b8-4d2b-9aa5-068fa9a2da00

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new exported function checkBrowserVersion() is added to BrowserCapabilities.ts. It reads navigator.userAgent, detects Pico first (excluding its OculusBrowser token from Quest detection), then checks OculusBrowser (Meta Quest) and desktop Chrome against defined minimum version constants. The function returns a warning string if the detected major version falls below the minimum, or null otherwise. checkCapabilities() is updated to invoke checkBrowserVersion() before existing capability checks, prepending any returned warning to the warnings array and emitting it via console.warn.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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.
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.
Title check ✅ Passed The title accurately summarizes the main change: adding browser version validation to warn users when below minimum requirements, which matches the core functionality added in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yanziz/browser-version-check

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@yanziz-nvidia yanziz-nvidia changed the title feat(webclient): warn users when browser version is below CloudXR minimum feat(webclient): warn users when browser version is below minimum requirement Jun 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deps/cloudxr/webxr_client/helpers/BrowserCapabilities.ts`:
- Around line 61-69: The Chrome version regex pattern on line 62 matches any UA
containing "Chrome/<version>" which causes false positives for Edge, Opera, and
other Chromium-based browsers that also contain this string in their user agent.
Before returning the Chrome-specific warning message, add a check to exclude
common non-Chrome Chromium tokens (such as "Edge", "Opera", "OPR", "Edg", etc.)
from the UA string. This verification should happen after confirming chromeMatch
is valid but before returning the message indicating Chrome was detected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dcbf6193-d83d-491f-b029-6c8ef222f9e2

📥 Commits

Reviewing files that changed from the base of the PR and between be84ba2 and e6c45a4.

📒 Files selected for processing (1)
  • deps/cloudxr/webxr_client/helpers/BrowserCapabilities.ts

Comment thread deps/cloudxr/webxr_client/helpers/BrowserCapabilities.ts Outdated
@yanziz-nvidia yanziz-nvidia self-assigned this Jun 15, 2026
yanziz-nvidia and others added 2 commits June 15, 2026 11:03
…BrowserVersion

Chrome/(\d+) also matches Edge (Edg/) and Opera (OPR/) UAs since they
include "Chrome/" as a Chromium compat token. Guard the version check
with a non-Chrome-Chromium exclusion so those browsers aren't warned
about an outdated Chrome version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…checking globals

Replace window.IWER global check and UA string heuristics with an
explicit emulated parameter on checkBrowserVersion() and
checkCapabilities(). App.tsx reads iwerWasLoaded from sessionStorage
(already set during IWER initialisation) and passes it through, so
the browser version check is skipped cleanly when running under an
XR emulator without any window/any casts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gareth-morgan-nv

Copy link
Copy Markdown
Contributor

LGTM. We should test on all combinations of browsers and devices (and public vs private PICO browser released)

@gareth-morgan-nv gareth-morgan-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread deps/cloudxr/webxr_client/src/App.tsx
yanziz-nvidia and others added 4 commits June 15, 2026 11:27
…ported

Previous wording "recommended for optimal streaming quality" didn't
make it clear that AV1 was actually missing on the device. New wording
explicitly states AV1 is not supported and that streaming quality may
be reduced.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AV1 is the default but HEVC (H.265) is a selectable alternative.
Add a separate optional capability check for HEVC so users see
explicitly which codecs are available on their device, mirroring
the existing AV1 check pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…read

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…curate

Both messages now use the same phrasing and list H.264 as the guaranteed
fallback. Previously AV1 gave no action guidance and HEVC said "use AV1"
which could be wrong if AV1 is also unsupported.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yanziz-nvidia yanziz-nvidia merged commit e017437 into main Jun 15, 2026
100 of 107 checks passed
@yanziz-nvidia yanziz-nvidia deleted the yanziz/browser-version-check branch June 15, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants