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
[Awaiting checklist] [Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page #63123
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.1.54-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: n/a Email or phone of affected tester (no customers): expensifail account Issue reported by: Applause Internal Team Device used: Mac 15.4.1/Safari and Desktop, iPhone 13 iOS 18.4.1/Safari App Component: Workspace Settings
Navigate to the add bank account modal in Workspace settings
Click/tap on connect online
5.Select Regions bank
6.Enter the test credentials
7.In the success modal click the Back button
Expected Result:
The bank account is displayed in workspace settings as added
Actual Result:
In the bank account success modal, the back button navigates to the default currency page, and after clicking the Back button one more time, the RHP closes. The bank account appears only after refreshing the page.
Please re-state the problem that we are trying to solve in this issue.
In the bank account success modal, the back button navigates to the default currency page, and after clicking the Back button one more time, the RHP closes. The bank account appears only after refreshing the page.
What is the root cause of that problem?
In the success modal, clicking the back button will call Navigation.goBack(), which will take us to the previous page. If we need to select the currency before starting the bank account flow, the navigation stack in RHP at the time we're in the success modal is WorkspaceOverviewCurrencyPage --> ReimbursementAccountPage. That is the reason we go back to the currency page.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
In the bank account success modal, the back button incorrectly navigates to the default currency page instead of showing the bank account in workspace settings. When a user adds a bank account in workspace settings and clicks the back button in the success modal, they are taken to an unrelated screen rather than seeing their newly added bank account.
What is the root cause of that problem?
The root cause is in the exitFlow function in AddPersonalBankAccountPage.tsx. This function handles navigation when exiting the bank account flow, but it doesn't have a specific case for when a bank account is added within a workspace context. The function only checks for an exitReportID or onSuccessFallbackRoute, but doesn't properly handle the case where a policy ID is present but neither of those values are set.
What changes do you think we should make in order to solve the problem?
We should add a specific condition to the exitFlow function to handle workspace bank accounts differently. If the bank account is associated with a policy (has a policyID), we should use Navigation.dismissModal() instead of the generic goBack() function. This will ensure that the user returns directly to the workspace settings where they'll see their newly added bank account.
if (exitReportID) {
Navigation.dismissModalWithReport({reportID: exitReportID});
} else if (shouldContinue && onSuccessFallbackRoute) {
continueSetup(onSuccessFallbackRoute);
} else if (personalBankAccount?.policyID) {
// For workspace bank accounts, go back to the workspace settings
Navigation.dismissModal();
} else {
goBack();
}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should test navigation from the bank account success modal in the workspace context to ensure it correctly returns to the workspace settings page.
What alternative solutions did you explore? (Optional)
@hungvu193 I don't think this is a regression from our work but idea to replace goBack with dismissModal in this particular case seems like the easiest solution. Do you want me to take this over?
changed the title [-]Bank account - In the success modal, the back button navigates to the default currency page[/-][+][$250] Bank account - In the success modal, the back button navigates to the default currency page[/+]on Jun 2, 2025
changed the title [-][Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/-][+][Awaiting checklist] [Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/+]on Jun 25, 2025
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not Required
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
The WS currency is not a supported bank account currency
Test:
Go WS settings > Workflows > Connect bank account > Update currency
Change the currency to USD
Complete bank account flow
In the bank success modal, click on the back button
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon May 30, 2025
Triggered auto assignment to @garrettmknight (
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.mkzie2 commentedon May 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the bank account success modal, the back button navigates to the default currency page, and after clicking the Back button one more time, the RHP closes. The bank account appears only after refreshing the page.
What is the root cause of that problem?
Navigation.goBack(), which will take us to the previous page. If we need to select the currency before starting the bank account flow, the navigation stack in RHP at the time we're in the success modal isWorkspaceOverviewCurrencyPage-->ReimbursementAccountPage. That is the reason we go back to the currency page.App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Line 332 in 733010e
What changes do you think we should make in order to solve the problem?
We should call
Navigation.dismissModalhere instead, which will close all RHP pages.App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Line 332 in 733010e
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
hungvu193 commentedon May 30, 2025
cc @MrMuzyk
MobileMage commentedon May 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the bank account success modal, the back button incorrectly navigates to the default currency page instead of showing the bank account in workspace settings. When a user adds a bank account in workspace settings and clicks the back button in the success modal, they are taken to an unrelated screen rather than seeing their newly added bank account.
What is the root cause of that problem?
The root cause is in the
exitFlowfunction inAddPersonalBankAccountPage.tsx. This function handles navigation when exiting the bank account flow, but it doesn't have a specific case for when a bank account is added within a workspace context. The function only checks for anexitReportIDoronSuccessFallbackRoute, but doesn't properly handle the case where a policy ID is present but neither of those values are set.What changes do you think we should make in order to solve the problem?
We should add a specific condition to the
exitFlowfunction to handle workspace bank accounts differently. If the bank account is associated with a policy (has apolicyID), we should useNavigation.dismissModal()instead of the genericgoBack()function. This will ensure that the user returns directly to the workspace settings where they'll see their newly added bank account.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should test navigation from the bank account success modal in the workspace context to ensure it correctly returns to the workspace settings page.
What alternative solutions did you explore? (Optional)
N/A
MrMuzyk commentedon May 30, 2025
@hungvu193 I don't think this is a regression from our work but idea to replace
goBackwithdismissModalin this particular case seems like the easiest solution. Do you want me to take this over?[-]Bank account - In the success modal, the back button navigates to the default currency page[/-][+][$250] Bank account - In the success modal, the back button navigates to the default currency page[/+]melvin-bot commentedon Jun 2, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021929473706969513897
25 remaining items
garrettmknight commentedon Jun 25, 2025
Payment summary:
[-][Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/-][+][Awaiting checklist] [Due for payment 2025-06-24] [$250] Bank account - In the success modal, the back button navigates to the default currency page[/+]melvin-bot commentedon Jul 1, 2025
@garrettmknight Eep! 4 days overdue now. Issues have feelings too...
shubham1206agra commentedon Jul 1, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/57460/files#r2177864882
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not Required
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
garrettmknight commentedon Jul 2, 2025
Thanks, request when ready!
JmillsExpensify commentedon Jul 21, 2025
Payment summary:
garrettmknight commentedon Jul 22, 2025
$250 approved for @shubham1206agra