Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/603735
Slack conversation: https://expensify.slack.com/archives/C03U7DCU4/p1771944902661119?thread_ts=1771944902.661119&cid=C03U7DCU4
Action Performed
- Open a report that has multiple expenses, where at least one expense has an RBR indicator (violation, hold, field error, receipt error, etc.)
- Look at the expense carousel in the report preview
Expected Result
The expense that requires action (has RBR) should appear first in the carousel so the user can immediately identify and act on it.
Actual Result
Expenses appear in backend insertion order. RBR-flagged expenses can be buried at position 5+ in the carousel, making them easy to miss entirely — especially since only the first 11 are shown.
Root Cause
There is no RBR-aware sorting anywhere in the transaction display path:
- Carousel —
MoneyRequestReportPreviewContent.tsx:~506 does transactions.slice(0, 11) with no sort beforehand.
- Report transaction list —
MoneyRequestReportTransactionList.tsx:~325 sorts by date/column only; visualOrderTransactionIDs (which drives RHP carousel navigation) inherits this non-RBR-aware order.
The data flows from Onyx derived store → Object.values() (insertion order) → carousel/list — no step prioritizes actionable items.
Proposed Fix
Sort RBR-flagged transactions to the front in both locations:
- Carousel: Sort
transactions by RBR status before the .slice(0, 11) in MoneyRequestReportPreviewContent.
- Transaction list: Use RBR status as a primary sort key in
MoneyRequestReportTransactionList, with the existing date/column sort as secondary.
Existing infrastructure to reuse
shouldShowRBR from TransactionPreviewUtils.createTransactionPreviewConditionals()
filteredViolations already computed per-transaction in MoneyRequestReportTransactionList (~lines 216-237)
- Report-level RBR prioritization pattern in
SidebarUtils.ts:~533
Open Questions
- Should RBR-first sorting override a user-selected column sort (date, merchant, etc.) in the report view, or only apply as the default?
- Should sorting be centralized in
useReportWithTransactionsAndViolations so all consumers benefit?
Platforms
Issue Owner
Current Issue Owner: @abelhailefen
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022033929183187241566
- Upwork Job ID: 2033929183187241566
- Last Price Increase: 2026-03-17
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/603735
Slack conversation: https://expensify.slack.com/archives/C03U7DCU4/p1771944902661119?thread_ts=1771944902.661119&cid=C03U7DCU4
Action Performed
Expected Result
The expense that requires action (has RBR) should appear first in the carousel so the user can immediately identify and act on it.
Actual Result
Expenses appear in backend insertion order. RBR-flagged expenses can be buried at position 5+ in the carousel, making them easy to miss entirely — especially since only the first 11 are shown.
Root Cause
There is no RBR-aware sorting anywhere in the transaction display path:
MoneyRequestReportPreviewContent.tsx:~506doestransactions.slice(0, 11)with no sort beforehand.MoneyRequestReportTransactionList.tsx:~325sorts by date/column only;visualOrderTransactionIDs(which drives RHP carousel navigation) inherits this non-RBR-aware order.The data flows from Onyx derived store →
Object.values()(insertion order) → carousel/list — no step prioritizes actionable items.Proposed Fix
Sort RBR-flagged transactions to the front in both locations:
transactionsby RBR status before the.slice(0, 11)inMoneyRequestReportPreviewContent.MoneyRequestReportTransactionList, with the existing date/column sort as secondary.Existing infrastructure to reuse
shouldShowRBRfromTransactionPreviewUtils.createTransactionPreviewConditionals()filteredViolationsalready computed per-transaction inMoneyRequestReportTransactionList(~lines 216-237)SidebarUtils.ts:~533Open Questions
useReportWithTransactionsAndViolationsso all consumers benefit?Platforms
Issue Owner
Current Issue Owner: @abelhailefenUpwork Automation - Do Not Edit