Skip to content

fix: Show "Opening container" on loading screen when opening a container instead of saying "Launching Game"#1563

Draft
Monkeygamer2010 wants to merge 14 commits into
utkarshdalal:masterfrom
Monkeygamer2010:patch1
Draft

fix: Show "Opening container" on loading screen when opening a container instead of saying "Launching Game"#1563
Monkeygamer2010 wants to merge 14 commits into
utkarshdalal:masterfrom
Monkeygamer2010:patch1

Conversation

@Monkeygamer2010

@Monkeygamer2010 Monkeygamer2010 commented Jun 9, 2026

Copy link
Copy Markdown

Description

Previously when opening a container for any game would give a loading screen saying "Launching game" which doesn't correspond to what is actually happening, this changes the loading screen to instead say "Opening container" ONLY when the "Open Container" option is pressed, this has no effect on any other loading screen.

Recording

Screen_Recording_20260609_220114_GameNative.zip

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

Show “Opening container…” when using Open Container and set the correct splash text immediately to prevent flicker. Dialog/setup flows preserve the right message, use R.string, and remove a duplicate bootToContainer parameter.

  • Bug Fixes
    • MainViewModel.launchApp: sets showBootingSplash and bootingSplashText immediately via R.string based on bootToContainer.
    • PluviaMain: passes bootToContainer through all dialog retries, reads the latest ViewModel state for XServerScreen to avoid reversion after prompts, and removes a duplicate bootToContainer param.
    • XServerScreen: adds a pre-unpack hook; uses R.string for prerequisites, DRM, and per-executable DRM progress; restores the correct message instead of a neutral “Booting…”.
    • XAudioUtils: uses R.string for “Extracting XAudio DLLs…”.

Written for commit 45be9a4. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved initial boot-splash display so the correct message shows immediately on app start, matching the selected “boot to container” mode.
    • Refined boot-splash messaging across pre-install and launch steps to reliably switch between “Opening container...” and “Launching game...”.
    • Localized DRM and XAudio DLL extraction boot-splash text, including per-executable DRM progress updates.
    • Preserved “boot to container” selection through dialog-driven launch flows and ensured the XServer screen reflects the latest state.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Boot splash messaging is updated across launch and container setup flows to use bootToContainer and localized string resources. Launch paths now preserve the container-boot selection, and XServer/XAudio splash text is emitted from localized resources.

Changes

Boot Splash Context-Aware and Localized Messaging

Layer / File(s) Summary
MainViewModel boot splash initialization
app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
launchApp updates boot splash state immediately and sets bootingSplashText from string resources based on bootToContainer.
PluviaMain bootToContainer propagation and state capture
app/src/main/java/app/gamenative/ui/PluviaMain.kt
Launch confirmation paths pass bootToContainer into preLaunchApp, and the XServer route reads appId, bootToContainer, and testGraphics from a locally captured currentState.
XServerScreen pre-launch context-aware messages
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
setupXEnvironment removes the pre-unpack splash emission, chainPreInstallSteps branches final splash text on bootToContainer, and the pre-install path keeps the localized installing-prerequisites message.
XServerScreen DRM unpacking localized messages
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
unpackExecutableFile and the Steamless DRM loop replace hardcoded DRM splash text with localized resources, including per-executable progress text.
XAudioUtils XAudio extraction localized message
app/src/main/java/app/gamenative/ui/screen/xserver/XAudioUtils.kt
replaceXAudioDllsFromRedistributable adds the R import, keeps the same callable signature, and emits a localized extraction splash string.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • utkarshdalal

Poem

🐰 Splash text hops from screen to screen,
“Opening container” and “Launching game” glow clean.
Strings go local, the rabbit chews neat,
Boot flows now wiggle in rhythm and beat.
✨🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 clearly summarizes the main user-facing change: showing "Opening container" instead of "Launching Game" when opening a container.
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 matches the required template and includes a clear summary, recording, type of change, and completed checklist.

✏️ 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.

@Monkeygamer2010 Monkeygamer2010 marked this pull request as ready for review June 10, 2026 02:12

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt Outdated
@Monkeygamer2010 Monkeygamer2010 changed the title Show "Opening container" on loading screen instead when opening a container instead of saying "Launching Game" fix: Show "Opening container" on loading screen instead when opening a container instead of saying "Launching Game" Jun 10, 2026
@Monkeygamer2010 Monkeygamer2010 changed the title fix: Show "Opening container" on loading screen instead when opening a container instead of saying "Launching Game" fix: Show "Opening container" on loading screen when opening a container instead of saying "Launching Game" Jun 10, 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 `@app/src/main/java/app/gamenative/ui/model/MainViewModel.kt`:
- Around line 452-455: The two separate state updates (setShowBootingSplash and
setBootingSplashText) can cause a one-frame flash of stale text; change the code
to perform a single atomic state update on _state (e.g., use _state.update {
it.copy(showBootingSplash = true, bootingSplashText = if (it.bootToContainer)
"Opening container..." else "Launching game...") }) so both visibility and text
change together; update the call site where setShowBootingSplash and
setBootingSplashText are invoked to use this single _state.update to avoid
intermediate state.
🪄 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: 42c871ea-e786-4a0c-8f43-ebead076f88b

