Skip to content

Expensify Card - Issue card RHP opens after clicking Got it on Bank account verified RHP #89117

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.64-9
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85234
Email or phone of affected tester (no customers): applausetester+khcategory20@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a USD workspace.
  3. Go to workspace settings > More features.
  4. Enable Expensify Card.
  5. Go to Expensify Card.
  6. Click Issue new card > Issue new card > Log into your bank.
  7. Add a bank account.
  8. Click Issue new card > select bank account.
  9. Click Got it.

Expected Result:

Issue card RHP will not open after clicking Got it.

Actual Result:

Issue card RHP opens after clicking Got it on Bank account verified RHP.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7140296_1777390488488.12.mp4

View all open jobs on GitHub

Activity

  1. melvin-bot commented on Apr 28, 2026

    @melvin-bot

    @mountiny recently merged #85234, but they are OOO right now, so I'll auto-assign someone else.

  2. melvin-bot commented on Apr 28, 2026

    @melvin-bot

    Triggered auto assignment to @mjasikowski (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Apr 28, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on Apr 28, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #85234 - "Add TabNavigator" by @WojtekBoman (High confidence)
    Related Issues: None identified

    Recommendation: REVERT

    PR #85234 introduced a new TabNavigator (a proper createBottomTabNavigator) that wraps all full-screen navigators. This restructured the root navigation stack from individual screen entries to a single TAB_NAVIGATOR entry. The handleVerifiedButtonPress handler in WorkspaceExpensifyCardBankAccounts.tsx calls Navigation.dismissModal() followed immediately by Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID)). Under the new navigation architecture, this pattern causes the Issue New Card RHP to re-open after dismissal instead of the modal closing cleanly.

    Assigned: @WojtekBoman (PR author), @ZhenjaHorbach and @mountiny (approving reviewers)
    Labels: DeployBlockerCash kept (frontend App PR caused the issue). DeployBlocker not present.

    📋 Detailed Analysis

    Evidence

    Verification

    • Affected file: src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx
    • PR Introduce a Bottom Tab Navigator for Top-Level Navigation #85234 restructured the navigation architecture that underlies how dismissModal() + navigate() interact. Many callsites were updated in the PR to use dismissModal({afterTransition: () => navigate(route)}) instead of sequential calls, but handleVerifiedButtonPress was not updated.
    • The WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW route is an RHP screen (confirmed via src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts). Navigating to it after a dismissModal() under the new TabNavigator structure re-opens the Issue New Card RHP instead of navigating away.

    Root Cause

    handleVerifiedButtonPress calls Navigation.dismissModal() (which is asynchronous — it queues a DISMISS_MODAL action via TransitionTracker) and then immediately calls Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW...). Under the old navigation structure, this had a different effect. Under PR #85234's new TabNavigator structure, the synchronous navigate() call to an RHP route runs before the dismiss transition completes, resulting in the Issue New Card RHP being pushed back onto the stack. PR #85234 updated many similar patterns to use dismissModal({afterTransition: () => navigate(route)}) but missed this one.

  6. self-assigned this
    on Apr 28, 2026
  7. mjasikowski commented on Apr 29, 2026

    @mjasikowski
    Contributor

    @MelvinBot propose a fix for this issue.

  8. MelvinBot commented on Apr 29, 2026

    @MelvinBot
    Contributor

    Proposal

    Problem: After clicking "Got it" on the Bank account verified RHP, the Issue New Card RHP immediately re-opens.

    Root Cause: handleVerifiedButtonPress calls Navigation.dismissModal() and then immediately calls Navigation.navigate(). After #85234 introduced TabNavigator, the navigate() executes before the dismiss transition completes, pushing the Issue New Card RHP back onto the stack. Many similar callsites were updated in that PR to use the afterTransition callback, but this one was missed.

    Fix: Wrap the Navigation.navigate() call inside dismissModal's afterTransition callback, matching the pattern used elsewhere in the codebase:

     const handleVerifiedButtonPress = () => {
         if (!policyID) {
             return;
         }
         setIssueNewCardStepAndData({policyID, isChangeAssigneeDisabled: false});
    -    Navigation.dismissModal();
    -    Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID));
    +    Navigation.dismissModal({
    +        afterTransition: () => Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID)),
    +    });
     };

    What changes: WorkspaceExpensifyCardBankAccounts.tsx:121-122 — replace the two sequential calls with a single dismissModal({afterTransition}) call.


    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.

  9. mjasikowski commented on Apr 29, 2026

    @mjasikowski
    Contributor

    @MelvinBot implement this

  10. WojtekBoman commented on Apr 29, 2026

    @WojtekBoman
    Contributor

    @mjasikowski I would wait with the melvin implementation :) I checked it and it won't fix the issue. According to the issue description, we shouldn't call navigate after closing the modal

    @lanitochka17 Could you check if it works fine on prod? I see in code that it's expected to open the Issue Card RHP in that case, so I'd like to confirm we should adjust it

  11. MelvinBot commented on Apr 29, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #89151
    Please mark it as "Ready for review" when it is ready for review.

  12. mjasikowski commented on Apr 29, 2026

    @mjasikowski
    Contributor

    @WojtekBoman no worries, this was more to have a draft PR to create an ad hoc build

  13. luacmartins commented on Apr 29, 2026

    @luacmartins
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions