Skip to content

fix(entitlements): expand ultrawide resolutions against 4K entitlements - #606

Merged
zortos293 merged 2 commits into
devfrom
fix/issue-572-ultrawide-entitlements
Jul 5, 2026
Merged

fix(entitlements): expand ultrawide resolutions against 4K entitlements#606
zortos293 merged 2 commits into
devfrom
fix/issue-572-ultrawide-entitlements

Conversation

@zortos293

@zortos293 zortos293 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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.

  • Added expandEntitledStreamResolutions in opennow-stable/src/shared/gfn.ts to derive ultrawide presets from entitlements using a predefined STREAM_MODE_PRESETS list
  • Updated resolveEntitledStreamProfile to use the expanded resolution list
  • Integrated expansion into SettingsPage.tsx resolution options
  • Added tests for deriving ultrawide modes from 4K entitlements and rejecting modes larger than the entitlement envelope

Open OPE-255 OPE-255


Note

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 expandEntitledStreamResolutions helper merges API entitlements with a fixed STREAM_MODE_PRESETS list using an “envelope” rule (mode pixels ≤ entitlement pixels and mode FPS ≤ entitlement FPS). resolveEntitledStreamProfile now 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.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@zortos293 zortos293 added the capy Generated by capy.ai label Jul 5, 2026 — with Image Capy AI
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 985477e1-f73c-4f30-aec4-b4dadf968cd1

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-572-ultrawide-entitlements

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread opennow-stable/src/shared/gfn.ts Outdated
Comment on lines +544 to +545
entitlement.width * entitlement.height >= pixelCount &&
entitlement.fps >= fps,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c3f2cd0. Configure here.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@zortos293
zortos293 merged commit 3989375 into dev Jul 5, 2026
16 checks passed
Chizuui pushed a commit to Chizuui/OpenNOW-Modified that referenced this pull request Aug 11, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant