Fix: land onboarding Track-business users on Home instead of Inbox - #97613
Draft
marcochavezf wants to merge 2 commits into
Draft
Fix: land onboarding Track-business users on Home instead of Inbox#97613marcochavezf wants to merge 2 commits into
marcochavezf wants to merge 2 commits into
Conversation
The guard at the onboarding call sites used isReportTopmostSplitNavigator(), which only checks whether the Reports tab is topmost, not whether it actually shows a report. When a fresh onboarding user's base tab happened to be the empty Inbox, the guard treated that as a report worth preserving, skipped Navigation.navigate(ROUTES.HOME), and left the user stranded on Inbox. Add isReportRevealedInTopmostSplitNavigator() in src/libs/Navigation/helpers/, which also requires a SCREENS.REPORT route in the split's inner routes before treating it as revealed. Replace the guard at both call sites in RHPVariantTest/index.ts and at the fallback gate in navigateAfterOnboarding.ts. isReportTopmostSplitNavigator is left untouched, since the IOU flows and SignInModal still call it directly for unrelated checks.
40 tasks
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…avigator and its test Pass 1 removed two comments that restated the line right below them: a what-paraphrase of the fallback expression in the new helper, and two mock-setup comments in navigateAfterOnboardingTest.ts that duplicated their own test names. Pass 2 found the PR description already within the target length and found no stale #85242 citation anywhere in this diff or description. The Fixed Issues link (Expensify/Expensify#663126) resolves and matches the claimed defect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
After onboarding with "Track expenses for my business", some users landed on the empty Inbox instead of Home. The guard at the onboarding call sites used
isReportTopmostSplitNavigator(), which only checks whether the Reports tab is topmost, not whether it actually shows a report. When a fresh onboarding user's base tab happened to be the empty Inbox, the guard treated that as a report worth preserving, skippedNavigation.navigate(ROUTES.HOME), and left the user stranded on Inbox. The outcome was intermittent because it depended on which tab was the base of the tab navigator when onboarding started.This PR adds
isReportRevealedInTopmostSplitNavigator()insrc/libs/Navigation/helpers/, which also requires aSCREENS.REPORTroute in the split's inner routes before treating it as revealed. It replaces the guard at both call sites inRHPVariantTest/index.tsand at the fallback gate innavigateAfterOnboarding.ts.isReportTopmostSplitNavigatoris left untouched, since the IOU flows andSignInModalstill call it directly for unrelated checks.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/663126
PROPOSAL: https://github.com/Expensify/Expensify/issues/663126#issuecomment-5074382682
Tests
New automated regression tests cover the same two scenarios:
tests/unit/components/SidePanel/RHPVariantTest.test.tsandtests/unit/navigateAfterOnboardingTest.tseach gained a case asserting that an onboarding user whose Reports tab shows only the empty Inbox sidebar still lands on Home, alongside the existing cases that a genuinely revealed report is preserved.Offline tests
N/A. This change only affects which route onboarding navigates to, and it reads navigation state that is already local.
QA Steps
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari