From 34cc1883f5bb3af6f5347401daf7e84b16822dbf Mon Sep 17 00:00:00 2001 From: cloudwithax Date: Sat, 14 Feb 2026 20:31:21 -0500 Subject: [PATCH] feat(auth): handle fresh install flow in splash screen add separate effect for users without stored identity to play animation then transition to signup, preventing unnecessary retry loop meant only for returning users --- src/components/auth/SplashScreen.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/auth/SplashScreen.tsx b/src/components/auth/SplashScreen.tsx index 54f58ea..bfc9385 100644 --- a/src/components/auth/SplashScreen.tsx +++ b/src/components/auth/SplashScreen.tsx @@ -45,9 +45,9 @@ const SplashScreen: Component = (props) => { animTimer = setTimeout(() => setAnimationComplete(true), 3450); - // if no connection after 5s, play exit and loop + // if no connection after 5s, play exit and loop (only for returning users) exitTimer = setTimeout(() => { - if (props.relayConnected) return; + if (props.relayConnected || !props.identity) return; setRetrying(true); @@ -77,7 +77,7 @@ const SplashScreen: Component = (props) => { onMount(() => startCycle()); - // handle successful relay connection + // handle successful relay connection for returning users createEffect(() => { if (animationComplete() && props.relayConnected && props.identity) { clearTimers(); @@ -88,6 +88,15 @@ const SplashScreen: Component = (props) => { } }); + // fresh install - no identity on disk, play the animation then hand off to signup + createEffect(() => { + if (animationComplete() && !props.identity) { + clearTimers(); + setFading(true); + setTimeout(() => props.onComplete(), 500); + } + }); + onCleanup(() => clearTimers()); // derived status text to keep jsx clean