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
[Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button #90056
Version Number: 9.3.69-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#89858 Email or phone of affected tester (no customers):josdjnosdjionjsdonjisod@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to self DM.
Create a map distance expense.
Open the expense.
Click Distance.
Go to Manual tab (or Distance tab if currently on Manual tab).
👋 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.
Classification: Frontend bug Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence) Related Issues: #83781
Recommendation: REVERT
PR #89858 introduced an OnyxTabNavigator wrapping the distance editing screen. The OnyxTabNavigator uses backBehavior="initialRoute", which causes React Navigation's material top tab navigator to intercept the back button press and navigate to the initial tab (Distance Map) rather than propagating the back event up to close the RHP. Reverting this PR would immediately restore the previous back navigation behavior.
Note: The PR author explicitly requested it not be reverted in the PR body and mentioned a follow-up fix PR (#89976) that could hide the manual tab temporarily. If reverting is genuinely not feasible, cherry-picking #89976 to staging may be an acceptable alternative, but a clean revert is the safest path.
Assigned: @mukhrr (PR author), @aimane-chnaif (approving reviewer), @youssef-lr (approving reviewer) Labels: Keeping DeployBlockerCash (frontend App PR is the cause). No label changes needed beyond removing Engineering if applicable.
Detailed Analysis
Evidence
The bug is staging-only (not reproducible in production), which matches it being introduced by a recently merged PR.
The PR description says "Go to Manual tab (or Distance tab if currently on Manual tab). Click RHP back button. Expected: RHP will close. Actual: RHP returns to previous tab instead of closing." — this exactly matches the bug report.
Verification
The affected feature is the distance expense editing flow, specifically in src/pages/iou/request/step/IOURequestStepDistance.tsx.
PR fixed manual distance tab blockers #89858 introduces OnyxTabNavigator wrapping for the distance editing screen when isEditing is true, with backBehavior="initialRoute" set in OnyxTabNavigator.tsx (line 181).
Root Cause
OnyxTabNavigator uses createMaterialTopTabNavigator with backBehavior="initialRoute". When the user is on the "Manual" tab and presses the back button, the React Navigation tab navigator intercepts the hardware/gesture back event and navigates to the initial tab (Distance Map tab) instead of propagating the back event to the parent StepScreenWrapper which would close the RHP. This is a navigation event bubbling issue introduced by wrapping the distance editing screen in a tab navigator that has its own back behavior.
The OnyxTabNavigator is configured with backBehavior="initialRoute", which tells the material top tab navigator to handle GO_BACK actions by switching to the initial tab before bubbling up to the parent navigator.
When the user opens the distance edit screen from a report in the central pane (not the RHP), getReportRHPActiveRoute() returns an empty string, so backTo is undefined. When the header back button calls Navigation.goBack(undefined), the fallback path dispatches a generic goBack() on the navigation ref. The tab navigator intercepts this and switches back to the Map tab (the initial route) instead of closing the RHP. The user must press back twice — once to reset to the initial tab, once to actually close.
What changes do you think we should make in order to solve the problem?
In navigateBack, when backTo is falsy, use Navigation.closeRHPFlow() (or Navigation.dismissModal()) instead of Navigation.goBack() so the back button always tears down the RHP screen rather than dispatching a generic GO_BACK that the tab navigator intercepts. This is consistent with how other edit-step screens handle the "no backTo" case.
What alternative solutions did you explore? (Optional)
Changing backBehavior from "initialRoute" to "none" on the OnyxTabNavigator would also fix this, but it would change behavior globally for all tab navigators in the app, which could have unintended side effects. The targeted fix in navigateBack is safer and scoped to the distance edit flow.
Investigation details
Data flow:
User views a distance expense report (central pane) → clicks "Distance" → MoneyRequestView navigates to STEP_DISTANCE with backTo=getReportRHPActiveRoute()
getReportRHPActiveRoute() returns '' because the report is in the central pane → backTo is undefined
IOURequestStepDistance renders OnyxTabNavigator with Map and Manual tabs (backBehavior="initialRoute")
User switches to Manual tab → presses header back → navigateBack() → Navigation.goBack(undefined)
goBack dispatches generic GO_BACK → tab navigator intercepts → switches to Map tab instead of closing RHP
Related issue:#90037 (crash on back button in split distance waypoints editor) may share the same navigation root cause.
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.
changed the title [-][$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/-][+][Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/+]on May 11, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.69-18 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
changed the title [-][Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/+]on May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon May 8, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #89858
melvin-bot commentedon May 8, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 8, 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:
OSBotify commentedon May 8, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence)
Related Issues: #83781
Recommendation: REVERT
PR #89858 introduced an
OnyxTabNavigatorwrapping the distance editing screen. TheOnyxTabNavigatorusesbackBehavior="initialRoute", which causes React Navigation's material top tab navigator to intercept the back button press and navigate to the initial tab (Distance Map) rather than propagating the back event up to close the RHP. Reverting this PR would immediately restore the previous back navigation behavior.Note: The PR author explicitly requested it not be reverted in the PR body and mentioned a follow-up fix PR (#89976) that could hide the manual tab temporarily. If reverting is genuinely not feasible, cherry-picking #89976 to staging may be an acceptable alternative, but a clean revert is the safest path.
Assigned: @mukhrr (PR author), @aimane-chnaif (approving reviewer), @youssef-lr (approving reviewer)
Labels: Keeping
DeployBlockerCash(frontend App PR is the cause). No label changes needed beyond removingEngineeringif applicable.Detailed Analysis
Evidence
9.3.69-0.Verification
src/pages/iou/request/step/IOURequestStepDistance.tsx.src/pages/iou/request/step/IOURequestStepDistance.tsx(283 additions, 84 deletions) — confirmed viagh pr view.OnyxTabNavigatorwrapping for the distance editing screen whenisEditingis true, withbackBehavior="initialRoute"set inOnyxTabNavigator.tsx(line 181).Root Cause
OnyxTabNavigatorusescreateMaterialTopTabNavigatorwithbackBehavior="initialRoute". When the user is on the "Manual" tab and presses the back button, the React Navigation tab navigator intercepts the hardware/gesture back event and navigates to the initial tab (Distance Map tab) instead of propagating the back event to the parentStepScreenWrapperwhich would close the RHP. This is a navigation event bubbling issue introduced by wrapping the distance editing screen in a tab navigator that has its own back behavior.MelvinBot commentedon May 8, 2026
Proposal
What is the root cause of that problem?
The
OnyxTabNavigatoris configured withbackBehavior="initialRoute", which tells the material top tab navigator to handleGO_BACKactions by switching to the initial tab before bubbling up to the parent navigator.When the user opens the distance edit screen from a report in the central pane (not the RHP),
getReportRHPActiveRoute()returns an empty string, sobackTois undefined. When the header back button callsNavigation.goBack(undefined), the fallback path dispatches a genericgoBack()on the navigation ref. The tab navigator intercepts this and switches back to the Map tab (the initial route) instead of closing the RHP. The user must press back twice — once to reset to the initial tab, once to actually close.What changes do you think we should make in order to solve the problem?
In
navigateBack, whenbackTois falsy, useNavigation.closeRHPFlow()(orNavigation.dismissModal()) instead ofNavigation.goBack()so the back button always tears down the RHP screen rather than dispatching a genericGO_BACKthat the tab navigator intercepts. This is consistent with how other edit-step screens handle the "no backTo" case.What alternative solutions did you explore? (Optional)
Changing
backBehaviorfrom"initialRoute"to"none"on theOnyxTabNavigatorwould also fix this, but it would change behavior globally for all tab navigators in the app, which could have unintended side effects. The targeted fix innavigateBackis safer and scoped to the distance edit flow.Investigation details
Data flow:
MoneyRequestViewnavigates toSTEP_DISTANCEwithbackTo=getReportRHPActiveRoute()getReportRHPActiveRoute()returns''because the report is in the central pane →backToisundefinedIOURequestStepDistancerendersOnyxTabNavigatorwith Map and Manual tabs (backBehavior="initialRoute")navigateBack()→Navigation.goBack(undefined)goBackdispatches genericGO_BACK→ tab navigator intercepts → switches to Map tab instead of closing RHPRelated issue: #90037 (crash on back button in split distance waypoints editor) may share the same navigation root cause.
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.mukhrr commentedon May 9, 2026
@aimane-chnaif or anyone, can you you reproduce the issue? I cannot :(Oh now I can reproduce it
6 remaining items
melvin-bot commentedon May 11, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
melvin-bot commentedon May 11, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
[-][$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/-][+][Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/+]melvin-bot commentedon May 11, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 11, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.69-18 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-18. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 11, 2026
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
fix: resolve distance edit RHP regressions (#90037, #90056, #90082)
[-][Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - RHP returns to previous tab after changing distance tab and clicking RHP back button[/+]melvin-bot commentedon May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2026
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
lanitochka17 commentedon May 13, 2026
Deploy Blocker ##90558 was identified to be related to the PR ##90131 that attempted to fix this issue.