fix: Show "Opening container" on loading screen when opening a container instead of saying "Launching Game"#1563
Conversation
…nstead of saying "Launching Game"
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughLaunch flow now immediately shows a boot splash with context-aware ChangesBoot Splash Context-Aware Messaging
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 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...")) |
There was a problem hiding this comment.
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>
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/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
📒 Files selected for processing (2)
app/src/main/java/app/gamenative/ui/model/MainViewModel.ktapp/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
Refactor booting splash logic to improve clarity and prevent flickering.
✅ Action performedFull review finished. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
reverted the neutral "Booting" before "Launching Game" or "Opening container"
|
@cubic-dev-ai review this latest commit |
@Monkeygamer2010 I have started the AI code review. It will take a few minutes to complete. |
|
Tested further everything looks good |
| } | ||
|
|
||
| fun launchApp(context: Context, appId: String) { | ||
| fun launchApp(context: Context, appId: String) { |
| viewModelScope.launch { | ||
| setShowBootingSplash(true) | ||
| PluviaApp.events.emit(AndroidEvent.SetAllowedOrientation(PrefManager.allowedOrientation)) | ||
| _state.update { |
There was a problem hiding this comment.
indentation is wrong here too
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
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
Show "Opening container..." when using Open Container instead of "Launching game...", and set the correct splash text immediately at launch.
MainViewModel.launchAppnow setsbootingSplashTextto "Opening container..." or "Launching game..." right away, andXServerScreenswitches 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.
Summary by CodeRabbit