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 4 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 4 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 instead of "Launching game...", and set the correct splash text immediately at launch.

MainViewModel.launchApp now sets bootingSplashText to "Opening container..." or "Launching game..." right away, and XServerScreen switches to "Installing prerequisites..." during setup and then back to the right final message; removed the interim "Booting..." to avoid flicker.

Written for commit 98672be. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Splash screen now immediately displays a booting message at app start.
    • Boot splash text now distinguishes "Opening container..." vs "Launching game..." when container boot is enabled.
    • Same clear messaging applied across pre-install and launch sequences to avoid stale or misleading splash text.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc45e245-7660-405e-a031-af1b24456b45

📥 Commits

Reviewing files that changed from the base of the PR and between 1829c5c and 98672be.

📒 Files selected for processing (1)
  • app/src/main/java/app/gamenative/ui/model/MainViewModel.kt

📝 Walkthrough

Walkthrough

Launch flow now immediately shows a boot splash with context-aware bootingSplashText; XServerScreen emits "Opening container..." when bootToContainer is true and otherwise "Launching game..." in both pre-unpack and post pre-install completion paths.

Changes

Boot Splash Context-Aware Messaging

Layer / File(s) Summary
MainViewModel boot splash initialization
app/src/main/java/app/gamenative/ui/model/MainViewModel.kt
launchApp now immediately updates _state to set showBootingSplash and initializes bootingSplashText conditionally on bootToContainer.
XServerScreen pre-unpack conditional message
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
When preInstallCommands is empty, the pre-unpack splash now emits "Opening container..." if bootToContainer is true, otherwise "Launching game...".
XServerScreen chained pre-install completion message
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
After chained pre-install steps finish, the terminal splash text selects "Opening container..." for container boots and "Launching game..." for normal launches.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • utkarshdalal

Poem

🐰 I hop through code with tiny feet,
A splash appears — quick and neat,
"Opening container..." or "Launching game..." I say,
Ready the launch, then hop away.

🚥 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 PR title clearly describes the main change: displaying 'Opening container' on the loading screen when opening a container instead of 'Launching game'.
Description check ✅ Passed The PR description includes all required template sections: description of changes, recording attachment, type of change selection, and completed checklist items with approval confirmation.
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.

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

}

fun launchApp(context: Context, appId: String) {
fun launchApp(context: Context, appId: String) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

indentation is wrong here

viewModelScope.launch {
setShowBootingSplash(true)
PluviaApp.events.emit(AndroidEvent.SetAllowedOrientation(PrefManager.allowedOrientation))
_state.update {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

indentation is wrong here too

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