Skip to content

[$250] [Due for payment 2026-04-30] Expense - Not here page opens after moving IOU report to workspace #85753

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.40-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: #85192
Email or phone of affected tester (no customers): sosjodijsodjoisjidojs@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:

Precondition:

  • Have at least one workspace.
  • User has received IOU expense from another user.
  1. Go to staging.new.expensify.com
  2. Open 1:1 DM where IOU expense is received.
  3. Open the expense.
  4. Click More > Change workspace.
  5. Select workspace.
  6. Close the RHP.

Expected Result:

Central pane will change to 1:1 DM after moving IOU report to workspace.

Actual Result:

Central pane opens not here page after moving IOU report to workspace.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify
Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022050326150003164540
  • Upwork Job ID: 2050326150003164540
  • Last Price Increase: 2026-05-01

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 19, 2026

    @melvin-bot

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

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

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #85192 - "feat: deep link to report preview or message that caused GBR/RBR" by @aimane-chnaif (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #85192 should be reverted. This PR introduced deep linking to specific report actions when clicking LHN rows, which is causing navigation issues when moving IOU reports to workspaces.

    Labels: Keeping DeployBlockerCash (this blocks the App deploy as it is a frontend bug affecting navigation)

    📋 Detailed Analysis

    Evidence

    PR #85192 was merged on 2026-03-18 and introduced the ability to deep link to specific report actions from the LHN. The issue is reproducible on staging but NOT on production, which aligns with the PR having a production gate (isProduction check on line 76 of SidebarLinks.tsx that disables the feature in production).

    The PR adds an actionTargetReportActionID parameter to navigation when clicking LHN rows, which changes the navigation behavior.

    Verification

    Files affected by the bug:

    Confirmed PR #85192 modifies these areas:

    • src/pages/inbox/sidebar/SidebarLinks.tsx (adds actionTargetReportActionID to navigation)
    • src/libs/ReportUtils.ts (adds actionTargetReportActionID to OptionData type)
    • src/libs/SidebarUtils.ts (propagates actionTargetReportActionID)
    • src/components/LHNOptionsList/OptionRowLHNData.tsx (consumes actionTargetReportActionID)

    Root Cause

    When a user moves an IOU report from a 1:1 DM to a workspace:

    1. User opens IOU expense from 1:1 DM
    2. User clicks "More > Change workspace"
    3. User selects a workspace
    4. ReportChangeWorkspacePage.tsx calls Navigation.goBack(backTo) (line 89)
    5. Simultaneously, moveIOUReportToPolicy changes the IOU report's chatReportID from the DM to the workspace expense chat (line 6211 of Report/index.ts)
    6. The navigation attempts to return to the previous context, but the report has been moved to a different chat
    7. This results in a "Not here" (FullPageNotFoundView) page being displayed

    The PR #85192 introduced changes to the navigation flow that don't properly handle the case where a report's parent chat changes during the navigation sequence. The actionTargetReportActionID parameter adds complexity to the navigation that breaks when the underlying report structure changes.

    Why it works in production but not staging: The PR author intentionally gated this feature with isProduction ? undefined : option.actionTargetReportActionID to prevent issues in production, which is why the bug only manifests on staging.

  6. aimane-chnaif commented on Mar 19, 2026

    @aimane-chnaif
    Contributor

    The feature is only available in staging. We can demote this

  7. cristipaval commented on Mar 19, 2026

    @cristipaval
    Contributor

    The feature is only available in staging. We can demote this

    what do you mean by this, @aimane-chnaif ? Is it behind a beta?

  8. aimane-chnaif commented on Mar 19, 2026

    @aimane-chnaif
    Contributor

    The feature is only available in staging. We can demote this

    what do you mean by this, @aimane-chnaif ? Is it behind a beta?

    prevents deep link on production

    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(option.reportID, isProduction ? undefined : option.actionTargetReportActionID));

  9. MelvinBot commented on Mar 19, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    After moving an IOU expense to a workspace via "More > Change workspace" in a 1:1 DM, the central pane shows a "not here" page instead of the 1:1 DM. This only reproduces on staging, not production.

    What is the root cause of that problem?

    PR #85192 introduced a staging-only deep-link feature (gated by isProduction in SidebarLinks.tsx:76) that includes an actionTargetReportActionID in the navigation URL when clicking an LHN row with a GBR/RBR badge. On staging, clicking the 1:1 DM in the LHN navigates to r/{dmReportID}/{reportPreviewActionID} — deep-linking to the REPORT_PREVIEW action that has the outstanding IOU.

    When the user then changes the IOU's workspace, convertIOUReportToExpenseReport optimistically removes the REPORT_PREVIEW action from the DM by setting it to null via Onyx.METHOD.MERGE:

    optimisticData.push({
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oldChatReportID}`,
        value: {[reportPreview.reportActionID]: null},  // completely removed
    });

    The central pane URL still has the stale reportActionIDFromRoute. In ReportScreen, the cleanup logic at lines 897-914 only handles the case where linkedAction exists but is marked as deleted (isLinkedActionDeleted = true). When the action is completely removed from Onyx (linkedAction becomes null), isLinkedActionDeleted returns false (line 467: if (!linkedAction) return false), so the stale reportActionIDFromRoute is never cleared. The stale reportActionIDFromRoute causes ReportScreen to show the "not here" page via the shouldShowNotFoundLinkedAction check at lines 497-504.

    This only happens on staging because in production, isProduction is true, and actionTargetReportActionID is passed as undefined to the navigation route — so reportActionIDFromRoute is never set, and there's nothing to go stale.

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

    In ReportScreen.tsx, the useEffect at lines 897-914 should also handle the case where linkedAction is null but reportActionIDFromRoute is still set. When the action has been completely removed from Onyx (not just marked as deleted), the stale reportActionIDFromRoute should be cleared by calling Navigation.setParams({reportActionID: ''}).

    Specifically, add a condition: if !linkedAction && !!reportActionIDFromRoute && !reportMetadata?.isLoadingInitialReportActions, clear the route params. This ensures the central pane falls back to rendering the DM normally when the deep-linked action no longer exists.

    What alternative solutions did you explore? (Optional)

    1. Clear the route params in ReportChangeWorkspacePage.selectPolicy — when the workspace change is triggered, proactively clear the reportActionID from the navigation route. This is less robust since other operations could also remove the linked action.
    2. Make isLinkedActionDeleted return true when linkedAction is null and reportActionIDFromRoute is set — this would let the existing cleanup logic handle the case. However, changing this semantic could have unintended side effects elsewhere.

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

  10. 42 remaining items

  11. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 1, 2026
  12. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 1, 2026
  13. melvin-bot commented on May 1, 2026

    @melvin-bot

    Current assignees @hoangzinh and @aimane-chnaif are eligible for the External assigner, not assigning anyone new.

  14. melvin-bot commented on May 1, 2026

    @melvin-bot
  15. changed the title [-][Due for payment 2026-04-30] Expense - Not here page opens after moving IOU report to workspace[/-] [+][$250] [Due for payment 2026-04-30] Expense - Not here page opens after moving IOU report to workspace[/+] on May 1, 2026
  16. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 1, 2026
  17. mallenexpensify commented on May 1, 2026

    @mallenexpensify
    Contributor

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

  18. aimane-chnaif commented on May 4, 2026

    @aimane-chnaif
    Contributor

    @mallenexpensify accepted offer

  19. mallenexpensify commented on May 4, 2026

    @mallenexpensify
    Contributor

    @aimane-chnaif this looks like it was a regression from your PR here
    and the issue was created during the regression period. So this shouldn't be due payment, correct?

    If so, I'll need to get a refund, I paid you before reviewing here.

  20. aimane-chnaif commented on May 4, 2026

    @aimane-chnaif
    Contributor
  21. mallenexpensify commented on May 4, 2026

    @mallenexpensify
    Contributor

    Payment Summary

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

    thx @aimane-chnaif . If anyone disagrees that isn't a regression issue, plz comment.

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.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions