fix: Force close app then open, home page displays instead of onboarding modal - #97443
fix: Force close app then open, home page displays instead of onboarding modal#97443nkdengineer wants to merge 2 commits into
Conversation
|
@cretadn22 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ff7f1298d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // isNavigationReady ensures navigation is ready, which is critical during fresh login. | ||
| if (isOnboardingCompleted === false) { | ||
| Navigation.waitForProtectedRoutes().then(() => { | ||
| Navigation.isNavigationReady().then(() => { |
There was a problem hiding this comment.
Wait for auth routes before resetting onboarding
When AuthScreens has just mounted after a fresh sign-in, the NavigationContainer can already be "ready" from the earlier PublicScreens stack, so this promise resolves immediately. Unlike waitForProtectedRoutes, it does not verify that the protected stack that registers OnboardingModalNavigator has been installed before startOnboardingFlow() calls resetRoot; in that auth-screen swap race the reset can be built from the public TAB_NAVIGATOR state and the onboarding route is not registered, leaving new users on home/sign-in instead of the onboarding modal. Please wait for protected route registration (or an equivalent onboarding-route registration check) before starting the flow.
Useful? React with 👍 / 👎.
Explanation of Change
fix: Force close app then open, home page displays instead of onboarding modal
Fixed Issues
$ #96378
PROPOSAL: #96378 (comment)
Tests
Offline tests
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-07-30.at.16.10.59.mov
Android: mWeb Chrome
Screen.Recording.2026-07-30.at.16.16.55.mov
iOS: Native
Screen.Recording.2026-07-30.at.16.15.12.mov
iOS: mWeb Safari
Screen.Recording.2026-07-30.at.16.18.09.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-30.at.16.18.59.mov