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 2025-08-26] [Multi-Files Drag-and-Drop] Scan - Scan flow reopens after changing To field to self DM and adding another receipt #65849
Version Number: v9.1.79-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#65678 Email or phone of affected tester (no customers):applausetester+daveec13@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 14.5/ Chrome App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Have a workspace (make sure it is the default workspace).
Go to staging.expensify.com
Open FAB > Create expense > Scan.
Upload a receipt.
On confirmation page, click on the To field (workspace chat).
Select Self DM
Click RHP back button.
Upload another receipt.
Expected Result:
Redirected to the confirmation step
Actual Result:
The first step of scan flow reopens, Not redirected to the confirmation step
Please re-state the problem that we are trying to solve in this issue.
The scan flow reopens after changing the "To" field to self DM and adding another receipt, instead of redirecting to the confirmation step as expected. Additionally, I also identified issue where repeatedly selecting recipients creates nested URL parameters, causing the backTo parameter to be encoded multiple times like backTo=%2Fcreate%2Fcreate%2Fparticipants%2F1%2F6535657166461123%3FbackTo%3D%252Fcreate%252Fsubmit%252Fconfirmation%252F1%252F6535657166461123.
What is the root cause of that problem?
The root cause is in the navigation logic in IOURequestStepParticipants.tsx. When participants are selected, the code checks if a backTo parameter exists and attempts to navigate back to the previous screen using Navigation.goBack(). However, this approach fails when the flow expects to proceed forward to the confirmation step. The navigation logic incorrectly assumes that having a backTo parameter means we should always go back, but in the scan flow after selecting participants, we should move forward to confirmation regardless of the backTo parameter.
What changes do you think we should make in order to solve the problem?
We should update the navigation logic in IOURequestStepParticipants.tsx to always navigate forward to the next step instead of conditionally going back based on the backTo parameter. The fix involves:
Removing the conditional logic that checks for backTo parameter in both navigateToNextStep and navigateToConfirmationStep functions
Always using Navigation.navigate() instead of Navigation.goBack() to ensure forward progression in the flow
Using Navigation.getActiveRouteWithoutParams() instead of Navigation.getActiveRoute() to avoid accumulating URL parameters
// Before: conditional navigation based on backToif(backTo){Navigation.goBack(route,{compareParams: false});}else{Navigation.navigate(route);}// After: always navigate forwardNavigation.navigate(route);
This ensures the scan flow always progresses forward to the confirmation step as expected, regardless of how the user arrived at the participants screen.
Before fix
failed.scan.nav.mp4
After fix
fixed.scan.nav.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should test the scan flow navigation from participants selection to confirmation step, ensuring that after selecting a recipient (both workspace and self DM), the user is always taken to the confirmation page. Additionally, test that URL parameters don't accumulate when navigating back and forth between participant selection and confirmation screens.
What alternative solutions did you explore? (Optional)
Ah, I see there’s already an open PR for this issue. The PR’s solution is much more complex than the one I found. It only takes a few lines of code to fix this one.
changed the title [-] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/-][+][Due for payment 2025-08-26] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/+]on Aug 19, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.96-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@shubham1206agra@stephanieelliott 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 2025-08-26] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/-][+][Due for payment 2025-08-26] [Multi-Files Drag-and-Drop] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/+]on Jan 15, 2026
Activity
melvin-bot commentedon Jul 10, 2025
Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.koko57 commentedon Jul 10, 2025
ok, please assign me I will check it @mountiny @lakchote
MobileMage commentedon Jul 10, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The scan flow reopens after changing the "To" field to self DM and adding another receipt, instead of redirecting to the confirmation step as expected. Additionally, I also identified issue where repeatedly selecting recipients creates nested URL parameters, causing the
backToparameter to be encoded multiple times likebackTo=%2Fcreate%2Fcreate%2Fparticipants%2F1%2F6535657166461123%3FbackTo%3D%252Fcreate%252Fsubmit%252Fconfirmation%252F1%252F6535657166461123.What is the root cause of that problem?
The root cause is in the navigation logic in
IOURequestStepParticipants.tsx. When participants are selected, the code checks if abackToparameter exists and attempts to navigate back to the previous screen usingNavigation.goBack(). However, this approach fails when the flow expects to proceed forward to the confirmation step. The navigation logic incorrectly assumes that having abackToparameter means we should always go back, but in the scan flow after selecting participants, we should move forward to confirmation regardless of thebackToparameter.What changes do you think we should make in order to solve the problem?
We should update the navigation logic in
IOURequestStepParticipants.tsxto always navigate forward to the next step instead of conditionally going back based on thebackToparameter. The fix involves:backToparameter in bothnavigateToNextStepandnavigateToConfirmationStepfunctionsNavigation.navigate()instead ofNavigation.goBack()to ensure forward progression in the flowNavigation.getActiveRouteWithoutParams()instead ofNavigation.getActiveRoute()to avoid accumulating URL parametersThis ensures the scan flow always progresses forward to the confirmation step as expected, regardless of how the user arrived at the participants screen.
Before fix
failed.scan.nav.mp4
After fix
fixed.scan.nav.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should test the scan flow navigation from participants selection to confirmation step, ensuring that after selecting a recipient (both workspace and self DM), the user is always taken to the confirmation page. Additionally, test that URL parameters don't accumulate when navigating back and forth between participant selection and confirmation screens.
What alternative solutions did you explore? (Optional)
N/A
dmkt9 commentedon Jul 11, 2025
I found the root cause for this issue. Can I create a proposal here?
dmkt9 commentedon Jul 11, 2025
Ah, I see there’s already an open PR for this issue. The PR’s solution is much more complex than the one I found. It only takes a few lines of code to fix this one.
57 remaining items
[-] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/-][+][Due for payment 2025-08-26] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/+]melvin-bot commentedon Aug 19, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 19, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.96-2 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 2025-08-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 19, 2025
@shubham1206agra @stephanieelliott 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]
melvin-bot commentedon Aug 26, 2025
Payment Summary
Upwork Job
BugZero Checklist (@stephanieelliott)
stephanieelliott commentedon Aug 27, 2025
Payment Summary
Contributor: @dmkt9 due $250 via Upwork
Contributor+: @shubham1206agra due $250 via NewDot
dmkt9 commentedon Aug 27, 2025
@stephanieelliott Thanks. I just requested payment on Upwork.
stephanieelliott commentedon Aug 27, 2025
All paid! Thanks
trjExpensify commentedon Sep 1, 2025
$250 approved for @shubham1206agra
[-][Due for payment 2025-08-26] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/-][+][Due for payment 2025-08-26] [Multi-Files Drag-and-Drop] Scan - Scan flow reopens after changing To field to self DM and adding another receipt[/+]