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-06-22] [Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button #93363
Version Number: 9.4.6-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:#92838 Email or phone of affected tester (no customers):jsodinjosdjsoinjsiojs@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create two same expenses on different report.
Open one of the expenses from Step 3.
Click Review duplicates.
Select the second expense.
Click Keep selected > Confirm.
Click browser back button.
Expected Result:
Not here page will not open (similar production).
Actual Result:
Not here page opens after resolving duplicates and clicking browser back button.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
After merging two duplicate expenses that live in different reports (Review Duplicates → keep the second one → Confirm), pressing the browser back button lands on the "Hmm... it's not here" NotFoundPage. This is a regression from #92838 (which fixed #92302) and is the reason this is a deploy blocker.
What is the root cause of that problem?
The new merge flow navigates forward with Navigation.goBack(keptReportRoute) instead of dismissModal(). Because the kept transaction's expense report was never on the navigation stack, goBack resolves to a REPLACE, not a pop — so on web it calls history.replace. The browser history entries for the discarded transaction thread (/r/<discardedThread> and .../duplicates/review) are left intact, now pointing at data the merge soft-deleted/tore down.
The PR's safety net, setDeleteTransactionNavigateBackUrl(keptReportRoute), is supposed to suppress the NotFoundPage — but it stores /r/<keptReportID>, which does not contain /duplicates/review. So the instant the user presses back and the kept report unfocuses, DeleteTransactionNavigateBackHandler clears the suppressor NVP (its /duplicates/review guard doesn't match). With the suppressor gone and the discarded thread torn down, Review.tsx / ReportNotFoundGuard compute shouldShowNotFound = true and render the "Not here" page.
The sibling resolveDuplicates flow is unaffected because it never soft-deletes IOU actions or tears down threads, so its back-target stays a live report.
Evidence & data flow (high confidence)
Navigation rewrite — Confirmation.tsx:104-123. mergeParams.reportID is the kept transaction's expense report (from buildMergeDuplicatesParams), which is not the topmost report (the discarded transaction thread), so the else → goBack(keptReportRoute) branch runs.
goBack → REPLACE — Navigation.ts:511-545 defers to goUp; in goUp:425-502indexOfBackToRoute === -1 ⇒ dispatches REPLACE. On web, useLinking maps historyDelta == 0 to history.replace, leaving the discarded thread entries in browser history. By contrast dismissModal dispatches a POP (history.go(-1)), which actually consumes a browser entry.
Flow: open discarded thread → push review → push confirm → confirm sets suppressor /r/<keptReportID> + soft-deletes/teardowns discarded thread → goBack(keptReportRoute) REPLACEs top (discarded entries remain) → kept report focused, suppressor kept → browser back → kept report unfocuses → handler clears suppressor → discarded thread torn down + no suppressor ⇒ NotFoundPage.
What changes do you think we should make in order to solve the problem?
The back-target should never be a torn-down thread. Two viable directions:
Don't leave the dead entries in history. After a cross-report merge, navigate so the discarded thread's history entries are removed rather than replaced-over — e.g. dismiss the modal (which pops the browser entry) and then route to the kept report, instead of a fallback goBack(keptReportRoute) that resolves to REPLACE. This restores the pre-PR back-button behavior while keeping the forward redirect to the kept report.
Make the suppressor cover the back navigation. Store a deleteTransactionNavigateBackUrl that points at the discarded thread's /duplicates/review route (so doesDeleteNavigateBackUrlIncludeSpecificDuplicatesReview matches and the guard suppresses NotFoundPage on back), mirroring how the single-report delete-transaction flow already keeps its suppressor alive.
Option 1 is the cleaner fix since it removes the orphaned history entry entirely rather than papering over it.
Given this is a time-sensitive deploy blocker, reverting #92838 is also a valid stop-gap — but note that reintroduces the original #92302 (NotFound immediately on Confirm), so a targeted fix is preferable if there's time.
What alternative solutions did you explore? (Optional)
N/A
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93363) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
This is a regression from #92838. After a cross-report merge, handleMergeDuplicates navigates with Navigation.goBack(keptReportRoute), where keptReportRoute is the kept transaction's expense report. That report was never on the navigation stack, so goBack resolves to a REPLACE rather than a pop (in goUp, when the target route isn't found in the state, it dispatches a REPLACE). On web a REPLACE overwrites only the current history entry, so the discarded transaction thread's entries (/r/<thread> and …/duplicates/review) are left intact in the browser history.
At the same time, the suppressor the PR sets (setDeleteTransactionNavigateBackUrl('/r/<keptReportID>')) does not contain /duplicates/review, so DeleteTransactionNavigateBackHandler clears it as soon as the kept report loses focus. When the user then presses the browser Back button they land back on the now torn-down thread/review entry with the suppressor already gone, and the not-found guard renders the "Hmm… it's not here" page.
What changes do you think we should make in order to solve the problem?
Don't leave the dead history entries behind. After a cross-report merge opened from a report thread:
Dismiss the duplicates modal first — this pops the modal's browser-history entries (…/duplicates/review, …/duplicates/confirm) instead of replacing over them.
Then route to the kept report by replacing the now-dead discarded-thread entry, rather than relying on a goBack that resolves to a REPLACE and leaves the dead entry one step back.
With the dead thread entry removed, the browser Back button lands on a live screen and the not-found page no longer appears. (For the Search entry point the modal should instead be dismissed back to the search results — see #93362.)
What alternative solutions did you explore? (Optional)
Keep the suppressor alive across the back navigation by pointing deleteTransactionNavigateBackUrl at a /duplicates/review route so the not-found guard stays suppressed. This papers over the orphaned history entry instead of removing it, so removing the entry is cleaner. Reverting #92838 is a valid stop-gap but reintroduces #92302.
changed the title [-]Expense - Not here page opens after resolving duplicates and clicking browser back button[/-][+][Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/+]on Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-][Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/+]on Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 12, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/5b73a2e2c95c2ec86f2b35c1d89b65a02bff009a045bc50f40f3f707531555c8
melvin-bot commentedon Jun 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92838
melvin-bot commentedon Jun 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 12, 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:
MelvinBot commentedon Jun 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After merging two duplicate expenses that live in different reports (Review Duplicates → keep the second one → Confirm), pressing the browser back button lands on the "Hmm... it's not here"
NotFoundPage. This is a regression from #92838 (which fixed #92302) and is the reason this is a deploy blocker.What is the root cause of that problem?
The new merge flow navigates forward with
Navigation.goBack(keptReportRoute)instead ofdismissModal(). Because the kept transaction's expense report was never on the navigation stack,goBackresolves to a REPLACE, not a pop — so on web it callshistory.replace. The browser history entries for the discarded transaction thread (/r/<discardedThread>and.../duplicates/review) are left intact, now pointing at data the merge soft-deleted/tore down.The PR's safety net,
setDeleteTransactionNavigateBackUrl(keptReportRoute), is supposed to suppress theNotFoundPage— but it stores/r/<keptReportID>, which does not contain/duplicates/review. So the instant the user presses back and the kept report unfocuses,DeleteTransactionNavigateBackHandlerclears the suppressor NVP (its/duplicates/reviewguard doesn't match). With the suppressor gone and the discarded thread torn down,Review.tsx/ReportNotFoundGuardcomputeshouldShowNotFound = trueand render the "Not here" page.The sibling
resolveDuplicatesflow is unaffected because it never soft-deletes IOU actions or tears down threads, so its back-target stays a live report.Evidence & data flow (high confidence)
Navigation rewrite —
Confirmation.tsx:104-123.mergeParams.reportIDis the kept transaction's expense report (frombuildMergeDuplicatesParams), which is not the topmost report (the discarded transaction thread), so theelse → goBack(keptReportRoute)branch runs.goBack → REPLACE —
Navigation.ts:511-545defers togoUp; ingoUp:425-502indexOfBackToRoute === -1⇒ dispatches REPLACE. On web,useLinkingmapshistoryDelta == 0tohistory.replace, leaving the discarded thread entries in browser history. By contrastdismissModaldispatches a POP (history.go(-1)), which actually consumes a browser entry.Suppressor cleared on back — the stored URL
/r/<keptReportID>fails the/duplicates/reviewcheck inTransactionNavigationUtils.ts:36-49, soDeleteTransactionNavigateBackHandlerclears the NVP when the kept report unfocuses → guards renderNotFoundPage.Soft-delete/teardown that makes the thread "not found" —
Duplicate.ts:255-288.Flow: open discarded thread → push review → push confirm → confirm sets suppressor
/r/<keptReportID>+ soft-deletes/teardowns discarded thread →goBack(keptReportRoute)REPLACEs top (discarded entries remain) → kept report focused, suppressor kept → browser back → kept report unfocuses → handler clears suppressor → discarded thread torn down + no suppressor ⇒NotFoundPage.What changes do you think we should make in order to solve the problem?
The back-target should never be a torn-down thread. Two viable directions:
Don't leave the dead entries in history. After a cross-report merge, navigate so the discarded thread's history entries are removed rather than replaced-over — e.g. dismiss the modal (which pops the browser entry) and then route to the kept report, instead of a fallback
goBack(keptReportRoute)that resolves to REPLACE. This restores the pre-PR back-button behavior while keeping the forward redirect to the kept report.Make the suppressor cover the back navigation. Store a
deleteTransactionNavigateBackUrlthat points at the discarded thread's/duplicates/reviewroute (sodoesDeleteNavigateBackUrlIncludeSpecificDuplicatesReviewmatches and the guard suppressesNotFoundPageon back), mirroring how the single-report delete-transaction flow already keeps its suppressor alive.Option 1 is the cleaner fix since it removes the orphaned history entry entirely rather than papering over it.
Given this is a time-sensitive deploy blocker, reverting #92838 is also a valid stop-gap — but note that reintroduces the original #92302 (NotFound immediately on Confirm), so a targeted fix is preferable if there's time.
What alternative solutions did you explore? (Optional)
N/A
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93363)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
MobileMage commentedon Jun 12, 2026
Proposal
What is the root cause of that problem?
This is a regression from #92838. After a cross-report merge,
handleMergeDuplicatesnavigates withNavigation.goBack(keptReportRoute), wherekeptReportRouteis the kept transaction's expense report. That report was never on the navigation stack, sogoBackresolves to a REPLACE rather than a pop (ingoUp, when the target route isn't found in the state, it dispatches a REPLACE). On web a REPLACE overwrites only the current history entry, so the discarded transaction thread's entries (/r/<thread>and…/duplicates/review) are left intact in the browser history.At the same time, the suppressor the PR sets (
setDeleteTransactionNavigateBackUrl('/r/<keptReportID>')) does not contain/duplicates/review, soDeleteTransactionNavigateBackHandlerclears it as soon as the kept report loses focus. When the user then presses the browser Back button they land back on the now torn-down thread/review entry with the suppressor already gone, and the not-found guard renders the "Hmm… it's not here" page.What changes do you think we should make in order to solve the problem?
Don't leave the dead history entries behind. After a cross-report merge opened from a report thread:
…/duplicates/review,…/duplicates/confirm) instead of replacing over them.goBackthat resolves to a REPLACE and leaves the dead entry one step back.With the dead thread entry removed, the browser Back button lands on a live screen and the not-found page no longer appears. (For the Search entry point the modal should instead be dismissed back to the search results — see #93362.)
What alternative solutions did you explore? (Optional)
Keep the suppressor alive across the back navigation by pointing
deleteTransactionNavigateBackUrlat a/duplicates/reviewroute so the not-found guard stays suppressed. This papers over the orphaned history entry instead of removing it, so removing the entry is cleaner. Reverting #92838 is a valid stop-gap but reintroduces #92302.m-natarajan commentedon Jun 12, 2026
Chrome / v9.4.6-1
Not reproduce
REC-20260612205209.mp4
[-]Expense - Not here page opens after resolving duplicates and clicking browser back button[/-][+][Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/+]melvin-bot commentedon Jun 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-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-06-19. 🎊
melvin-bot commentedon Jun 12, 2026
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]
[-][Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Expense - Not here page opens after resolving duplicates and clicking browser back button[/+]melvin-bot commentedon Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-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-06-22. 🎊
melvin-bot commentedon Jun 15, 2026
@Valforte 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]. If no checklist is needed for this issue, you can click: [no checklist button]