Skip to content

Expense - Report auto opens when expense is created from report preview #82131

Closed

Description

@jponikarchuk

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?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-4998/folder/13176674/41236543/1183036606
Email or phone of affected tester (no customers): sdionjsdionjodidjsodj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an empty report.
  4. On the report preview, click Add expense > Create expense.
  5. Create a manual expense.

Expected Result:

App will stay on workspace chat when expense is created from report preview.

Actual Result:

Report auto opens after creating expense from report preview.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 11, 2026
  2. melvin-bot commented on Feb 11, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 11, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 11, 2026

    @melvin-bot

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

  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

    This PR #80480 introduced extensive changes to the create expense flow, including significant navigation logic modifications. The specific issue is in the dismissModalAndOpenReportInInboxTab function which auto-navigates to the expense report after creating an expense from a report preview.

    Labels: Keeping DeployBlockerCash (App deploy is blocked). PR #80480 is in the App repository and requires reversion or fix.

    Detailed Analysis

    Evidence

    1. The bug is only reproducible on staging (v9.3.17-0), not production, confirming it was introduced by a PR in the current staging deploy
    2. PR Update create transaction Manual flow to ask for merchant after asking for amount v2 #80480 was merged on 2026-02-10 and is in the StagingDeployCash checklist
    3. The PR made extensive changes to the money request creation flow, particularly navigation after expense creation
    4. The bug report specifically mentions: "Report auto opens after creating expense from report preview" - which matches navigation changes in this PR

    Verification

    Affected file: /home/runner/_work/App/App/src/libs/actions/IOU/index.ts

    Lines 1072-1086 in the dismissModalAndOpenReportInInboxTab function show the problematic logic:

    // When a report with one expense is opened in the wide RHP and the user adds another expense, RHP should be dismissed and ROUTES.SEARCH_MONEY_REQUEST_REPORT should be displayed.
    if (hasMultipleTransactions && reportID) {
        // On small screens, dismiss all modals and then navigate to the right report.
        // On large screens, dismiss to the previous RHP first, then replace the current route with the new report.
        const isNarrowLayout = getIsNarrowLayout();
        if (isNarrowLayout) {
            Navigation.dismissModal();
        } else {
            Navigation.dismissToPreviousRHP();
        }
    
        Navigation.setNavigationActionToMicrotaskQueue(() => {
            Navigation.navigate(ROUTES.SEARCH_MONEY_REQUEST_REPORT.getRoute({reportID}), {forceReplace: !isNarrowLayout});
        });
        return;
    }

    This code automatically navigates to the expense report when adding an expense from a report preview, which causes the unwanted auto-opening behavior described in the issue.

    Root Cause

    When creating an expense from a report preview in a workspace chat:

    1. User clicks "Add expense" > "Create expense" from report preview
    2. User creates a manual expense
    3. The handleNavigateAfterExpenseCreate function is called
    4. Since isFromGlobalCreate is false (expense created from workspace chat), it calls dismissModalAndOpenReportInInboxTab
    5. The function detects the report now has multiple transactions and automatically navigates to SEARCH_MONEY_REQUEST_REPORT
    6. This opens the report, instead of staying on the workspace chat

    Expected behavior: App should stay on workspace chat when expense is created from report preview
    Actual behavior: Report auto-opens after creating expense from report preview

    PR #80480 introduced merchant step navigation changes but appears to have inadvertently changed the navigation behavior for this flow as well.

  7. rlinoz commented on Feb 11, 2026

    @rlinoz
    Contributor

    testing revert here #82132

  8. rlinoz commented on Feb 11, 2026

    @rlinoz
    Contributor

    reverting fixes the issue cc: @nkdengineer @Krishna2323

  9. rlinoz commented on Feb 11, 2026

    @rlinoz
    Contributor

    It looks like other navigation blocker are associated with the same PR, so I will continue with the revert.

  10. rlinoz commented on Feb 11, 2026

    @rlinoz
    Contributor

    This is fixed.

  11. IuliiaHerets commented on Feb 11, 2026

    @IuliiaHerets

    QA team can't reproduce this issue anymore. Windows 11 / Chrome / v9.3.17-5
    Native apps were not updated yet

    empty.report.mp4
  12. IuliiaHerets commented on Feb 11, 2026

    @IuliiaHerets

    Issue is passed on Android app too, build 9.3.17-5

    Screenrecorder-2026-02-11-17-53-31-886.mp4
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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions