You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deeplink - Finish onboarding flow, app not respond when tap back button of Concierge chat #90303
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
After completing onboarding via a deep link to /concierge, the navigation stack has no home/LHN screen underneath the Concierge report, so the back button has nowhere to go.
Here's what happens step by step:
App is force-closed, then opened via deep link staging.new.expensify.com/concierge
User is unauthenticated → signs up → onboarding begins via startOnboardingFlow, which calls resetRoot() appending the OnboardingModalNavigator on top of existing routes
getReportIDAfterOnboarding on small screens explicitly excludes Concierge chat and self-DM (line 51). For a fresh signup with no other reports, it returns undefined → no navigation happens
The deferred deep link handler in Link.ts eventually fires and navigates to /concierge → ConciergePage calls navigateToConciergeChat with shouldDismissModal=true → this uses dismissModalWithReport which pops the CONCIERGE screen (it's in MODAL_ROUTES_TO_DISMISS) and navigates to the report
Final state: ReportsSplitNavigator with only the Concierge report screen — no sidebar/home entry in the stack on narrow screens
Back button calls goBack() → canGoBack() returns false → back press is silently ignored
The core problem is that neither navigateAfterOnboarding nor the deferred deep link handler ensures the home/LHN screen exists in the navigation stack before navigating to the Concierge report on small screens.
What changes do you think we should make in order to solve the problem?
In navigateAfterOnboarding, when getReportIDAfterOnboarding returns undefined on small screens, the function should navigate to the home/inbox route (e.g., ROUTES.INBOX) as a fallback instead of doing nothing. This ensures the navigation stack always has a proper base after onboarding completes, regardless of whether a deep link is pending.
Alternatively (or additionally), the post-onboarding flow could use Navigation.resetToHome() before navigating to the target report, ensuring the home screen is always the base of the stack on small screens.
What alternative solutions did you explore? (Optional)
Modifying the deferred deep link handler in Link.ts to ensure home is in the stack before navigating to Concierge — this would fix the deep link case but not other post-onboarding navigation edge cases where no report is found.
Changing ConciergePage to not use shouldDismissModal=true — this would leave the CONCIERGE screen in the stack but wouldn't properly solve the back navigation issue since CONCIERGE itself is a redirect screen, not a destination.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Classification: Frontend bug Causing PR: #86390 - "Preserve deep-linked report route during onboarding guard redirect" by @bernhardoj (High confidence) Related Issues: #85242, #86258
Recommendation: REVERT
PR #86390 removes the Navigation.navigate(ROUTES.HOME) fallback from navigateAfterOnboarding.ts and SignInModal.tsx, which leaves the navigation stack with no HOME entry to go back to after onboarding completes on mobile.
Assigned: @bernhardoj (PR contributor), @FitseTLT, @Valforte, @marcochavezf (approving reviewers) from PR #86390 Labels: No label changes made — DeployBlockerCash is correctly applied (App repo fix required)
Detailed Analysis
Evidence
The exact navigation flow that produces the bug:
User force-closes the app, then taps https://staging.new.expensify.com/concierge
App starts fresh with SCREENS.CONCIERGE as the initial route in the navigation stack
OnboardingGuard fires a REDIRECT to onboarding/purpose → handleNavigationGuards is called
isModalRedirect = true (target is ONBOARDING_MODAL_NAVIGATOR)
SCREENS.CONCIERGE is NOT in FULL_SCREENS_SET (that set contains the values from SIDEBAR_TO_SPLIT, SEARCH_FULLSCREEN_NAVIGATOR, TAB_NAVIGATOR, HOME, and WORKSPACE_NAVIGATOR)
So existingFullScreenRoute is undefined
resetRoutes falls back to the full redirect state: [HOME, OnboardingModalNavigator]
User signs up, completes onboarding → navigateAfterOnboardingWithMicrotaskQueue is called
Navigation.dismissModal() pops OnboardingModalNavigator → state is [HOME]
For mobile with TRACK_EXPENSES_WITH_CONCIERGE variant (the default for new sign-ups on mobile): Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID)) is called
This navigate call replaces HOME in the stack (does not push) → state is [REPORTS_SPLIT_NAVIGATOR(concierge)]
User is in the Concierge chat with no prior entries in the navigation history → canGoBack() returns false → back button has no effect
Why force-close matters: When the app is NOT force-closed (just logged out), there are previous navigation entries that survive in the stack, so canGoBack() returns true and the back button works. Only with a completely fresh start via the deep link does the problem manifest.
if(reportID){Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(reportID));}else{// Navigate to home to trigger guard evaluationNavigation.navigate(ROUTES.HOME);}
After PR #86390, the else branch was removed entirely. For the TRACK variant on mobile, navigateAfterOnboarding takes the early return path (Navigation.navigate(conciergeReportID)), so the removed else branch is not the issue for this specific path — but the Navigation.navigate(ROUTES.HOME) removal from SignInModal.tsx is relevant for other paths.
The deeper issue: after Navigation.dismissModal() removes OnboardingModalNavigator, state is [HOME]. Then Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID)) replaces HOME with REPORTS_SPLIT_NAVIGATOR(concierge) at the same stack level, leaving a stack of depth 1 with no route to go back to.
Why this was not caught when PR #85556 (the original version of this PR) was merged in March: The revert of PR #85556 (via PR #86307) was for a different reason (double Expensify logos on the work email modal). The back button issue on Concierge after a forced deep-link onboarding may have existed in that original version too, but was not surfaced before the revert for different reasons.
Secondary contributing factor: PR #88796 added TRACK_PERSONAL as a new onboarding choice that also routes to TRACK_EXPENSES_WITH_CONCIERGE on mobile, expanding the set of users who hit this navigation path. However, the existing TRACK_WORKSPACE/TRACK_BUSINESS choice already hit this same path, so PR #86390 is the primary cause.
SIDEBAR_TO_SPLIT maps to REPORTS_SPLIT_NAVIGATOR, SETTINGS_SPLIT_NAVIGATOR, etc. — not SCREENS.CONCIERGE. This means the "preserve existing fullscreen route" branch in handleNavigationGuards does NOT fire for the /concierge deep link, and the issue is NOT that an incorrect route is preserved.
The navigate call replaces HOME:Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID)) navigates to a fullscreen route (REPORTS_SPLIT_NAVIGATOR) from within another fullscreen route (HOME). In linkTo, navigating between fullscreen routes uses NAVIGATE (replace) rather than PUSH, resulting in a single-entry stack with no way to go back.
Root Cause
PR #86390 removed the else { Navigation.navigate(ROUTES.HOME); } fallback from navigateAfterOnboarding.ts and removed Navigation.navigate(ROUTES.HOME) from SignInModal.tsx. While the stated intent was to fix the navigation state after a deep-linked sign-up flow, a side effect is that on mobile when a new user enters via the /concierge deep link, signs up, and completes onboarding with the TRACK_EXPENSES_WITH_CONCIERGE variant, navigateAfterOnboarding calls Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID)) which replaces the HOME route (the only entry in the stack at that point). The resulting stack has depth 1, so canGoBack() is false and the back button has no effect.
@bernhardoj If I'm remembering correctly this fix was already reverted. In the interest of getting this feature ready, do you believe there is a quick fix for this blocker you can do here?
Activity
melvin-bot commentedon May 12, 2026
Triggered auto assignment to @nkuoch (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 12, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon May 12, 2026
Proposal
What is the root cause of that problem?
After completing onboarding via a deep link to
/concierge, the navigation stack has no home/LHN screen underneath the Concierge report, so the back button has nowhere to go.Here's what happens step by step:
staging.new.expensify.com/conciergestartOnboardingFlow, which callsresetRoot()appending theOnboardingModalNavigatoron top of existing routesnavigateAfterOnboardingWithMicrotaskQueuecallsdismissModal()(pops the onboarding navigator) then callsnavigateAfterOnboarding()getReportIDAfterOnboardingon small screens explicitly excludes Concierge chat and self-DM (line 51). For a fresh signup with no other reports, it returnsundefined→ no navigation happensLink.tseventually fires and navigates to/concierge→ConciergePagecallsnavigateToConciergeChatwithshouldDismissModal=true→ this usesdismissModalWithReportwhich pops theCONCIERGEscreen (it's inMODAL_ROUTES_TO_DISMISS) and navigates to the reportReportsSplitNavigatorwith only the Concierge report screen — no sidebar/home entry in the stack on narrow screensgoBack()→canGoBack()returnsfalse→ back press is silently ignoredThe core problem is that neither
navigateAfterOnboardingnor the deferred deep link handler ensures the home/LHN screen exists in the navigation stack before navigating to the Concierge report on small screens.What changes do you think we should make in order to solve the problem?
In
navigateAfterOnboarding, whengetReportIDAfterOnboardingreturnsundefinedon small screens, the function should navigate to the home/inbox route (e.g.,ROUTES.INBOX) as a fallback instead of doing nothing. This ensures the navigation stack always has a proper base after onboarding completes, regardless of whether a deep link is pending.Alternatively (or additionally), the post-onboarding flow could use
Navigation.resetToHome()before navigating to the target report, ensuring the home screen is always the base of the stack on small screens.What alternative solutions did you explore? (Optional)
Link.tsto ensure home is in the stack before navigating to Concierge — this would fix the deep link case but not other post-onboarding navigation edge cases where no report is found.ConciergePageto not useshouldDismissModal=true— this would leave the CONCIERGE screen in the stack but wouldn't properly solve the back navigation issue since CONCIERGE itself is a redirect screen, not a destination.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.OSBotify commentedon May 12, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #86390 - "Preserve deep-linked report route during onboarding guard redirect" by @bernhardoj (High confidence)
Related Issues: #85242, #86258
Recommendation: REVERT
PR #86390 removes the
Navigation.navigate(ROUTES.HOME)fallback fromnavigateAfterOnboarding.tsandSignInModal.tsx, which leaves the navigation stack with noHOMEentry to go back to after onboarding completes on mobile.Assigned: @bernhardoj (PR contributor), @FitseTLT, @Valforte, @marcochavezf (approving reviewers) from PR #86390
Labels: No label changes made —
DeployBlockerCashis correctly applied (App repo fix required)Detailed Analysis
Evidence
The exact navigation flow that produces the bug:
https://staging.new.expensify.com/conciergeSCREENS.CONCIERGEas the initial route in the navigation stackOnboardingGuardfires a REDIRECT toonboarding/purpose→handleNavigationGuardsis calledisModalRedirect= true (target isONBOARDING_MODAL_NAVIGATOR)existingFullScreenRoute = state.routes.findLast(route => isFullScreenName(route.name))SCREENS.CONCIERGEis NOT inFULL_SCREENS_SET(that set contains the values fromSIDEBAR_TO_SPLIT,SEARCH_FULLSCREEN_NAVIGATOR,TAB_NAVIGATOR,HOME, andWORKSPACE_NAVIGATOR)existingFullScreenRouteisundefinedresetRoutesfalls back to the full redirect state:[HOME, OnboardingModalNavigator]navigateAfterOnboardingWithMicrotaskQueueis calledNavigation.dismissModal()popsOnboardingModalNavigator→ state is[HOME]TRACK_EXPENSES_WITH_CONCIERGEvariant (the default for new sign-ups on mobile):Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID))is callednavigatecall replacesHOMEin the stack (does not push) → state is[REPORTS_SPLIT_NAVIGATOR(concierge)]canGoBack()returns false → back button has no effectWhy force-close matters: When the app is NOT force-closed (just logged out), there are previous navigation entries that survive in the stack, so
canGoBack()returns true and the back button works. Only with a completely fresh start via the deep link does the problem manifest.What PR #86390 changed:
In
navigateAfterOnboarding.ts, before PR #86390:After PR #86390, the
elsebranch was removed entirely. For the TRACK variant on mobile,navigateAfterOnboardingtakes the early return path (Navigation.navigate(conciergeReportID)), so the removedelsebranch is not the issue for this specific path — but theNavigation.navigate(ROUTES.HOME)removal fromSignInModal.tsxis relevant for other paths.The deeper issue: after
Navigation.dismissModal()removesOnboardingModalNavigator, state is[HOME]. ThenNavigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID))replaces HOME withREPORTS_SPLIT_NAVIGATOR(concierge)at the same stack level, leaving a stack of depth 1 with no route to go back to.Why this was not caught when PR #85556 (the original version of this PR) was merged in March: The revert of PR #85556 (via PR #86307) was for a different reason (double Expensify logos on the work email modal). The back button issue on Concierge after a forced deep-link onboarding may have existed in that original version too, but was not surfaced before the revert for different reasons.
Secondary contributing factor: PR #88796 added
TRACK_PERSONALas a new onboarding choice that also routes toTRACK_EXPENSES_WITH_CONCIERGEon mobile, expanding the set of users who hit this navigation path. However, the existingTRACK_WORKSPACE/TRACK_BUSINESSchoice already hit this same path, so PR #86390 is the primary cause.Verification
Affected files:
src/libs/navigateAfterOnboarding.ts— modified by PR Preserve deep-linked report route during onboarding guard redirect #86390 (removedelse { Navigation.navigate(ROUTES.HOME); })src/pages/signin/SignInModal.tsx— modified by PR Preserve deep-linked report route during onboarding guard redirect #86390 (removedNavigation.navigate(ROUTES.HOME)after dismissal)src/libs/Navigation/AppNavigator/createRootStackNavigator/RootStackRouter.ts— modified by PR Preserve deep-linked report route during onboarding guard redirect #86390 (thehandleNavigationGuardslogic for modal redirect and fullscreen route preservation)PR #86390 modifies all three of these files, which are central to the navigation stack management during and after the onboarding flow.
Confirmation that
SCREENS.CONCIERGEis not a fullscreen name:FULL_SCREENS_SETinsrc/libs/Navigation/helpers/isNavigatorName.tsis defined as:SIDEBAR_TO_SPLITmaps toREPORTS_SPLIT_NAVIGATOR,SETTINGS_SPLIT_NAVIGATOR, etc. — notSCREENS.CONCIERGE. This means the "preserve existing fullscreen route" branch inhandleNavigationGuardsdoes NOT fire for the/conciergedeep link, and the issue is NOT that an incorrect route is preserved.The
navigatecall replaces HOME:Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID))navigates to a fullscreen route (REPORTS_SPLIT_NAVIGATOR) from within another fullscreen route (HOME). InlinkTo, navigating between fullscreen routes uses NAVIGATE (replace) rather than PUSH, resulting in a single-entry stack with no way to go back.Root Cause
PR #86390 removed the
else { Navigation.navigate(ROUTES.HOME); }fallback fromnavigateAfterOnboarding.tsand removedNavigation.navigate(ROUTES.HOME)fromSignInModal.tsx. While the stated intent was to fix the navigation state after a deep-linked sign-up flow, a side effect is that on mobile when a new user enters via the/conciergedeep link, signs up, and completes onboarding with theTRACK_EXPENSES_WITH_CONCIERGEvariant,navigateAfterOnboardingcallsNavigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeReportID))which replaces theHOMEroute (the only entry in the stack at that point). The resulting stack has depth 1, socanGoBack()is false and the back button has no effect.Valforte commentedon May 12, 2026
@bernhardoj If I'm remembering correctly this fix was already reverted. In the interest of getting this feature ready, do you believe there is a quick fix for this blocker you can do here?
Beamanator commentedon May 12, 2026
@bernhardoj @FitseTLT @Valforte any updates here? 🙏
Beamanator commentedon May 12, 2026
looking into revert...
Beamanator commentedon May 13, 2026
Works well after the revert 👍