Fall back to English depots for unavailable languages#1659
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughSteamService now derives an effective depot language from installable depots and applies it to base app filtering and indirect DLC depot selection. ChangesSteam depot language resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
1 issue found across 1 file
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
227fe31 to
e7c780c
Compare
e7c780c to
4561a39
Compare
There was a problem hiding this comment.
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 `@app/src/main/java/app/gamenative/service/SteamService.kt`:
- Around line 948-960: The fallback language selection in
resolveDownloadableDepots is too broad because availableLanguages is built from
every depot, including DLC-only depots, which can cause effectiveLanguage to
favor a language the base game does not actually support. Restrict the language
pool to base-game depots only (for example, depots with dlcAppId ==
INVALID_APP_ID) before applying the preferred-language/English fallback. Keep
the language choice deterministic by avoiding reliance on LinkedHashSet
iteration order when selecting the fallback language, so
filterForDownloadableDepots sees the base game’s real language set.
🪄 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: 01a8a64f-ae98-4b6b-81a6-3252436155df
📒 Files selected for processing (1)
app/src/main/java/app/gamenative/service/SteamService.kt
4561a39 to
527efc1
Compare
There was a problem hiding this comment.
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 `@app/src/main/java/app/gamenative/service/SteamService.kt`:
- Around line 1055-1063: The DLC language resolution in effectiveDepotLanguage()
is still hardcoded to base-game depots, so indirect DLCs can miss all eligible
languages. Update the language selection path used from the indirectDlcApps loop
in SteamService to accept a configurable depot scope or predicate, and pass a
DLC-aware filter that includes depots tagged with the DLC’s app id from
generateSteamApp() instead of only INVALID_APP_ID. Keep the existing base-game
behavior intact by reusing the same effectiveDepotLanguage() logic with
different scope inputs for base apps versus DLC apps.
🪄 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: 86956d15-70a0-488e-affc-77b814a040ab
📒 Files selected for processing (1)
app/src/main/java/app/gamenative/service/SteamService.kt
527efc1 to
ac55c45
Compare
There was a problem hiding this comment.
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/service/SteamService.kt`:
- Around line 938-942: The depot selection flow is not consistently passing
hasSteamUnlockedBranch, so unlocked encrypted depots can be considered by
effectiveDepotLanguage() but later excluded by eligibleDepots() and the final
filter. Update the depot eligibility path in SteamService.kt to thread the same
hasSteamUnlockedBranch value through eligibleDepots(...) and the final filter
call that uses filterForDownloadableDepots(...), keeping the branch-unlocked
behavior consistent across both selection and downloadability checks.
In `@app/src/main/java/app/gamenative/utils/SteamUtils.kt`:
- Around line 119-126: `DepotInfo.installableInItsLanguage()` is allowing realms
that `filterForDownloadableDepots()` will later reject, which can make
`effectiveDepotLanguage` pick an unusable language. Update the
language-availability check in `SteamUtils.kt` so it mirrors the final realm
gate used by `filterForDownloadableDepots()`, and ensure the same
SteamChina-only restriction is applied before a depot is considered selectable.
🪄 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: 1c1fc39f-6b4e-4cae-a72d-1f1d581fae92
📒 Files selected for processing (2)
app/src/main/java/app/gamenative/service/SteamService.ktapp/src/main/java/app/gamenative/utils/SteamUtils.kt
abf2a7c to
b0f4214
Compare
|
Please add back the PR template, it should not be overwritten |
|
Updated @utkarshdalal |
b0f4214 to
7168105
Compare
Description
Some owned games show 0 B download and disk size and can't be installed. Example: appId 1150690 on a French container.
The cause is depot language selection. That game ships one full Windows depot per language (English, Simplified Chinese, Japanese, Korean) with no language-neutral build.
filterForDownloadableDepotsdrops every non-DLC depot whoselanguagedoesn't match the container language, and none of them is French, so all depots are filtered out: zero downloadable depots, hence 0 B and no install.Fix: added
SteamUtils.effectiveDepotLanguage, which picks the language to filter by from what the app actually ships an installable depot in — the requested one, else English (Steam's default), else any language it offers. Depot resolution filters by that effective language instead of the raw container language.The helper lives in
SteamUtilsso both the base game (resolveDownloadableDepots) and each DLC (getDownloadableDepots) resolve their own language independently, so we don't pull wrong-language files for a DLC. It only pools tagged base-game depots when choosing the fallback, so an owned in-app DLC can't steer the base game's language, and untagged (neutral) depots pass the language filter unconditionally and are ignored by the pool, so they resolve regardless. Games that already offer the requested language are unaffected.Result: the French container now resolves the English depot for 1150690 and shows a real size / can install. Any game shipping per-language depots without the user's language is fixed the same way, base game and DLC alike.
Recording
Type of Change
Checklist
#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.CONTRIBUTING.md.Summary by cubic
Fall back to English (or another shipped language) when a game’s container language isn’t available in Windows depots, so base games and DLC show real sizes and install instead of 0 B.
SteamUtils.effectiveDepotLanguagefrom installable base‑game Windows depots: requested →english→ first available; neutral depots don’t steer; DLC depots don’t steer the base game; arch ignored; excludeSteamChina; encrypted manifests count only with a Steam‑unlocked branch; respect licensing and DLC ownership.Written for commit 7168105. Summary will update on new commits.
Summary by CodeRabbit