Expensify Card - Back button on issue card page returns to Bank account verified page
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.56-3 Reproducible in staging?: Y Reproducible in production?: N/A Unable to check If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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): [email protected] Issue reported by: Applause - Internal Team
Action Performed:
- Go to staging.new.expensify.com
- Go to workspace settings > Expensify Card
- Click Issue new card
- Add a bank account
- Dismiss the RHP
- Click Issue new account
- Select the added bank account
- On Bank account verified page, click Got it
- On Issue card page, click RHP back button
Expected Result:
The RHP will be dismissed
Actual Result:
App returns to Bank account verified page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Standalone
- [x] Android: HybridApp
- [x] Android: mWeb Chrome
- [ ] iOS: Standalone
- [x] iOS: HybridApp
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/9b4080e6-1e88-4c74-825a-01b83e605de1
Issue Owner
Current Issue Owner: @situchan
Triggered auto assignment to @thienlnam (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
💬 A slack conversation has been started in #expensify-open-source
:wave: 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.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Back button on issue card page returns to Bank account verified page
What is the root cause of that problem?
When user press Got it we simply navigate to next page rather then dismissing the current modal
https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L154
What changes do you think we should make in order to solve the problem?
We should also dismiss the modal before navigating here. We can do something like this
onPress={() => {
Navigation.dismissModal();
Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID));
}}
It's a similar approach that we also use in other places
What alternative solutions did you explore? (Optional)
We can also use goBack() before navigating to WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW
I'm not sure if this is actually a bug or not - adding external so we can get a BZ assigned to determine whether we should fix this or not
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)
Triggered auto assignment to @OfstadC (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.
Possibly no longer an issue https://expensify.slack.com/archives/C01GTK53T8Q/p1730482621189069
Proposal
Please re-state the problem that we are trying to solve in this issue.
App returns to Bank account verified page
What is the root cause of that problem?
- When users press on "Got it" button, they just navigate to a new screen without removing the current screen from stack: https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L154 so when clicking on back button on issue card page, the bank account verified page appears again.
What changes do you think we should make in order to solve the problem?
- When clicking on "Got it", we should replace the current screen by the issue new card screen. To do it, just need to navigate with type: UP in this:
Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID), CONST.NAVIGATION.TYPE.UP);
What alternative solutions did you explore? (Optional)
@OfstadC, @thienlnam, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
~@daledah's proposal~ @Nodebrute's proposal looks good. There's one more verifying step after https://github.com/Expensify/App/pull/51407 so the repro step should be updated a bit. 🎀👀🎀 C+ reviewed
Current assignee @thienlnam is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@situchan, I'd like to point out that we rarely use CONST.NAVIGATION.TYPE.UP in our codebase—only in two places outside of goBack. For cases like this, we generally use goBack or dismissModal, which is the more common approach throughout our app. Since goBack itself uses CONST.NAVIGATION.TYPE.UP, I don’t believe @daledah's proposal is fundamentally different from mine; it’s just another way to achieve the same result.
https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/Navigation.ts#L245
https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/Navigation.ts#L235
and sometimes CONST.NAVIGATION.TYPE.UP also uses dismissModal under the hood
https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/linkTo/index.ts#L122-L124
cc: @thienlnam
There's one more verifying step after #51407 so the repro step should be updated a bit.
Actually, the user will either see Got it or One more step, as these are different states displayed on the same page.
https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L120 https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L141
@situchan Another very similar flow in our app is the upgrade process, where after pressing Got it to open the NetSuite page, we first dismiss the modal and then navigate to the next page.
https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L52-L53
https://github.com/user-attachments/assets/cb00c3b2-a158-48b2-8d6c-b2aa1a07453e
@Nodebrute sorry I didn't realize that there was a proposal before making External. I reviewed only @daledah's proposal. And yes, your proposal also looks good. Since you're the first, you can be assigned. cc: @thienlnam
@situchan Thank you so much.
Asking to have this retested here Based on this - https://expensify.slack.com/archives/C01GTK53T8Q/p1730487824713359?thread_ts=1730482621.189069&cid=C01GTK53T8Q
As I mentioned previously, my approach is widely used across the app. For example, in this similar case #51883, this pattern was applied. I can provide many more examples if needed.
Regarding transitions, using the UP transition can be misleading for users. It creates the impression that a new screen appears on top of the previous one, but pressing the back button reveals there's no screen underneath, which can feel confusing. So, I don't believe my transition is incorrect.
As I mentioned previously, my approach is widely used across the app. For example, in this similar case https://github.com/Expensify/App/issues/51883#issuecomment-2455613641, this pattern was applied. I can provide many more examples if needed.
To effectively resolve any issue, we should focus on establishing the correct root cause analysis (RCA) and verifying that the solution addresses the current bug, rather than relying solely on whether similar solutions are used elsewhere.
Regarding transitions, using the UP transition can be misleading for users. It creates the impression that a new screen appears on top of the previous one, but pressing the back button reveals there's no screen underneath, which can feel confusing. So, I don't believe my transition is incorrect.
Let’s wait for the internal and C+ review on the correct behavior in this comment.
To solve any issue properly, I think we should not depend on whether the solution is used in other places, but based on the correct RCA and verify whether it fixes the currenct bug.
Yes, I understand this is important, I’ve also verified that there are no regressions😁 As I mentioned here, I don’t believe @daledah's proposal is fundamentally different from mine; it’s simply another approach to achieve the same outcome. The behavior @daledah is mentioning can still be achieved using goBack.
Since the fix pertains to popping of screens in the same
RightModalNavigator, as far as I know bothgoBackandUPwork the same way.As I see
goBackmuch more commonly used in our repo thanUP
Another instance where we encountered a similar issue, C+'s comment here: https://github.com/Expensify/App/issues/44506#issuecomment-2197273835
@situchan's decision:https://github.com/Expensify/App/issues/51883#issuecomment-2455557564
cc: @thienlnam
Agree with @Nodebrute.
We can also use goBack() before navigating to
WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW
The same approach was used in https://github.com/Expensify/App/pull/44712
@daledah yes, I already checked it. You wanna find and fix all instances throughout the app then?
You wanna find and fix all instances throughout the app then?
I am not sure that we can cover all other cases in this issue, just want to proposal the correct approach for this issue, and then improve other places in future.
In my opinion, if we want to follow the approach we've used elsewhere, we can proceed with your selected proposal.
However, if the goal is to resolve the screen transition animation issue (where clicking 'Got it' causes the screen to swipe to the right, giving the appearance of going back), then my proposal could be a better fit.
https://github.com/user-attachments/assets/d5eda1d4-8c62-4016-a305-ac6f9fc50af5
Thanks for your feedback.
Bug is still reproducible
https://github.com/user-attachments/assets/4a6778b9-dcf5-4055-80fd-246f900a76a3
Job added to Upwork: https://www.upwork.com/jobs/~021853850206557900537
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)
Upwork job price has been updated to $125
Adjusting bounty as this is a simple bug