Skip to content

[Due for payment 2026-03-16] [$250] Add BA - Browser back button is redirecting to confirmation page from success page #83978

Closed

Description

@mitarachim

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.28-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: #81333
Email or phone of affected tester (no customers): rogerjesusrosarioh+577@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Web
App Component: User Settings

Action Performed:

  1. Go to Account > Wallet > Add bank account
  2. Complete the flow and reach the confirmation page
  3. Accept the terms and click on "Confirm"
  4. In the success page, click on the browsers back button

Expected Result:

Page should close the success RHP and open the "Add bank account" RHP.

Actual Result:

When clicking on the browsers back button in the success page, it is redirecting back to the confirmation page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7092397_1772506915518.ExpensifyWrongRedirection.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @arosiclair
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022028671427965931540
  • Upwork Job ID: 2028671427965931540
  • Last Price Increase: 2026-03-03

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Mar 3, 2026
  2. melvin-bot commented on Mar 3, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #81333

  3. melvin-bot commented on Mar 3, 2026

    @melvin-bot

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

  4. melvin-bot commented on Mar 3, 2026

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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.

  5. github-actions commented on Mar 3, 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.
  6. OSBotify commented on Mar 3, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #81333 - "Refactor add personal bank account to use useSubPage" by @bernhardoj (High confidence)
    Related Issues: None

    Recommendation: REVERT

    The PR refactored the add bank account flow from a single-page modal to a multi-page flow with URL-based navigation (using useSubPage hook). This introduced browser history entries for each sub-page, causing the browser back button to navigate through the history stack instead of closing the modal.

    Labels: Keeping DeployBlockerCash (App PR caused the issue); Removing DeployBlocker (not a backend issue)

    📋 Detailed Analysis

    Evidence

    Verification

    PR #81333 modified the following key files that relate to the bug:

    • src/ROUTES.ts - Changed route from settings/wallet/add-bank-account to settings/wallet/add-bank-account/:subPage?/:action?
    • src/pages/settings/Wallet/InternationalDepositAccount/InternationalDepositAccountContent.tsx - Refactored from useSubStep to useSubPage hook
    • All sub-pages (CountrySelection, BankAccountDetails, AccountType, BankInformation, AccountHolderInformation, Confirmation, Success) were updated

    Root Cause

    The refactor introduced URL-based navigation for the bank account flow. Each step now has its own URL:

    • settings/wallet/add-bank-account/country
    • settings/wallet/add-bank-account/account-details
    • settings/wallet/add-bank-account/confirm
    • settings/wallet/add-bank-account/success

    When users complete the flow and reach the success page, their browser history contains all these URLs. Clicking the browser back button navigates to the previous URL (/confirm) instead of closing the modal entirely.

    The app has a handleBackButtonPress function that correctly handles the Android back button and header back button to dismiss the modal on the success page, but this handler does not intercept the browser back button, which operates directly on the browser history stack.

    Technical Details:
    In InternationalDepositAccountContent.tsx, lines 219-226 (after changes):

    // Clicking back on the success screen should dismiss the modal
    if (pageIndex === CONST.CORPAY_FIELDS.INDEXES.MAPPING.SUCCESS) {
        clearDraftValues(ONYXKEYS.FORMS.INTERNATIONAL_BANK_ACCOUNT_FORM);
        goBack();
        return true;
    }

    This code handles Android/header back buttons but not browser navigation events.

  7. 28 remaining items

  8. bernhardoj commented on Mar 5, 2026

    @bernhardoj
    Contributor

    Sure, here is the PR: #84236

  9. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 9, 2026
  10. changed the title [-][$250] Add BA - Browser back button is redirecting to confirmation page from success page[/-] [+][Due for payment 2026-03-16] [$250] Add BA - Browser back button is redirecting to confirmation page from success page[/+] on Mar 9, 2026
  11. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.33-5 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-03-16. 🎊

  13. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    @arosiclair 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]

  14. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (Awaiting Payment)

  15. bernhardoj commented on Mar 10, 2026

    @bernhardoj
    Contributor

    No need for a payment here

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions