Create Navigation guards with OnboardingGuard & TestDriveModalGuard#81689
Create Navigation guards with OnboardingGuard & TestDriveModalGuard#81689mountiny merged 10 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
ed28b28 to
3556916
Compare
|
@QichenZhu @mountiny One of you needs to 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] |
|
@eh2077 You might be interested in reviewing this once again since you already have some context from the 1st PR |
|
not sure why lint fails, it finished with 0 errors |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
I'll look into it tmr |
|
@eh2077 I was able to reproduce and provided a fix that should prevent this issue in the future, could you please take a look? 🙏 |
eh2077
left a comment
There was a problem hiding this comment.
works well!
Screen.Recording.2026-02-11.at.6.19.09.PM.mov
Screen.Recording.2026-02-11.at.6.32.33.PM.mov
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.18-0 🚀
|
|
@TMisiukiewicz It's the last test ok?
Navigating to test.seven.faile.mp4 |
|
Hello @vincdargento ! I'm sorry, there is a mistake in the test plan 🙏 The correct version:
Thank you for reporting this! 🙏 |
|
@TMisiukiewicz QA team got this error:
when run the step
Can we skip this test? or any workaround to make it work? bandicam.2026-02-13.15-09-44-447.mp4 |
|
@IuliiaHerets not sure how to fix that, I think it's safe to skip this test |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false; | ||
|
|
||
| const shouldSkipOnboarding = context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember; |
There was a problem hiding this comment.
The onboarding guard added in this PR caused critical bug in onboarding flow.
Infinite loop, which leads to crash
More details: #83212 (comment)
| Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(reportID)); | ||
| } else { | ||
| // Navigate to home to trigger guard evaluation | ||
| Navigation.navigate(ROUTES.HOME); |
There was a problem hiding this comment.
@TMisiukiewicz Looks like we don't have the test drive modal guard anymore, do we still need it?
After completing the onboarding, this always navigate the user to HOME instead of staying where they were.
There was a problem hiding this comment.
if this was here only to satisfy the test drive modal then it should be safe to remove 👍
Explanation of Change
Fixed Issues
$ #79974
$ #81453
PROPOSAL:
Tests
xcrun simctl openurl booted "new-expensify://workspaces"in terminaladb shell am start -W -a android.intent.action.VIEW -d "new-expensify://workspaces"xcrun simctl openurl booted "new-expensify://workspaces"in terminaladb shell am start -W -a android.intent.action.VIEW -d "new-expensify://workspaces"xcrun simctl openurl booted "new-expensify://onboarding/purpose"in terminaladb shell am start -W -a android.intent.action.VIEW -d "new-expensify://onboarding/purpose"/onboarding/workspacesby:xcrun simctl openurl booted "newexpensify://workspaces"adb shell am start -a android.intent.action.VIEW -d "newexpensify://workspaces"Offline tests
n/a
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
android.mov
Android: mWeb Chrome
iOS: Native
ios.mov
iOS: mWeb Safari
ios.web.mov
MacOS: Chrome / Safari
web.mov