Skip to content

Merchant page opens after selecting workspace chat when submitting distance expense #80280

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.7-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: #76595
Email or phone of affected tester (no customers): jsiodjosjdnisojso@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.1 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Create a manual or map distance expense.
  4. Click Submit it to someone.
  5. Select workspace chat.

Expected Result:

Confirm page will open.

Actual Result:

Merchant page opens when it is a distance expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7055985_1769121854430.3.mp4

View all open jobs on GitHub

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 Jan 22, 2026
  2. melvin-bot commented on Jan 22, 2026

    @melvin-bot

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

  3. melvin-bot commented on Jan 22, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 22, 2026

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (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 Jan 22, 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 Jan 22, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

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

    Recommendation: REVERT

    This PR introduced a critical logic error in the participant selection flow. When submitting distance expenses to a workspace chat, the code incorrectly navigates to the Merchant page instead of the Confirmation page. Distance expenses should skip the merchant step entirely.

    Labels: Keeping DeployBlockerCash (App deploy blocked), removing DeployBlocker (not a backend issue)

    📋 Detailed Analysis

    Evidence

    The bug is reproducible on staging with version 9.3.7-0, which includes PR #76595. The issue report states:

    • Create a distance expense (manual or map)
    • Click "Submit it to someone"
    • Select workspace chat
    • Expected: Confirmation page opens
    • Actual: Merchant page opens

    PR #76595 was merged on 2026-01-22 at 16:18:30Z and modifies the participant selection flow to add merchant step for manual expenses.

    Verification

    The PR modifies src/pages/iou/request/step/IOURequestStepParticipants.tsx, specifically the navigation logic after participants are selected.

    Root cause identified in lines 387-398:

    let route: Route = iouConfirmationPageRoute;
    
    if (isCategorizing) {
        ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, initialTransactionID, selectedReportID.current || reportID, iouConfirmationPageRoute);
    } else {
        route = ROUTES.MONEY_REQUEST_STEP_MERCHANT.getRoute(
            action,
            iouType === CONST.IOU.TYPE.CREATE || iouType === CONST.IOU.TYPE.TRACK ? CONST.IOU.TYPE.SUBMIT : iouType,
            initialTransactionID,
            newReportID,
        );
    }

    Root Cause

    Logic error:

    1. Line 390 calls ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(...) but does not assign the result to the route variable
    2. Lines 391-398 in the else block unconditionally set route to the Merchant page, regardless of whether merchant is required

    The code at line 375 correctly determines that merchant is only required for manual expenses:

    const isMerchantRequired = !!firstParticipant?.isPolicyExpenseChat && isMerchantMissing(initialTransaction) && iouRequestType === CONST.IOU.REQUEST_TYPE.MANUAL;

    However, the subsequent navigation logic ignores this check and always routes to the Merchant page when not categorizing. For distance expenses (REQUEST_TYPE.DISTANCE or REQUEST_TYPE.DISTANCE_MAP), isMerchantRequired would be false, but the user still gets sent to the Merchant page incorrectly.

    The conditional logic should check isMerchantRequired before deciding whether to route to the Merchant step or Confirmation step.

  7. cead22 commented on Jan 22, 2026

    @cead22
    Contributor

    This is probably from this PR #76595. @nkdengineer can we skip the merchant page when we have a value for the merchant? cc @Krishna2323

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 22, 2026
  9. melvin-bot commented on Jan 22, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. cead22 commented on Jan 23, 2026

    @cead22
    Contributor

    We reverted the offending PR and CP'd it to staging. @mitarachim Can you please re-test and reopen this if the issue persists? Thanks

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.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions