Skip to content

[Due for payment 2026-05-26] [Due for payment 2026-05-26] Expense - New report opens on Inbox when created via upgrade flow on Spend tab #90854

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.75-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: #88374
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.com
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:

  1. Go to staging.new.expensify.com
  2. Create a new account.
  3. Create a new workspace.
  4. Go to Spend > Reports.
  5. Click Create report.
    → New report opens in RHP on Spend tab.
  6. Delete the report.
  7. Delete the workspace.
  8. Go to Spend > Reports.
  9. Click Create report.
  10. Click Upgrade > Confirm > Got it, thanks.

Expected Result:

New report will open in RHP on Spend tab.

Actual Result:

New report opens on Inbox when created via upgrade flow on Spend tab.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7155475_1778881884822.12.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 16, 2026
  2. melvin-bot commented on May 16, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 16, 2026

    @melvin-bot

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

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

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #88374 - "Reapply: Show Create Report CTA for users without a workspace" by @mukhrr (High confidence)
    Related Issues: #83782, #84139

    Recommendation: REVERT

    PR #88374 changed the post-upgrade navigation in IOURequestStepUpgrade.tsx in a way that breaks the expected navigation context. The fix is straightforward — revert this PR.

    Assigned: @mukhrr (PR author), @eVoloshchak (approving reviewer), @marcaaron (approving reviewer)
    Labels: DeployBlockerCash kept (frontend App bug). DeployBlocker not present, no changes needed.

    Detailed Analysis

    Evidence

    The issue is staging-only (not reproducible in production), which places it squarely in the set of PRs introduced in the current staging deploy. The melvin-bot already flagged PR #88374, which was merged on 2026-05-15 and is listed in the StagingDeployCash checklist.

    The reproduction steps confirm the problem only surfaces when going through the upgrade flow from the Spend tab:

    1. User with no workspace goes to Spend > Reports
    2. Clicks "Create report" — upgrade RHP opens (this is the new behavior added by Reapply: Show Create Report CTA for users without a workspace #88374)
    3. Clicks Upgrade > Got it, thanks
    4. Expected: report opens in RHP on Spend tab
    5. Actual: report opens on Inbox

    Verification

    The affected code path is in src/pages/iou/request/step/IOURequestStepUpgrade.tsx, specifically in the CONST.UPGRADE_PATHS.REPORTS case.

    Before PR #88374 (the old behavior):

    Navigation.goBack();
    navigateWithMicrotask(ROUTES.NEW_REPORT_WORKSPACE_SELECTION.getRoute());
    

    This navigated to NewReportWorkspaceSelectionPage, which called its own navigateToNewReport helper. That helper correctly checks isSearchTopmostFullScreenRoute() and conditionally uses ROUTES.SEARCH_MONEY_REQUEST_REPORT vs ROUTES.REPORT_WITH_ID with the appropriate forceReplace logic that considers isRHPOnReportInSearch and shouldUseNarrowLayout.

    After PR #88374 (the broken behavior):

    const { reportID: newReportID } = createReportForCurrentUser(policyID);
    Navigation.setNavigationActionToMicrotaskQueue(() => {
      Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(newReportID), {
        forceReplace: true,
      });
    });

    This bypasses all the context-aware navigation logic in NewReportWorkspaceSelectionPage. It navigates unconditionally to ROUTES.REPORT_WITH_ID with forceReplace: true. When the user is on the Spend tab, forceReplace replaces the current RHP screen with a top-level report route, which causes the navigation to land on the Inbox rather than keeping the report in the RHP context on the Spend tab.

    The PR modifies src/pages/iou/request/step/IOURequestStepUpgrade.tsx (confirmed in the file list: src/pages/iou/request/step/IOURequestStepUpgrade.tsx with +12/-4). This file is directly on the code path described in the reproduction steps.

    Root Cause

    In IOURequestStepUpgrade.tsx, PR #88374 eliminated the intermediate navigation step through NewReportWorkspaceSelectionPage and instead navigates directly to ROUTES.REPORT_WITH_ID with forceReplace: true. The NewReportWorkspaceSelectionPage.navigateToNewReport function has important context-checking logic (e.g., isSearchTopmostFullScreenRoute(), isRHPOnReportInSearch, shouldUseNarrowLayout) that determines how to place the new report in the navigation stack. By bypassing this page, the navigation context is lost and the report opens in the wrong location — the Inbox — instead of in the RHP on the Spend tab.

  6. MelvinBot commented on May 16, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    After the upgrade flow completes (Upgrade > Confirm > Got it, thanks), IOURequestStepUpgrade.tsx:206 always navigates to ROUTES.REPORT_WITH_ID (route r/:reportID), which opens the report in the Inbox tab. It does not check whether the user initiated the flow from the Spend tab.

    Other code paths that create reports correctly branch based on the originating tab — e.g. CreateReportMenuItem.tsx:89 uses isSearchTopmostFullScreenRoute() to choose between SEARCH_MONEY_REQUEST_REPORT (stays on Spend) and REPORT_WITH_ID (Inbox). The upgrade path was simply missing this check.

    What changes do you think we should make in order to solve the problem?

    In src/pages/iou/request/step/IOURequestStepUpgrade.tsx, the UPGRADE_PATHS.REPORTS case with action === CREATE should use isSearchTopmostFullScreenRoute() to pick the correct route, matching the pattern in CreateReportMenuItem.tsx:

    • If the user is on the Search/Spend tab → navigate to ROUTES.SEARCH_MONEY_REQUEST_REPORT.getRoute({reportID: newReportID, backTo: Navigation.getActiveRoute()})
    • Otherwise → navigate to ROUTES.REPORT_WITH_ID.getRoute(newReportID) (current behavior)

    What alternative solutions did you explore? (Optional)

    An alternative would be to pass the originating tab as a route parameter through the upgrade flow. However, isSearchTopmostFullScreenRoute() already solves this problem reliably (the upgrade screen is an RHP overlay, so the underlying full-screen route is still the Search navigator when coming from Spend), and it's the established pattern used by CreateReportMenuItem, NewReportWorkspaceSelectionPage, and EmptySearchView.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 21 remaining items

  8. melvin-bot commented on May 26, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  9. mallenexpensify commented on May 27, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @aimane-chnaif paid $250 via Upwork

    @aimane-chnaif can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022059771431628573853

    Was there a reason @eVoloshchak wasn't assigned to review the PR? Guessing they weren't available and this was a timely deploy blocker.
    Reminder: each time new folks handle regression issues, there's a cost. Whenever possible, please try to assign the people originally responsible. Thanks

  10. aimane-chnaif commented on Jun 2, 2026

    @aimane-chnaif
    Contributor

    @mallenexpensify accepted offer

  11. mallenexpensify commented on Jun 2, 2026

    @mallenexpensify
    Contributor

    @aimane-chnaif paid, summary updated above. Thx.

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions