You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-04-23] Expense - Not here page opens after deleting expenses #87199
Version Number: 9.3.53-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:#86636 Email or phone of affected tester (no customers):sjoinjojsodidsjodjso@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:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Open the expense report.
Create another expense (or split the expense).
Bulk select both expenses.
Click dropdown button > Delete > Delete.
Expected Result:
Not here page will not open after deleting expenses.
👋 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:
Identify the pull request that introduced this issue and revert it.
Investigation Summary: Frontend bug. Causing PR: #86721 (decompose ReportScreen 6d: extract navigate-away handler by @adhorodyski, High confidence). Recommendation: REVERT. PR 86721 is a pure refactor extracting navigate-away logic from ReportScreen into a new ReportNavigateAwayHandler component. The refactor introduced a behavioral regression in the bulk-delete expense scenario. In the new component, report is subscribed directly via useOnyx on the raw collection key, whereas ReportScreen used a memoized lightweight report from reportByIDsSelector with different shape and memoization behavior. This causes isEmpty(report) and isMoneyRequestReport(prevReport) to be truthy simultaneously during bulk delete intermediate states, incorrectly triggering navigation away to the Not here page. Reverting restores the original behavior with no loss of functionality. Labels: DeployBlockerCash kept (frontend App PR). DeployBlocker should be removed (fix is in App, not backend).
Root Cause: When all expenses on a report are bulk-deleted, the bulk delete flow never sets deleteTransactionNavigateBackUrl, so the "Not Found" guard is not suppressed — it shows the "Hmm… it's not here" page before navigation away can complete.
Recommended Fix: The bulk delete path in useDeleteTransactions.ts (or useSelectedTransactionsActions.ts) should set deleteTransactionNavigateBackUrl before performing the deletion, similar to how single-transaction deletion does it. This would suppress both ReportNotFoundGuard and SearchMoneyRequestReportPage's shouldShowAccessErrorPage check.
Investigation details
How the bug happens step-by-step
User bulk-selects all expenses on a report and clicks Delete.
handleDeleteTransactionsWithNavigation (useSelectedTransactionsActions.ts) calls Navigation.goBack() first, then waits for TRANSITION_END_SCREEN_WRAPPER before deleting.
deleteTransactions in useDeleteTransactions.ts:181-206 loops through each transaction, calling deleteMoneyRequest and accumulating deletedTransactionIDs.
For the last transaction, prepareToCleanUpMoneyRequest at IOU/index.ts:5415 determines shouldDeleteIOUReport = true because after filtering out pending deletions, only 1 transaction remains.
The optimistic update sets report.reportID = null and pendingFields.preview = DELETE (IOU/index.ts:6045-6054).
Critical gap: Unlike single-transaction deletion, the bulk flow never calls setDeleteTransactionNavigateBackUrl — useDeleteTransactions.ts and useSelectedTransactionsActions.ts have zero references to it.
In SearchMoneyRequestReportPage (line 328), shouldShowAccessErrorPage checks deleteTransactionNavigateBackUrl — if set, it returns false (suppresses NotFound). Since it's never set during bulk delete, the check falls through to line 336 where wereAllTransactionsDeleted = true → shows the "Not here" page.
Similarly, in ReportNotFoundGuard (line 61): shouldShowNotFoundPage = !deleteTransactionNavigateBackUrl && ... !reportExists → shows NotFound because reportID is null and the URL is not set.
Why single delete works but bulk delete doesn't
Single-transaction deletion in deleteMoneyRequest returns urlToNavigateBack and the caller sets deleteTransactionNavigateBackUrl in Onyx. Both ReportNotFoundGuard and SearchMoneyRequestReportPage check this key and suppress the NotFound page when it's set. The bulk delete path discards this return value entirely.
PR #86721 extracted ReportNavigateAwayHandler from ReportScreen as a pure refactor. The extraction itself is not the root cause — the missing deleteTransactionNavigateBackUrl in bulk delete existed before PR #86721. However, the refactor may have changed the timing of when the navigate-away effect fires relative to the NotFound guard render, making the race condition more visible. Before the extraction, the logic was inline in ReportScreen and may have executed in a different render cycle.
changed the title [-]Expense - Not here page opens after deleting expenses[/-][+][Due for payment 2026-04-23] Expense - Not here page opens after deleting expenses[/+]on Apr 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.59-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@rlinoz 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]
Activity
melvin-bot commentedon Apr 7, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #86721
melvin-bot commentedon Apr 7, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 7, 2026
👋 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:
OSBotify commentedon Apr 7, 2026
Investigation Summary: Frontend bug. Causing PR: #86721 (decompose ReportScreen 6d: extract navigate-away handler by @adhorodyski, High confidence). Recommendation: REVERT. PR 86721 is a pure refactor extracting navigate-away logic from ReportScreen into a new ReportNavigateAwayHandler component. The refactor introduced a behavioral regression in the bulk-delete expense scenario. In the new component, report is subscribed directly via useOnyx on the raw collection key, whereas ReportScreen used a memoized lightweight report from reportByIDsSelector with different shape and memoization behavior. This causes isEmpty(report) and isMoneyRequestReport(prevReport) to be truthy simultaneously during bulk delete intermediate states, incorrectly triggering navigation away to the Not here page. Reverting restores the original behavior with no loss of functionality. Labels: DeployBlockerCash kept (frontend App PR). DeployBlocker should be removed (fix is in App, not backend).
MelvinBot commentedon Apr 7, 2026
Issue Analysis
Root Cause: When all expenses on a report are bulk-deleted, the bulk delete flow never sets
deleteTransactionNavigateBackUrl, so the "Not Found" guard is not suppressed — it shows the "Hmm… it's not here" page before navigation away can complete.Recommended Fix: The bulk delete path in
useDeleteTransactions.ts(oruseSelectedTransactionsActions.ts) should setdeleteTransactionNavigateBackUrlbefore performing the deletion, similar to how single-transaction deletion does it. This would suppress bothReportNotFoundGuardandSearchMoneyRequestReportPage'sshouldShowAccessErrorPagecheck.Investigation details
How the bug happens step-by-step
handleDeleteTransactionsWithNavigation(useSelectedTransactionsActions.ts) callsNavigation.goBack()first, then waits forTRANSITION_END_SCREEN_WRAPPERbefore deleting.deleteTransactionsinuseDeleteTransactions.ts:181-206loops through each transaction, callingdeleteMoneyRequestand accumulatingdeletedTransactionIDs.prepareToCleanUpMoneyRequestatIOU/index.ts:5415determinesshouldDeleteIOUReport = truebecause after filtering out pending deletions, only 1 transaction remains.report.reportID = nullandpendingFields.preview = DELETE(IOU/index.ts:6045-6054).setDeleteTransactionNavigateBackUrl—useDeleteTransactions.tsanduseSelectedTransactionsActions.tshave zero references to it.SearchMoneyRequestReportPage(line 328),shouldShowAccessErrorPagechecksdeleteTransactionNavigateBackUrl— if set, it returnsfalse(suppresses NotFound). Since it's never set during bulk delete, the check falls through to line 336 wherewereAllTransactionsDeleted = true→ shows the "Not here" page.ReportNotFoundGuard(line 61):shouldShowNotFoundPage = !deleteTransactionNavigateBackUrl && ... !reportExists→ shows NotFound becausereportIDis null and the URL is not set.Why single delete works but bulk delete doesn't
Single-transaction deletion in
deleteMoneyRequestreturnsurlToNavigateBackand the caller setsdeleteTransactionNavigateBackUrlin Onyx. BothReportNotFoundGuardandSearchMoneyRequestReportPagecheck this key and suppress the NotFound page when it's set. The bulk delete path discards this return value entirely.PR #86721 connection
PR #86721 extracted
ReportNavigateAwayHandlerfromReportScreenas a pure refactor. The extraction itself is not the root cause — the missingdeleteTransactionNavigateBackUrlin bulk delete existed before PR #86721. However, the refactor may have changed the timing of when the navigate-away effect fires relative to the NotFound guard render, making the race condition more visible. Before the extraction, the logic was inline inReportScreenand may have executed in a different render cycle.Possibly related issues
Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.10 remaining items
melvin-bot commentedon Apr 7, 2026
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.
roryabraham commentedon Apr 7, 2026
requested retest: https://expensify.slack.com/archives/C09V78U42D8/p1775595065094409
m-natarajan commentedon Apr 7, 2026
Not reproduce, Chrome / v9.3.53-7
Screen.Recording.2026-04-07.at.23.55.21.mp4
melvin-bot commentedon Apr 7, 2026
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.
melvin-bot commentedon Apr 8, 2026
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.
[-]Expense - Not here page opens after deleting expenses[/-][+][Due for payment 2026-04-23] Expense - Not here page opens after deleting expenses[/+]melvin-bot commentedon Apr 16, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.59-4 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-04-23. 🎊
melvin-bot commentedon Apr 16, 2026
@rlinoz 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]