Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
IkeyBenz
force-pushed
the
fix/direct-game-link-blank-screen
branch
from
January 30, 2026 00:00
b3bab5d to
271bccc
Compare
IkeyBenz
force-pushed
the
fix/direct-game-link-blank-screen
branch
from
January 30, 2026 00:06
271bccc to
d15b43e
Compare
IkeyBenz
force-pushed
the
fix/direct-game-link-blank-screen
branch
from
January 30, 2026 00:10
d15b43e to
e4574ff
Compare
Root cause: On direct navigation to game URL, auth hasn't completed yet but the screen renders showing a blank green background. Fix: 1. AuthProvider uses onAuthStateChanged to set userId immediately 2. SplashScreenProvider waits for AuthProvider.isLoading 3. Game screen shows loading spinner while auth/game data loads (instead of blank green screen)
IkeyBenz
force-pushed
the
fix/direct-game-link-blank-screen
branch
from
January 30, 2026 00:15
e4574ff to
e3a06b2
Compare
IkeyBenz
added a commit
that referenced
this pull request
Feb 8, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening a game link directly (e.g.,
modi.app/games/abc123) showed a blank green background. Users had to refresh to see the lobby content.Root Cause
Race condition between auth initialization and UI rendering. When navigating directly to a game link:
AuthProvidercalledsetUserIdAFTER awaitinggetIdToken(true)token refreshUsernameProvider'sonAuthStateChangedfires, causing splash screen to hideGameScreenrenders withcurrentUserId=null, showing emptyScreenContainersetUserIdfinally called - but splash already hidden, user sees green screenSolution
Three targeted fixes:
1. AuthProvider (
providers/Auth.tsx)Set
userIdimmediately when auth succeeds, move token refresh to background:2. useGame hook (
ui/screens/Game/hooks/useGame.ts)Guard against undefined
gameIdduring initial route parsing:3. GameScreen (
ui/screens/Game/index.tsx)Use
isAuthLoadingstate for proper loading behavior:Testing
The fix ensures the UI has the auth state before the splash screen hides, eliminating the race condition that caused the blank green screen.