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-07-13] [$250] Home - Review 1 expense opens expense report instead of expense with violation #95089
Version Number: 9.4.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:#94299 Email or phone of affected tester (no customers):odinjsdojosdijiossojo@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 expenses without category.
Go to Home.
Click Review 2 expenses.
Click Category and select any category.
Close the report view.
Click Review 1 expense.
Expected Result:
Expense RHP with missing category will open.
Actual Result:
Expense report RHP opens, showing both expenses with and without violation.
👋 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.
When a single OPEN expense report contains multiple transactions but only one is flagged with a violation, pressing Review 1 expense on Home opens the whole expense report (showing every expense) instead of the RHP for the single flagged expense.
What is the root cause of that problem?
In useReviewFlaggedExpenses.ts:170, the handler decides between "open the report" and "open the single transaction thread" with:
if(flaggedExpenses.length===1&&isMoneyRequestReport(firstFlaggedReport)){// navigate to the full EXPENSE_REPORT_RHP / REPORT_WITH_ID}
The code comment says the shortcut is meant for a one-transaction report ("the transaction thread is a redundant duplicate of the report itself"), but the condition never checks how many transactions the report has:
flaggedExpenses.length === 1 means "one flagged expense across the user", not "the report has one expense".
isMoneyRequestReport only checks the report type (isIOUReport || isExpenseReport) — it is always true for an expense report.
So in the repro, both expenses live in the same OPEN expense report. After fixing one category, exactly one expense is still flagged → flaggedExpenses.length === 1 is true and isMoneyRequestReport is true → it navigates to the full report (which still lists both expenses). The correct helper for the intended check already exists: isOneTransactionReport (report?.transactionCount === 1).
What changes do you think we should make in order to solve the problem?
With this, a report holding 2 transactions (count !== 1) falls through to navigateToTransactionThread, which opens the RHP for the single flagged transaction — matching the Expected Result. The "open the report directly" shortcut is then correctly reserved for reports that genuinely hold only one expense. Add a unit test covering "1 flagged expense inside a multi-transaction report" to tests/unit/hooks/useReviewFlaggedExpenses.test.ts.
Why it doesn't repro in production / relationship to PR #94299
The buggy condition is not newly introduced by PR #94299 (the assigned PR) — that PR was a refactor that moved the logic out of the flaggedExpenses derived value, and the pre-refactor code used the equivalent count === 1 && isMoneyRequestReport(...). So reverting #94299 would not fix this; the fix should be applied directly. The "Review X expenses" row is new to this release, which is why it's not reproducible in production.
Also worth confirming during implementation: transactionCount must be populated on OPEN expense reports for isOneTransactionReport to be reliable here.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95089) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
🤖 Draft PR created: #95163
Please mark it as "Ready for review" when it is ready for review.
What it does: The Review row decided "open the report directly" vs "open the single transaction thread" using isMoneyRequestReport (a report type check that is always true for expense reports), so a lone flagged expense inside a multi-transaction report opened the whole report. Swapped it for isOneTransactionReport (transactionCount === 1) so a single flagged expense in a multi-transaction report opens its own thread — matching the Expected Result. Added unit + UI test coverage for both the multi-transaction (→ thread) and single-transaction (→ report directly) paths.
Local checks passing: Prettier, typecheck-tsgo, ESLint, React Compiler compliance, and the affected Jest suites (useReviewFlaggedExpenses 9/9, ForYouSectionTest 20/20).
changed the title [-]Home - Review 1 expense opens expense report instead of expense with violation[/-][+][$250] Home - Review 1 expense opens expense report instead of expense with violation[/+]on Jul 2, 2026
changed the title [-][$250] Home - Review 1 expense opens expense report instead of expense with violation[/-][+][Due for payment 2026-07-13] [$250] Home - Review 1 expense opens expense report instead of expense with violation[/+]on Jul 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ZhenjaHorbach / @truph01 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 Jul 1, 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/f0b0f2ea920b38ef2c85c890fc7e254e4fd3c1bee6127384d648da63b4f9ee9a
melvin-bot commentedon Jul 1, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #94299
melvin-bot commentedon Jul 1, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 1, 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 Jul 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a single OPEN expense report contains multiple transactions but only one is flagged with a violation, pressing Review 1 expense on Home opens the whole expense report (showing every expense) instead of the RHP for the single flagged expense.
What is the root cause of that problem?
In
useReviewFlaggedExpenses.ts:170, the handler decides between "open the report" and "open the single transaction thread" with:The code comment says the shortcut is meant for a one-transaction report ("the transaction thread is a redundant duplicate of the report itself"), but the condition never checks how many transactions the report has:
flaggedExpenses.length === 1means "one flagged expense across the user", not "the report has one expense".isMoneyRequestReportonly checks the report type (isIOUReport || isExpenseReport) — it is always true for an expense report.So in the repro, both expenses live in the same OPEN expense report. After fixing one category, exactly one expense is still flagged →
flaggedExpenses.length === 1istrueandisMoneyRequestReportistrue→ it navigates to the full report (which still lists both expenses). The correct helper for the intended check already exists:isOneTransactionReport(report?.transactionCount === 1).What changes do you think we should make in order to solve the problem?
Swap the type check for the transaction-count check in
useReviewFlaggedExpenses.ts:170:With this, a report holding 2 transactions (count
!== 1) falls through tonavigateToTransactionThread, which opens the RHP for the single flagged transaction — matching the Expected Result. The "open the report directly" shortcut is then correctly reserved for reports that genuinely hold only one expense. Add a unit test covering "1 flagged expense inside a multi-transaction report" totests/unit/hooks/useReviewFlaggedExpenses.test.ts.Why it doesn't repro in production / relationship to PR #94299
The buggy condition is not newly introduced by PR #94299 (the assigned PR) — that PR was a refactor that moved the logic out of the
flaggedExpensesderived value, and the pre-refactor code used the equivalentcount === 1 && isMoneyRequestReport(...). So reverting #94299 would not fix this; the fix should be applied directly. The "Review X expenses" row is new to this release, which is why it's not reproducible in production.Also worth confirming during implementation:
transactionCountmust be populated on OPEN expense reports forisOneTransactionReportto be reliable here.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95089)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
cristipaval commentedon Jul 2, 2026
@MelvinBot implement this
MelvinBot commentedon Jul 2, 2026
🤖 Draft PR created: #95163
Please mark it as "Ready for review" when it is ready for review.
What it does: The Review row decided "open the report directly" vs "open the single transaction thread" using
isMoneyRequestReport(a report type check that is alwaystruefor expense reports), so a lone flagged expense inside a multi-transaction report opened the whole report. Swapped it forisOneTransactionReport(transactionCount === 1) so a single flagged expense in a multi-transaction report opens its own thread — matching the Expected Result. Added unit + UI test coverage for both the multi-transaction (→ thread) and single-transaction (→ report directly) paths.Local checks passing: Prettier,
typecheck-tsgo, ESLint, React Compiler compliance, and the affected Jest suites (useReviewFlaggedExpenses9/9,ForYouSectionTest20/20).1 remaining item
melvin-bot commentedon Jul 2, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022072670128996661860
[-]Home - Review 1 expense opens expense report instead of expense with violation[/-][+][$250] Home - Review 1 expense opens expense report instead of expense with violation[/+]m-natarajan commentedon Jul 2, 2026
Chrome /v9.4.26-5
Passed
REC-20260702172326.mp4
ZhenjaHorbach commentedon Jul 2, 2026
@cristipaval
Let's close!
cristipaval commentedon Jul 2, 2026
Thanks! Closing
[-][$250] Home - Review 1 expense opens expense report instead of expense with violation[/-][+][Due for payment 2026-07-13] [$250] Home - Review 1 expense opens expense report instead of expense with violation[/+]melvin-bot commentedon Jul 6, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 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-07-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 6, 2026
@ZhenjaHorbach / @truph01 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]