📥 Commits

Reviewing files that changed from the base of the PR and between a0b49d1 and dcdcffd.

📒 Files selected for processing (2)
  • app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

Comment thread app/src/main/java/app/gamenative/ui/model/MainViewModel.kt Outdated
@Monkeygamer2010 Monkeygamer2010 marked this pull request as draft June 10, 2026 15:37
Refactor booting splash logic to improve clarity and prevent flickering.
@Monkeygamer2010 Monkeygamer2010 marked this pull request as ready for review June 11, 2026 19:18
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Re-trigger cubic

@Monkeygamer2010

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

reverted the neutral "Booting" before "Launching Game" or "Opening container"
@Monkeygamer2010

Copy link
Copy Markdown
Author

@cubic-dev-ai review this latest commit

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this latest commit

@Monkeygamer2010 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Re-trigger cubic

@Monkeygamer2010

Monkeygamer2010 commented Jun 13, 2026

Copy link
Copy Markdown
Author

Tested further everything looks good

Comment thread app/src/main/java/app/gamenative/ui/model/MainViewModel.kt Outdated
Comment thread app/src/main/java/app/gamenative/ui/model/MainViewModel.kt Outdated

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread app/src/main/java/app/gamenative/ui/model/MainViewModel.kt Outdated
@Monkeygamer2010

Copy link
Copy Markdown
Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@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 `@app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt`:
- Around line 3243-3247: The PluviaApp.events.emit calls with
AndroidEvent.SetBootingSplashText contain hardcoded English strings ("Installing
prerequisites...", "Opening container...", "Launching game...") which bypass
localization. Replace these hardcoded strings with string resources (e.g.,
getString(R.string.boot_splash_prerequisites),
getString(R.string.boot_splash_opening_container),
getString(R.string.boot_splash_launching_game)) in both locations mentioned (the
initial block around line 3243-3247 and the second block around 3345-3351).
Define the corresponding string resource entries in the strings.xml file to
ensure consistent localization across the app like the MainViewModel and DRM
flows already do.
🪄 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: 277913fc-01ea-4403-846c-81f0acdb36b2

📥 Commits

Reviewing files that changed from the base of the PR and between 9468760 and a37fd3d.

📒 Files selected for processing (3)
  • app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XAudioUtils.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

Comment thread app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt Outdated
Replaced pre-install command checks with a pre-unpack setup for the guest program launcher.
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

Comment thread app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
Comment thread app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
Comment thread app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
@utkarshdalal

Copy link
Copy Markdown
Owner

@Monkeygamer2010 have left some comments

…viewModel.state.value

Fixes a bug where if a cloud conflict or any sort of dialogue pop up happens when "open container" is pressed, the splash text will return to "Launching Game" instead of "Opening container". And read the latest state from directly ViewModel instead of waiting for recomposition.
@Monkeygamer2010

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/app/gamenative/ui/PluviaMain.kt (1)

895-906: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Critical syntax error: duplicate parameter and closing parenthesis.

Lines 903-904 correctly close the preLaunchApp call with the bootToContainer parameter. Lines 905-906 duplicate this, creating a syntax error that will prevent compilation.

🐛 Proposed fix
                     onSuccess = viewModel::launchApp,
                     isOffline = viewModel.isOffline.value,
                     bootToContainer = state.bootToContainer,
                 )
-                    bootToContainer = state.bootToContainer,
-                )
             }
🤖 Prompt for 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.

In `@app/src/main/java/app/gamenative/ui/PluviaMain.kt` around lines 895 - 906,
The preLaunchApp function call has duplicate parameters and closing parenthesis
creating a syntax error. The bootToContainer parameter and its closing
parenthesis appear twice - once correctly on lines 903-904, and then again
duplicated on lines 905-906. Remove the duplicate bootToContainer parameter
assignment and the extra closing parenthesis that appear after the initial
function call closes, keeping only the first instance of the parameter and
closing parenthesis.
🤖 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.

Outside diff comments:
In `@app/src/main/java/app/gamenative/ui/PluviaMain.kt`:
- Around line 895-906: The preLaunchApp function call has duplicate parameters
and closing parenthesis creating a syntax error. The bootToContainer parameter
and its closing parenthesis appear twice - once correctly on lines 903-904, and
then again duplicated on lines 905-906. Remove the duplicate bootToContainer
parameter assignment and the extra closing parenthesis that appear after the
initial function call closes, keeping only the first instance of the parameter
and closing parenthesis.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a79ec498-cbf7-47b8-8d4c-3e27c472d755

