Skip to content

[Due for payment 2026-05-13] [Due for payment 2026-05-11] [Due for payment 2026-05-07] Expense - User is navigated to the WS chat when created expense in Spend via Quick Action #88664

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.62-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/folder/13176922/test-cases/41237521
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 iOS 26.3.1
App Component: Search

Action Performed:

  1. Sign in to ND
  2. Create a workspace
  3. Go to the Spend tab and create an expense to the workspace
  4. While staying on the Spend tab, tap big "+" button, tap "Create expense" in the QAB section
  5. Fill the details and create the expense

Expected Result:

User stays on the Spend tab, newly created expense appears in the list

Actual Result:

User is navigated to the workspace chat after creating expense on Spend tab via Quick Action

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7137045_1776986386550.QAB_in_search.1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ShridharGoel

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Apr 24, 2026

    @melvin-bot

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

  4. github-actions commented on Apr 24, 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 24, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #87768 - "[Performance] Extend dismiss-first navigation fast paths + deferred writes" by @JakubKorytko (High confidence)
    Related Issues: N/A

    Recommendation: REVERT

    PR #87768 introduced a new navigation decision tree (getSubmitHandler.ts) that selects which fast-path handler runs when an expense is submitted. The REPORT_IN_RHP_DISMISS handler is selected when isReportInRHP = true and a destinationReportID is set, and it calls dismissRHPToReport which navigates to the workspace chat report. This overrides the expected behavior of staying on the Spend (Search) tab when a global create expense is submitted from there. This bug only exists on staging and is not reproducible in production, confirming it was introduced by this PR.

    Assigned: @JakubKorytko (PR author), @ShridharGoel @mountiny (approving reviewers)
    Labels: DeployBlockerCash kept (frontend App PR caused this). No label changes made.

    Detailed Analysis

    Evidence

    • PR [Performance] Extend dismiss-first navigation fast paths + deferred writes #87768 (merged April 21, 2026) introduces entirely new navigation fast-path handlers in SubmitExpenseOrchestrator.tsx and a new pure decision function getSubmitHandler.ts.
    • The bug is staging-only (not reproducible in production), matching the merge date of this PR into the staging release 9.3.62-0.
    • The PR description explicitly describes the Report-in-RHP dismiss handler: "handles report open in RHP (super-wide vs narrow layout)" and dismiss-modal handler: "dismisses to Search or reveals the destination report". These are exactly the code paths involved in the reported bug.
    • The reported symptom — being navigated to workspace chat after creating an expense from the Spend tab via QAB — matches the behavior of the REPORT_IN_RHP_DISMISS handler, which navigates to destinationReportID (the workspace chat) via dismissRHPToReport.

    Verification

    • Affected files: src/pages/iou/request/step/confirmation/SubmitExpenseOrchestrator.tsx, src/pages/iou/request/step/confirmation/getSubmitHandler.ts, src/libs/Navigation/helpers/navigateAfterExpenseCreate.ts
    • PR [Performance] Extend dismiss-first navigation fast paths + deferred writes #87768 directly modifies all three of these files.
    • The getSubmitHandler.ts file was newly created by this PR and contains the decision tree that routes to the wrong handler.

    Root Cause

    The getSubmitHandler decision tree in getSubmitHandler.ts evaluates REPORT_IN_RHP_DISMISS before SEARCH_DISMISS:

    isReportInRHP && destinationReportID  ->  REPORT_IN_RHP_DISMISS
    isFromGlobalCreate && canDismissFromSearch && isSearchTopmostFullScreen  ->  SEARCH_DISMISS
    

    When the user is on the Spend tab (Search) and opens the global create flow (QAB), the expense flow opens in the RHP. This means isReportInRHP = true. The destination report (workspace chat) also exists, so destinationReportID is set. These two conditions trigger REPORT_IN_RHP_DISMISS rather than SEARCH_DISMISS.

    The handleReportInRHPDismiss handler calls dismissRHPToReport(destinationReportID, ...) which navigates the user to the workspace chat report — instead of returning to the Spend tab (Search) where they started. The correct SEARCH_DISMISS handler would have dismissed the modal and kept the user on Search.

    In the old code (before this PR), navigateAfterExpenseCreate handled this case: when isFromGlobalCreate = true and the user was not on the inbox tab, it navigated to Search — not to the workspace chat.

  6. 16 remaining items

  7. changed the title [-][Due for payment 2026-05-07] Expense - User is navigated to the WS chat when created expense in Spend via Quick Action[/-] [+][Due for payment 2026-05-11] [Due for payment 2026-05-07] Expense - User is navigated to the WS chat when created expense in Spend via Quick Action[/+] on May 4, 2026
  8. melvin-bot commented on May 4, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.65-6 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-05-11. 🎊

    For reference, here are some details about the assignees on this issue:

  9. melvin-bot commented on May 4, 2026

    @melvin-bot

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

  10. melvin-bot commented on May 5, 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.

  11. mitarachim commented on May 5, 2026

    @mitarachim

    Deploy Blocker #89674 was identified to be related to the PR #88728 that attempted to fix this issue.

  12. changed the title [-][Due for payment 2026-05-11] [Due for payment 2026-05-07] Expense - User is navigated to the WS chat when created expense in Spend via Quick Action[/-] [+][Due for payment 2026-05-13] [Due for payment 2026-05-11] [Due for payment 2026-05-07] Expense - User is navigated to the WS chat when created expense in Spend via Quick Action[/+] on May 6, 2026
  13. melvin-bot commented on May 6, 2026

    @melvin-bot

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

  14. melvin-bot commented on May 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.67-13 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-05-13. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on May 6, 2026

    @melvin-bot

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

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