Skip to content

fix: Disable and give warning for Epic 3rd party launcher games#1419

Open
phobos665 wants to merge 3 commits into
utkarshdalal:masterfrom
phobos665:fix/epic-3rd-party-warning-disable
Open

fix: Disable and give warning for Epic 3rd party launcher games#1419
phobos665 wants to merge 3 commits into
utkarshdalal:masterfrom
phobos665:fix/epic-3rd-party-warning-disable

Conversation

@phobos665
Copy link
Copy Markdown
Contributor

@phobos665 phobos665 commented May 10, 2026

Description

This PR disables the Install button and gives a disabled warning for Epic games.

I've written this so that we can use the disabledWarning for a variety of reasons for the future.

Should help with user confusion.

Non-Third Party
Non-Third-Party

Third Party Launcher Required:
Third-Party

Note: We should agree on whether or not we want to do this for something like AC Syndicate which does actually install the game, but requires Ubisoft Connect to launch.

For now, I've made this a blanket specifically on installing all epic games that require a 3rd party app.

Recording

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Disable Install for Epic games that require a third‑party launcher and show a clear, localized warning. This prevents failed installs and reduces user confusion.

  • Bug Fixes
    • Block downloads for Epic titles marked as third‑party managed (isValidToDownload now checks thirdPartyManagedApp).
    • Show a red disabled warning in the app screen when the button is disabled; disabled state uses a muted button color.
    • Add disabledWarning to GameDisplayInfo to surface reasons in the UI.
    • Add epic_disabled_warning_third_party_client string with translations (en, da, de, es, fr, it, ko, pl, pt-BR, ro, ru, uk, zh-CN, zh-TW).

Written for commit f68cac6. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Shows a prominent disabled warning in the game view when a title requires a third‑party launcher and prevents downloading those titles.
  • Localization
    • Added localized Epic-store warning strings across multiple languages (DE, FR, ES, IT, PT‑BR, KO, PL, RU, UK, ZH, DA, RO and more).
  • UI
    • Adjusted action button styling for explicitly disabled state.

Review Change Stack

@phobos665 phobos665 requested a review from utkarshdalal as a code owner May 10, 2026 14:11
@phobos665 phobos665 changed the title Fix/epic 3rd party warning disable fix: Disable and give warning for Epic 3rd party launcher games May 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

📝 Walkthrough

Walkthrough

PR adds UI support for warning about Epic games that require third-party managed clients. New disabledWarning field in GameDisplayInfo carries warning messages. EpicAppScreen populates warnings when games have thirdPartyManagedApp set, and blocks downloads. LibraryAppScreen renders the warning in red when button is disabled. String resources added across 16 language variants.

Changes

Epic Third-Party App Warning Feature

Layer / File(s) Summary
Data Contract
app/src/main/java/app/gamenative/ui/data/GameDisplayInfo.kt
GameDisplayInfo adds optional disabledWarning: String? field to carry warning messages for disabled games.
Business Logic
app/src/main/java/app/gamenative/ui/screen/library/appscreen/EpicAppScreen.kt
getGameDisplayInfo populates disabledWarning when game has thirdPartyManagedApp. isValidToDownload now prevents downloads for games requiring third-party clients.
UI Rendering
app/src/main/java/app/gamenative/ui/screen/library/LibraryAppScreen.kt
PrimaryActionButton applies textMuted color for disabled state. AppScreenContent displays disabledWarning in red when button is disabled. Preview updated to show new warning field.
Localization
app/src/main/res/values*/strings.xml
Added epic_disabled_warning_third_party_client string resource across default and locale variants (da, de, es, fr, it, ko, pl, pt-BR, ro, ru, uk, zh-CN, zh-TW). Minor whitespace edits in some locale files.

Possibly related PRs

  • utkarshdalal/GameNative#323: Adds optional UI fields to GameDisplayInfo data class similarly, with direct code-level modifications to the same contract.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A soft hop warns of third-party play,
A muted button keeps downloads at bay,
Red text whispers why the game is denied,
Translations sing warnings far and wide,
A rabbit nods — the UI tells the why.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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
Title check ✅ Passed The title accurately summarizes the main changes: disabling the install button and showing warnings for Epic games requiring third-party launchers.
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.
Description check ✅ Passed The PR description comprehensively covers the change with detailed explanations, visual evidence via screenshots, alignment with templates, and completed checklist items.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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
`@app/src/main/java/app/gamenative/ui/screen/library/appscreen/EpicAppScreen.kt`:
- Around line 275-279: The warning gating currently uses
game.thirdPartyManagedApp.isNotEmpty(), which treats whitespace-only values as
non-empty; update both use-sites (the disabledWarning assignment in
EpicAppScreen and the related gating at lines around where install is disabled)
to normalize the field first (e.g., call .trim()) or use .isNotBlank() on
game.thirdPartyManagedApp before deciding to disable install or compose the
warning so whitespace-only values are treated as blank and no low-quality
warning is shown; refer to the EpicAppScreen.kt disabledWarning variable and the
gating logic that checks game.thirdPartyManagedApp to make the change
consistently.

In `@app/src/main/res/values/strings.xml`:
- Line 57: The default string resource epic_disabled_warning_third_party_client
currently lacks the format placeholder used in localized variants; update the
value of epic_disabled_warning_third_party_client to include the same
placeholder (e.g. %1$s) in the sentence where the third-party client name or
token is inserted, ensuring the format contract matches across all locales and
avoiding resource-format mismatches.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa55e35c-44b4-40d6-bf90-6d2d72c0c742

📥 Commits

Reviewing files that changed from the base of the PR and between 14cc45d and f68cac6.

📒 Files selected for processing (17)
  • app/src/main/java/app/gamenative/ui/data/GameDisplayInfo.kt
  • app/src/main/java/app/gamenative/ui/screen/library/LibraryAppScreen.kt
  • app/src/main/java/app/gamenative/ui/screen/library/appscreen/EpicAppScreen.kt
  • app/src/main/res/values-da/strings.xml
  • app/src/main/res/values-de/strings.xml
  • app/src/main/res/values-es/strings.xml
  • app/src/main/res/values-fr/strings.xml
  • app/src/main/res/values-it/strings.xml
  • app/src/main/res/values-ko/strings.xml
  • app/src/main/res/values-pl/strings.xml
  • app/src/main/res/values-pt-rBR/strings.xml
  • app/src/main/res/values-ro/strings.xml
  • app/src/main/res/values-ru/strings.xml
  • app/src/main/res/values-uk/strings.xml
  • app/src/main/res/values-zh-rCN/strings.xml
  • app/src/main/res/values-zh-rTW/strings.xml
  • app/src/main/res/values/strings.xml

Comment thread app/src/main/res/values/strings.xml
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 17 files

@phobos665 phobos665 marked this pull request as draft May 10, 2026 15:02
@phobos665 phobos665 marked this pull request as ready for review May 10, 2026 15:10
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 17 files

@utkarshdalal
Copy link
Copy Markdown
Owner

Any chance we could show this as a snackbar when the install button is pressed? I believe we had (and got removed during the UI overhaul) something like this when the user wasn't on wifi and tried to download

@phobos665
Copy link
Copy Markdown
Contributor Author

Any chance we could show this as a snackbar when the install button is pressed? I believe we had (and got removed during the UI overhaul) something like this when the user wasn't on wifi and tried to download

Would this not be a UX anti-pattern though? The assumption would be that we should disable a button that ultimately they cannot choose, rather than essentially throwing up an error when they try to install. Would make them assume that something is wrong/errored rather than intentional

@utkarshdalal
Copy link
Copy Markdown
Owner

Fair point, what if we hide the compatibility text then? So that this message will show in its place?
And maybe we can also make the message more explicit, like "This game cannot be installed as it requires a third-party launcher"

@phobos665
Copy link
Copy Markdown
Contributor Author

Fair point, what if we hide the compatibility text then? So that this message will show in its place? And maybe we can also make the message more explicit, like "This game cannot be installed as it requires a third-party launcher"

That's a very fair point. Happy to do that!

@utkarshdalal
Copy link
Copy Markdown
Owner

@phobos665 - let me know when ready? Also looks like we have some conflicts

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.

2 participants