fix(entitlements): expand ultrawide resolutions against 4K entitlements - #606
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3f2cd0b3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. 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".
| entitlement.width * entitlement.height >= pixelCount && | ||
| entitlement.fps >= fps, |
There was a problem hiding this comment.
Require dimensions to fit the entitlement envelope
When a user has only a 1920x1080 entitlement, this area-only check treats presets like 1600x1200 and 1680x1050 as covered because they have fewer total pixels, even though their height exceeds the entitlement envelope. The expanded list is used both for Settings options and by resolveEntitledStreamProfile, so those outside-envelope modes can be offered and sent as the selected stream profile; please require the preset width and height to fit within the entitlement as well as checking fps.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c3f2cd0. Configure here.
| requested: EntitledStreamProfile, | ||
| ): EntitledStreamProfile | null { | ||
| const validEntitlements = entitledResolutions.filter(isValidEntitledResolution); | ||
| const validEntitlements = expandEntitledStreamResolutions(entitledResolutions); |
There was a problem hiding this comment.
Expansion causes unintended FPS downgrades
Medium Severity
expandEntitledStreamResolutions adds lower preset FPS tiers (e.g. 60 and 30) for resolutions whose API entitlement is only 120 FPS. resolveEntitledStreamProfile still picks the highest listed FPS that is less than or equal to the requested value, so a request like 90 FPS on a 120 FPS–entitled mode resolves to 60 instead of the previously entitled 120.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c3f2cd0. Configure here.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ts (OpenCloudGaming#606) * Fix ultrawide resolution entitlement expansion to match GFN behavior Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Tighten ultrawide entitlement expansion bounds Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>


This PR expands entitled stream resolutions to include ultrawide modes (e.g., 3440x1440) when covered by a larger entitlement envelope, matching GeForce NOW's official client behavior.
expandEntitledStreamResolutionsinopennow-stable/src/shared/gfn.tsto derive ultrawide presets from entitlements using a predefinedSTREAM_MODE_PRESETSlistresolveEntitledStreamProfileto use the expanded resolution listSettingsPage.tsxresolution optionsNote
Low Risk
Localized entitlement/stream-settings logic with new unit tests; no auth or network changes, though incorrect envelope rules could show or clamp wrong resolutions.
Overview
Adds derived stream resolution modes (including ultrawide presets like
3440x1440) when a user’s subscription entitlements cover them by pixel count and FPS, aligning OpenNOW with official GeForce NOW behavior.A new
expandEntitledStreamResolutionshelper merges API entitlements with a fixedSTREAM_MODE_PRESETSlist using an “envelope” rule (mode pixels ≤ entitlement pixels and mode FPS ≤ entitlement FPS).resolveEntitledStreamProfilenow resolves requests against this expanded set, and Settings runs the same expansion before building resolution/FPS pickers.Tests cover deriving ultrawide from 4K entitlements and not offering modes that exceed the entitlement envelope.
Reviewed by Cursor Bugbot for commit c3f2cd0. Configure here.