📥 Commits

Reviewing files that changed from the base of the PR and between becdfb6 and 5f11800.

📒 Files selected for processing (2)
  • app/src/main/java/app/gamenative/ui/PluviaMain.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

@Monkeygamer2010

Copy link
Copy Markdown
Author

tested again with new commits and everything works good and cloud save conflicts wont make "Open container" have "Launching game" on its splash screen.
@coderabbitai full review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

tested again with new commits and everything works good and cloud save conflicts wont make "Open container" have "Launching game" on its splash screen.
@coderabbitai full review
@cubic-dev-ai review

@Monkeygamer2010 I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@Monkeygamer2010 Thanks for the thorough testing confirmation! Great to hear that the cloud save conflict race condition is properly resolved and "Open container" now consistently shows the correct splash text. Triggering a full review now.

(∩`-´)⊃━☆゚.*・。゚

✅ Action performed

Full review finished.

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/app/gamenative/ui/PluviaMain.kt (1)

860-870: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Propagate bootToContainer in the remaining re-launch dialog paths.

DialogType.SYNC_IN_PROGRESS and DialogType.APP_SESSION_ACTIVE still call preLaunchApp(...) without bootToContainer, so they fall back to false and can regress the Open Container flow/message on retry paths.

Proposed fix
                 preLaunchApp(
                     context = context,
                     appId = state.launchedAppId,
                     skipCloudSync = true,
                     setLoadingDialogVisible = viewModel::setLoadingDialogVisible,
                     setLoadingProgress = viewModel::setLoadingDialogProgress,
                     setLoadingMessage = viewModel::setLoadingDialogMessage,
                     setMessageDialogState = setMessageDialogState,
                     onSuccess = viewModel::launchApp,
                     isOffline = viewModel.isOffline.value,
+                    bootToContainer = state.bootToContainer,
                 )
...
                 preLaunchApp(
                     context = context,
                     appId = state.launchedAppId,
                     ignorePendingOperations = true,
                     setLoadingDialogVisible = viewModel::setLoadingDialogVisible,
                     setLoadingProgress = viewModel::setLoadingDialogProgress,
                     setLoadingMessage = viewModel::setLoadingDialogMessage,
                     setMessageDialogState = setMessageDialogState,
                     onSuccess = viewModel::launchApp,
+                    bootToContainer = state.bootToContainer,
                 )

Also applies to: 917-926

🤖 Prompt for 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.

In `@app/src/main/java/app/gamenative/ui/PluviaMain.kt` around lines 860 - 870,
The re-launch dialog paths in PluviaMain.kt still call preLaunchApp without
passing bootToContainer, so the retry flow defaults to false and can break the
Open Container behavior. Update the DialogType.SYNC_IN_PROGRESS and
DialogType.APP_SESSION_ACTIVE branches to forward the same bootToContainer value
used elsewhere when invoking preLaunchApp, matching the existing
launchApp/preLaunchApp flow.
🤖 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/PluviaMain.kt`:
- Around line 951-954: There is an extra unmatched closing parenthesis after the
preLaunchApp call in PluviaMain.kt, which breaks Kotlin syntax and compilation.
Remove the stray “)” so the surrounding if/launch block in the preLaunchApp(...)
section closes with the correct number of parentheses, and verify the nearby
bootToContainer assignment and method call nesting remain balanced.

---

Outside diff comments:
In `@app/src/main/java/app/gamenative/ui/PluviaMain.kt`:
- Around line 860-870: The re-launch dialog paths in PluviaMain.kt still call
preLaunchApp without passing bootToContainer, so the retry flow defaults to
false and can break the Open Container behavior. Update the
DialogType.SYNC_IN_PROGRESS and DialogType.APP_SESSION_ACTIVE branches to
forward the same bootToContainer value used elsewhere when invoking
preLaunchApp, matching the existing launchApp/preLaunchApp flow.
🪄 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: 1aee6dfe-28a6-463d-be49-01761692392b

📥 Commits

Reviewing files that changed from the base of the PR and between 9468760 and 618e5e1.

📒 Files selected for processing (4)
  • app/src/main/java/app/gamenative/ui/PluviaMain.kt
  • app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XAudioUtils.kt
  • app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

Comment thread app/src/main/java/app/gamenative/ui/PluviaMain.kt

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 1 file (changes from recent commits).

Re-trigger cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment @cubic-dev-ai review.

@Monkeygamer2010 Monkeygamer2010 marked this pull request as draft June 30, 2026 06:13
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