Skip to content

[READY FOR PAYMENT][$250] "Not Found" page flash after deleting expense #83521

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: v9.3.26-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: #79530
Email or phone of affected tester (no customers): applausetester+ds@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Mac 14.5/ Chrome
App Component: Money Requests

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Go to a chat and create a single expense
  3. Open the expense
  4. Click the report details (header)
  5. Delete the expense from the details page

Expected Result:

Navigates back smoothly, no "Not Found" flash, no errors

Actual Result:

"Not Found" page flash when navigates back

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7088623_1772052012444.Screen_Recording_2026-02-25_at_11.29.09_at_night.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026850578182079486
  • Upwork Job ID: 2026850578182079486
  • Last Price Increase: 2026-02-26

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Feb 26, 2026
  2. melvin-bot commented on Feb 26, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 26, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 26, 2026

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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 Feb 26, 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 26, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #79530 - "show not found page for deleted duplicate expense" by @marufsharifi (High confidence)
    Related Issues: This is a regression from the fix for #78338

    Recommendation: REVERT

    PR #79530 introduced a race condition that causes a brief "Not Found" page flash when deleting expenses through the normal flow.

    Labels: Removed DeployBlocker (backend label not needed for frontend bug)

    Detailed Analysis

    Evidence

    1. Timing matches: PR show not found page for deleted duplicate expense. #79530 was merged on 2026-02-25, which aligns with when the bug appeared on staging (v9.3.26-0)
    2. Symptom matches: The issue describes a "Not Found" flash during expense deletion navigation - exactly what PR show not found page for deleted duplicate expense. #79530 modified
    3. Reproducible only on staging, not production: Confirms this is a new regression from recent staging PRs

    Verification

    PR #79530 modified the following files related to transaction deletion navigation:

    • src/pages/inbox/ReportScreen.tsx - Added isDeletedTransactionThread logic
    • src/components/MoneyReportHeader.tsx - Added setDeleteTransactionNavigateBackUrl calls
    • src/components/MoneyRequestHeader.tsx - Added setDeleteTransactionNavigateBackUrl calls
    • src/pages/ReportDetailsPage.tsx - Uses setDeleteTransactionNavigateBackUrl
    • src/libs/TransactionNavigationUtils.ts - New utility functions for deletion navigation

    The changes directly affect the expense deletion flow mentioned in the issue.

    Root Cause

    The PR introduced new logic in ReportScreen.tsx (lines 482-536) to handle deleted transaction threads:

    const isDeletedTransactionThread = isReportTransactionThread(report) && (isParentActionDeleted || isParentActionMissingAfterLoad);
    
    // In shouldShowNotFoundPage:
    if (deleteTransactionNavigateBackUrl) {
        return false;
    }
    
    if (isDeletedTransactionThread) {
        return true;  // Show Not Found
    }

    Race condition: When deleting an expense from ReportDetailsPage:

    1. setDeleteTransactionNavigateBackUrl() is called
    2. The parent action is immediately marked as deleted
    3. isDeletedTransactionThread evaluates to true
    4. During the brief moment before the Onyx update for deleteTransactionNavigateBackUrl propagates to ReportScreen, shouldShowNotFoundPage evaluates to true
    5. This causes the "Not Found" flash before navigation completes

    The PR was intended to fix the "forward button after delete" issue (#78338) but introduced this regression in the normal deletion flow. Test 4 in the PR specifically tested this scenario but apparently did not catch the flash.

  7. 38 remaining items

  8. mallenexpensify commented on Mar 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @Krishna2323 due $250 via NewDot

    This is a regression from #79530, why would payment be due?

    fwiw.. I should have said... "It this a regression" (cuz I didn't know)

    @Krishna2323 plz complete the BZ checklist and tag me in a post once you have. Thx

    Also... if anyone else is due payment, please comment with deets.

  9. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  11. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  12. melvin-bot commented on Apr 1, 2026

    @melvin-bot

    @mallenexpensify Huh... This is 4 days overdue. Who can take care of this?

  13. Krishna2323 commented on Apr 1, 2026

    @Krishna2323
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: 80663: Expense - Not here page opens after deleting expense #80674 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/619642

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to a chat and create a single expense
    2. Open the expense
    3. Click the report details (header)
    4. Delete the expense from the details page
    5. Verify the navigation back is smooth with no "Not Found" page flash

    Slow device test:

    1. Open Chrome DevTools → Performance tab → enable CPU throttling (4x or 6x slowdown)
    2. Repeat steps 1-5 above
    3. Verify no "Not Found" flash during the RHP close animation

    Offline tests

    1. Repeat the deletion test steps 1-5 above while offline
    2. Verify the navigation back is smooth with no "Not Found" page flash
    3. Reconnect to the network
    4. Verify no errors appear

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-633e-ace1-aafc-ab344eee4bc4
  14. Krishna2323 commented on Apr 1, 2026

    @Krishna2323
    Contributor

    @mallenexpensify checklist completed ^

  15. mallenexpensify commented on Apr 2, 2026

    @mallenexpensify
    Contributor

    thx, closing

  16. Krishna2323 commented on Apr 4, 2026

    @Krishna2323
    Contributor

    Requested in ND.

  17. twisterdotcom commented on Apr 5, 2026

    @twisterdotcom
    Contributor

    @Krishna2323 has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-c743-a62d-b3b2-88814d9a34f4
  18. quinthar commented on Apr 13, 2026

    @quinthar
    Contributor

    Approved $250 to @Krishna2323

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 contributorReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions