Skip to content

Expense - Back button on Merchant page reopens Merchant page #82121

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.17-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #81018
Email or phone of affected tester (no customers): #80480
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Disable Submissions, Approvals and Payments in Workflows settings.
  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Manual.
  3. Click To field.
  4. Select workspace chat.
  5. Enter merchant > Save.
  6. Click To field.
  7. Select self DM.
  8. Click Merchant > clear the merchant > Save.
  9. Click To field.
  10. Select workspace chat.
  11. On Merchant page, click RHP back button.

Expected Result:

App will return to amount input page.

Actual Result:

Back button on Merchant page reopens Merchant page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7074560_1770809313664.8.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Feb 11, 2026
  2. melvin-bot commented on Feb 11, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 11, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 11, 2026

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (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 Feb 11, 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 Feb 11, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #80480 - "Update create transaction Manual flow to ask for merchant after asking for amount v2" by @nkdengineer (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #80480 introduced a navigation bug in the merchant step that causes the back button to navigate to itself instead of returning to the previous screen. This prevents users from completing the expense creation flow.

    Labels: No label changes needed - both DeployBlockerCash and DeployBlocker should remain as this is a frontend bug affecting the App that is reproducible on staging.

    Detailed Analysis

    Evidence

    The issue occurs when users switch between participants (workspace chat -> self DM -> workspace chat) during manual expense creation. The bug manifests at step 11 of the reproduction: when clicking the back button on the Merchant page, it reopens the Merchant page instead of returning to the amount input page.

    PR #80480 modified the merchant step navigation flow to insert the merchant step between amount and confirmation. The changes include:

    1. New navigation logic in IOURequestStepMerchant.tsx (lines 85-102)
    2. Modified back navigation behavior

    Verification

    The bug is in /home/runner/_work/App/App/src/pages/iou/request/step/IOURequestStepMerchant.tsx:

    Lines 85-90: A useFocusEffect hook resets the isSaved state to false every time the merchant page is focused.

    Lines 97-99: When navigating after save, if !isEditing && !backTo, the code navigates to the confirmation page with:

    Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(
        action, iouType, transactionID, reportID, 
        undefined, undefined, Navigation.getActiveRoute()  // <-- BUG: uses current route as backTo
    ));

    The problem is that Navigation.getActiveRoute() returns the current merchant route, so when users click back from the confirmation page, they navigate back to merchant with backTo set to the merchant route itself. This creates a navigation loop.

    Root Cause

    When the merchant page is accessed multiple times (by switching participants), the useFocusEffect hook resets state and triggers the navigation logic. The use of Navigation.getActiveRoute() as the backTo parameter creates a circular reference where the back button points to the same merchant page.

    The flow should be: Confirmation → Merchant → Amount, but instead becomes: Confirmation → Merchant → Merchant (loop).

  7. 1 remaining item

  8. nkdengineer commented on Feb 11, 2026

    @nkdengineer
    Contributor

    We discussed about this problem here https://expensify.enterprise.slack.com/archives/C01GTK53T8Q/p1768051567940929. Let keep this as it is.

  9. inimaga commented on Feb 11, 2026

    @inimaga
    Contributor

    Based on the conversation removing blocker label for now as it was a conscious decision to allow this. Confirming in the linked slack conversation above whether we want to actually solve this.

  10. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Feb 11, 2026
  11. inimaga commented on Feb 16, 2026

    @inimaga
    Contributor

    Closing this for now as low priority and not worth solving for atm.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions