Repository navigation
Description
Background
MoneyRequestReportView renders the money request report screen with the transactions table and the report actions chat feed. Onyx pushes updates to it continuously (chat messages, transaction changes), and the components derive everything they render: sorting, grouping, violations, columns, selection state.
The view is made of two very large components:
MoneyRequestReportActionsList.tsx— 817 linesMoneyRequestReportTransactionList.tsx— 1138 lines
Problem
When a money request report is open, any Onyx update that touches the report (opening it, sending a message, a background sync) makes both list components re-derive and re-render everything. Measured cost: ~1.5s of total re-render time on report open, ~1.0s per message send cycle.
Solution
Decompose both components into small, single purpose hooks and presentational components that the React Compiler can compile and memoize, so each Onyx update re-runs only the derivation chain it affects.
The complete end state is implemented and measured on branch decompose/money-request-report-transaction-list. Land it as ten small, independently mergeable PRs, each a pure refactor with no behavior change.
The tracks are sequential only because Track B reuses Track A's extraction patterns and perf test setup. Pausing between any two PRs leaves main consistent.
Track A: refactor MoneyRequestReportActionsList
- PR A0: add performance test. The reassure perf test with Onyx seeding, derived value registration, and the mount + update (send message and unrelated report) scenarios.
- PR A1: extract
MoneyRequestReportEmptyStateView. Small presentational component (~45 lines). Trims the empty state branch out of the monolith. - PR A2: extract
useMoneyRequestReportVisibleActionsand adaptuseMarkAsRead/useUnreadMarker. Moves the visible actions filtering into a hook and makes the two shared chat hooks consumable from this view. - PR A3: extract
useMoneyRequestReportPagination. Older and newer action loading cursors,onStartReachedandonEndReached. - PR A4: extract
useMoneyRequestReportScroll. Scroll tracking, floating message counter, viewability, and scroll to latest. - PR A5: extract
useMoneyRequestReportData.
Track B: refactor MoneyRequestReportTransactionList (after Track A)
- PR B1: extract presentational components.
MoneyRequestReportGroupByButton,MoneyRequestReportTableHeaderRow,MoneyRequestReportListFooter. - PR B2: extract
useMoneyRequestReportColumnsanduseMoneyRequestReportLayout. Column visibility and sizing, plus the group by layout state. - PR B3: extract the transaction data derivation chain.
useMoneyRequestReportSortedTransactions,useMoneyRequestReportGroupedTransactions,useMoneyRequestReportActiveTransactionIDs: sorting, violations, grouping, visual order. - PR B4: extract
useMoneyRequestReportTransactionSelectionanduseMoneyRequestReportPendingExpense, then finish wiring. Selection state, pending expense placeholder, and the final unified list controller shape.
Measured impact (iOS simulator)
Warm report open:
ManualOpenReportspan: 791ms to 607ms (−23%)- Total re-render time: 1517ms to 1239ms (−18%)
Message send:
- Total re-render time: 1008ms to 743ms (−26%)
- Track A alone cuts the send and type cycle by ~10.8% (~90ms)
ManualSendMessageVisiblespan: no significant change (743ms vs 706ms, within noise)
References
- Draft PR containing the final state: Decompose MoneyRequestReportTransactionList into hooks
- Slack proposal: https://expensify.slack.com/archives/C05LX9D6E07/p1787906343916249
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Sep 8, 2026
@mountiny @sosek108
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.73-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
81 remaining items
suneox commentedon Oct 9, 2026
Linked deploy blockers
All three deploy blockers linked to this issue were caused by PRs outside it:
Neither #98744 nor #100735 is among this issue's resolving PRs, so the reduction doesn't apply here.
mallenexpensify commentedon Oct 13, 2026
Payment Summary
Contributor+: @suneox due $250 via NewDot
This issue is a bit messy, assuming payment is correct, if not, and/or if anyone else is due payment please comment. Never seen so many resolving PRs before
suneox commentedon Oct 14, 2026
Price increase request
@mallenexpensify The summary pays this as one $250 review job, but this issue was executed as a 10 slice PR stack. The payment should be the same as one of these PRs: #100025 (comment)
Mandatory
Proposed amount: $2,000
Why the work exceeded the issue: The issue asked for one decomposition refactor, which reads as a single review, but it shipped as 10 sequenced PRs over 4 weeks and I reviewed 8 of them, several through a second round after author updates. Because every slice stripped manual
useCallback/useMemo/memo(), perf check from the same hot report view, each review had to confirm the React Compiler still memoized everythingRegressions caused by this PR: None, all 3 linked deploy blockers were caused by PRs outside this issue, analysis here: #99919 (comment)
Optional
Multiple PRs: 8 reviews, each with its own checklist:
#100024 (A1, merged 09-09) — #100030 (A3, 17-09) — #100033 (A4, 22-09) — #100035 (A5, 24-09)
#101199 (B1, merged 17-09) — #101200 (B2, 21-09) — #101201 (B3, 24-09) — #101202 (B4, 29-09)
mallenexpensify commentedon Oct 14, 2026
@mountiny 👀 above on the price increase request plz.
mountiny commentedon Oct 15, 2026
Ok I think that is fine!
mallenexpensify commentedon Oct 16, 2026
Payment Summary
Contributor+: @suneox due $2,000 via NewDot
garrettmknight commentedon Oct 19, 2026
$2000 approved for @suneox