fix(navigation): eliminate cold-start splash overlap by reading auth state before runApp - #281
Conversation
syed-tp
commented
Sep 8, 2026
- FlutterSecureStorage is async, so goRouterProvider had no way to know auth state at construction — initialLocation was always /onboarding. On fast devices, the router immediately redirected to /home, causing both screens to render simultaneously (the overlap).
- Read the auth token from FlutterSecureStorage in main() before runApp(). Pass the result via cachedAuthFlagProvider so goRouterProvider can set initialLocation = '/home' on the first frame for authenticated users. OnboardingScreen is never mounted on cold start — no transition, no overlap. authProvider still performs full async verification after launch.
…ot auth token check
|
Claude finished @syed-tp's task in 3m 38s —— View job Claude finished reviewingTodo list:
PR Review Summary✅ What's good
🔴 CRITICAL — Must fix before merge
🟡 WARNING — Should fix
🔵 SUGGESTION — Nice to have
VerdictCHANGES REQUESTED — primarily #1: as written, the router-level fix appears to be neutralized by the existing |
…der for immediate router initialization
|
@claude review |
|
Claude finished @syed-tp's task in 3m 14s —— View job Claude finished @syed-tp's review request — this is a re-review of the branch after the fixes pushed in commits Todo list:
PR Review Summary✅ What's good
🟡 WARNING — Should fix (non-blocking)
🔵 SUGGESTION — Nice to have
Note on verification
VerdictAPPROVED — the CRITICAL router/loading-gate bug and the unguarded-storage-read crash risk from the previous review are both fixed, with regression tests added. Remaining items above are non-blocking follow-ups. |