Fix: onboarding Track-business users land on Home instead of Inbox#97009
Fix: onboarding Track-business users land on Home instead of Inbox#97009MelvinBot wants to merge 1 commit into
Conversation
Swap isReportTopmostSplitNavigator() for getCentralPaneReportID() at the onboarding navigation guards so we only preserve the current view when a real report is revealed, not when the empty Inbox tab merely happens to be topmost. Co-authored-by: Marco Chávez <marcochavezf@users.noreply.github.com>
|
No code fix needed — the only failing check is the PR Author Checklist, which is a manual step. The
None of the 38 boxes in the PR Author Checklist section of the description are checked, so this is a human step, not something I can (or should) resolve by pushing code. Every code-relevant check already passes: all 8 NoteThe job also logged |
Explanation of Change
After onboarding with "Track expenses for my business", users sometimes landed on the empty Inbox instead of Home. The onboarding navigation guards used
isReportTopmostSplitNavigator()to decide whether to preserve the user's current view rather than sending them to Home. That helper only checks whether the Reports/Inbox tab is topmost — it does not check whether an actual report is revealed. So for a fresh onboarding user with no deep-linked report, if the empty Inbox tab happened to be the base tab, the guard fired,Navigation.navigate(ROUTES.HOME)was skipped, and the user was stranded on Inbox. It was intermittent because the outcome depended on which tab was the base of the tab navigator when onboarding started.This swaps the guard to
getCentralPaneReportID(), which already encodes exactly the intended condition — the Reports split is the active tab and aSCREENS.REPORTis actually revealed — returningundefinedfor the bare empty-Inbox sidebar. So!!getCentralPaneReportID()genuinely means "a report is revealed", and a fresh onboarding user with no report correctly navigates to Home. The change is applied to both onboarding call sites (thetrackExpensesWithConciergebranch that caused the report, and therhpHomePagebranch that shares the same latent bug), plus the fallback gate innavigateAfterOnboarding. The name-level helperisReportTopmostSplitNavigatoris left untouched for its many other callers (IOU flows,SignInModal, etc.).Changed:
src/components/SidePanel/RHPVariantTest/index.ts—shouldPreserveRevealedReport = !!getCentralPaneReportID()in both variant branches.src/libs/navigateAfterOnboarding.ts— fallback gate now} else if (!getCentralPaneReportID()) {.getCentralPaneReportIDand added regression cases asserting a fresh onboarding user (Inbox topmost, no report revealed) lands on Home.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/663126
PROPOSAL: https://github.com/Expensify/Expensify/issues/663126#issuecomment-5074382682
Tests
// TODO: The human co-author must fill out the manual tests before marking this PR "ready for review".
// Suggested flow: sign in as a new user, start onboarding, select "Track expenses for my business", complete onboarding, and verify you land on Home (not Inbox). Repeat a few times since the original bug was intermittent. Also verify a user who deep-links into a report before onboarding still has that report preserved.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA steps before marking this PR "ready for review".
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