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-09-22] Navigating to the expense of a single-expense report should redirect to the single-expense report view #99356
Problem
When navigating to the expense of a single-expense report, the user should be redirected to the single-expense report view instead of the standalone expense view.
Expected Result
Navigating to the expense of a single-expense report redirects to the single-expense report view.
Actual Result
The user lands on the standalone expense view rather than the single-expense report view.
Please mark it as "Ready for review" when it is ready for review.
What I changed: a report holding exactly one expense already renders that expense inline, so the expense's own transaction thread is a duplicate of the report. I added OneTransactionThreadRedirectHandler, a render-nothing handler mounted in ReportScreen, that replaces the route with the report whenever a route lands on that thread. Search already applied this rule at its own call sites; this is the route-level backstop for deep links, notifications, stale history entries, and any other navigation that resolved the IOU action's childReportID without checking the transaction count.
Details and deliberate carve-outs
The redirect does not fire when:
a reportActionID is in the route — that deep link points at a specific message, and replacing the route would drop its anchor;
the parent report's transactionCount is not 1 — the action-based derivation reads whatever report actions are in Onyx, so a multi-expense report still paginating in could otherwise look like a single-expense one for a moment.
It uses forceReplace rather than a push so back navigation doesn't return to the thread, and reuses the route's own backTo for the same reason. In the Search RHP it rebuilds the SEARCH_REPORT route so the report stays in the RHP.
npm test tests/navigation tests/ui/MoneyReportViewTest tests/ui/PaginationTest
pass (557 tests)
npm test tests/navigation/OneTransactionThreadRedirectHandlerTest.tsx
pass (8 tests)
Browser verification did not run. The prestarted web session handed to the tester was already dead — a blank page with zero accessibility nodes and no network activity, and the prestart screenshot shows sign-in never got past the "Join" screen. The dev server itself built cleanly, including both changed files, so this is a session/infra failure rather than a problem with the change. The four manual steps I wanted to confirm are written out in the PR's Tests section for you to run.
changed the title [-]Navigating to the expense of a single-expense report should redirect to the single-expense report view[/-][+][Due for payment 2026-09-22] Navigating to the expense of a single-expense report should redirect to the single-expense report view[/+]on Sep 15, 2026
Activity
aimane-chnaif commentedon Aug 29, 2026
@MelvinBot implement this
MelvinBot commentedon Aug 29, 2026
🤖 Draft PR created: #99811
Please mark it as "Ready for review" when it is ready for review.
What I changed: a report holding exactly one expense already renders that expense inline, so the expense's own transaction thread is a duplicate of the report. I added
OneTransactionThreadRedirectHandler, a render-nothing handler mounted inReportScreen, that replaces the route with the report whenever a route lands on that thread. Search already applied this rule at its own call sites; this is the route-level backstop for deep links, notifications, stale history entries, and any other navigation that resolved the IOU action'schildReportIDwithout checking the transaction count.Details and deliberate carve-outs
The redirect does not fire when:
reportActionIDis in the route — that deep link points at a specific message, and replacing the route would drop its anchor;isOneTransactionThreadexcludes those too;transactionCountis not 1 — the action-based derivation reads whatever report actions are in Onyx, so a multi-expense report still paginating in could otherwise look like a single-expense one for a moment.It uses
forceReplacerather than a push so back navigation doesn't return to the thread, and reuses the route's ownbackTofor the same reason. In the Search RHP it rebuilds theSEARCH_REPORTroute so the report stays in the RHP.Files:
src/pages/inbox/OneTransactionThreadRedirectHandler.tsx— new handlersrc/pages/inbox/ReportScreen.tsx— mounts it beside the existing route handlerstests/navigation/OneTransactionThreadRedirectHandlerTest.tsx— 8 unit tests covering the redirect and each carve-outAI tests run locally:
npm run typechecknpm run lint-changednpm run spell-changednpm run react-compiler-compliance-checknpm test tests/navigation tests/ui/MoneyReportViewTest tests/ui/PaginationTestnpm test tests/navigation/OneTransactionThreadRedirectHandlerTest.tsxBrowser verification did not run. The prestarted web session handed to the tester was already dead — a blank page with zero accessibility nodes and no network activity, and the prestart screenshot shows sign-in never got past the "Join" screen. The dev server itself built cleanly, including both changed files, so this is a session/infra failure rather than a problem with the change. The four manual steps I wanted to confirm are written out in the PR's
Testssection for you to run.view run
melvin-bot commentedon Sep 13, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Sep 13, 2026
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
melvin-bot commentedon Sep 13, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
[-]Navigating to the expense of a single-expense report should redirect to the single-expense report view[/-][+][Due for payment 2026-09-22] Navigating to the expense of a single-expense report should redirect to the single-expense report view[/+]4 remaining items
melvin-bot commentedon Sep 21, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 21, 2026
Payment Summary
Resolving PRs:
Redirect the expense of a single-expense report to the report view #99811
Reviewer: @aimane-chnaif owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 24, 2026
Payment Summary
Contributor+: @aimane-chnaif due $250 via NewDot
garrettmknight commentedon Oct 12, 2026
$250 approved for @aimane-chnaif