Skip to content

fix: hide splash screen on onboarding and login screens#524

Open
songyipan wants to merge 1 commit intoobytes:masterfrom
songyipan:fix-splash-screen
Open

fix: hide splash screen on onboarding and login screens#524
songyipan wants to merge 1 commit intoobytes:masterfrom
songyipan:fix-splash-screen

Conversation

@songyipan
Copy link
Copy Markdown

@songyipan songyipan commented Apr 24, 2026

What does this do?

Adds SplashScreen.hideAsync() calls to onboarding-screen.tsx and login-screen.tsx, and adds error handling to storage.getItem().

Why did you do this?

Bug: The app was stuck on the splash screen.

Root cause: SplashScreen.hideAsync() was only called in TabLayout's useEffect, but when isFirstTime is true or user is signed out, the app redirects to onboarding or login screens before TabLayout renders. This means the splash screen hiding logic never executes.

Additionally, storage.getItem() could throw on JSON.parse errors, potentially blocking auth hydration and leaving status as idle.

Who/what does this impact?

  • Users on first app launch (onboarding flow)
  • Users who are not signed in (login flow)
  • Any code path that redirects away from TabLayout before splash screen can be hidden

How did you test this?

  1. Cleared app data to simulate first-time user
  2. Observed app now correctly shows onboarding screen instead of being stuck on splash
  3. Tested login screen after onboarding - splash screen hides correctly
  4. Added console logs to verify auth hydration completes with correct status

SplashScreen was only hidden in TabLayout, but when isFirstTime is true
or user is signed out, the app redirects to onboarding/login screens
before TabLayout's useEffect runs, causing the splash screen to never
hide.

Also added error handling to storage getItem to prevent JSON.parse
exceptions from blocking auth hydration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for obytes-starter canceled.

Name Link
🔨 Latest commit d0ddf64
🔍 Latest deploy log https://app.netlify.com/projects/obytes-starter/deploys/69eb9025cc10a400072f6f9a

@songyipan songyipan changed the title fix splash screen fix: hide splash screen on onboarding and login screens Apr 25, 2026
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