Skip to content

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

Open
Monkeygamer2010 wants to merge 2 commits into
utkarshdalal:masterfrom
Monkeygamer2010:patch1
Open

fix: Show "Opening container" on loading screen when opening a container instead of saying "Launching Game"#1563
Monkeygamer2010 wants to merge 2 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...” on the splash screen when using Open Container, instead of “Launching game...”.

Set the correct splash text immediately on launch to avoid flashing stale text; other states still use “Installing prerequisites...” and “Launching game...”.

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

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Fixed splash screen messages during app launch to accurately reflect the current operation (opening container vs. launching game) instead of displaying stale messages from previous sessions.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR makes boot splash text context-aware by checking the bootToContainer flag. MainViewModel now sets splash text immediately after enabling the splash screen, then XServerScreen refines conditional messaging during pre-install setup and completion steps.

Changes

Boot Splash Context-Aware Messaging

Layer / File(s) Summary
MainViewModel boot splash text initialization
app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
After showing the booting splash, launchApp immediately sets the splash text using the current bootToContainer state, choosing between "Opening container..." and "Launching game..." to prevent displaying stale text from prior sessions.
XServerScreen pre-install conditional splash messages
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
During pre-unpack and pre-install chaining, boot splash text now branches based on bootToContainer: "Opening container..." when container boot is enabled, otherwise "Launching game..."

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • utkarshdalal/GameNative#238: Adds the boot-splash text plumbing infrastructure (AndroidEvent.SetBootingSplashText and MainViewModel machinery) that this PR uses.
  • utkarshdalal/GameNative#778: Modifies boot-splash text logic in XServerScreen during the guest pre-unpack/pre-install flow.

Poem

🐰 A splash of clarity springs forth,
Container or game, the message now knows!
No more stale echoes from sessions of old,
Each launch announces its purpose so bold. ✨

🚥 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
Description check ✅ Passed The description follows the template with all major sections completed: clear explanation of the change, recording attached, type of change marked, and all checklist items completed.
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.
Title check ✅ Passed The title accurately summarizes the main change: showing 'Opening container' instead of 'Launching Game' on the loading screen when opening a container, which directly matches the file changes made to MainViewModel.kt and XServerScreen.kt.

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

@Monkeygamer2010

Copy link
Copy Markdown
Author

Trying to fix an issue where "Launching game" still appears for a second when opening a container and where "Opening Container" appears for a second when launching a game. Seen in this video

Screen_Recording_20260609_165248_GameNative.mp4

@Monkeygamer2010

Copy link
Copy Markdown
Author

Fixed, video is larger than 10mb so i cant upload it uncompressed, here's the zip.
Screen_Recording_20260609_220114_GameNative.zip

@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

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt">

<violation number="1" location="app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt:3245">
P2: Hardcoded UI splash text literals should be moved to string resources and deduplicated</violation>
</file>

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

Re-trigger cubic

if (preInstallCommands.isNotEmpty()) {
PluviaApp.events.emit(AndroidEvent.SetBootingSplashText("Installing prerequisites..."))
} else if (bootToContainer) {
PluviaApp.events.emit(AndroidEvent.SetBootingSplashText("Opening container..."))

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.

P2: Hardcoded UI splash text literals should be moved to string resources and deduplicated

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt, line 3245:

<comment>Hardcoded UI splash text literals should be moved to string resources and deduplicated</comment>

<file context>
@@ -3239,8 +3239,10 @@ private fun setupXEnvironment(
+    if (preInstallCommands.isNotEmpty()) {
                 PluviaApp.events.emit(AndroidEvent.SetBootingSplashText("Installing prerequisites..."))
+            } else if (bootToContainer) {
+                PluviaApp.events.emit(AndroidEvent.SetBootingSplashText("Opening container..."))
             } else {
                 PluviaApp.events.emit(AndroidEvent.SetBootingSplashText("Launching game..."))
</file context>

@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 on lines +452 to +455
setShowBootingSplash(true)
+ // Set the correct splash text immediately so it doesn't flash stale text from a previous session
+ setBootingSplashText(if (_state.value.bootToContainer) "Opening container..." else "Launching game...")
PluviaApp.events.emit(AndroidEvent.SetAllowedOrientation(PrefManager.allowedOrientation))

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make splash visibility+text update atomic to fully eliminate stale-text flash.

Line 452 and Line 454 emit two separate state updates, so the splash can still appear for one frame with old text. Update both fields in a single _state.update (or set text before visibility in one transaction path).

Suggested fix
-            setShowBootingSplash(true)
-            // Set the correct splash text immediately so it doesn't flash stale text from a previous session
-            setBootingSplashText(if (_state.value.bootToContainer) "Opening container..." else "Launching game...")
+            _state.update {
+                it.copy(
+                    showBootingSplash = true,
+                    bootingSplashText = if (it.bootToContainer) "Opening container..." else "Launching game...",
+                )
+            }
🤖 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/model/MainViewModel.kt` around lines 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.

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.

1 participant