Problem
getSections performs a parallel double-merge of live Onyx data (policies, allTransactionViolations) that the Search row layer already self-hydrates. That redundant screen-level merge cascades into Search jank by widening useMemo dependencies and triggering unnecessary section recomputation.
Solution
Removed policies and allTransactionViolations from getSections / getReportSections, since rows already resolve this data locally. ExpenseReportListItem now recomputes the violations badge at the row using live policy, transactions, and a scoped per-row violations selector (with snapshot fallback before hydration). Report avatars in getReportSections now derive from snapshot policy instead of live-merged policies — the one accepted staleness tradeoff, aligned with other getSections callers.
PR
#93271
Issue Owner
Current Issue Owner: @mallenexpensify
Problem
getSectionsperforms a parallel double-merge of live Onyx data (policies,allTransactionViolations) that the Search row layer already self-hydrates. That redundant screen-level merge cascades into Search jank by wideninguseMemodependencies and triggering unnecessary section recomputation.Solution
Removed
policiesandallTransactionViolationsfromgetSections/getReportSections, since rows already resolve this data locally.ExpenseReportListItemnow recomputes the violations badge at the row using live policy, transactions, and a scoped per-row violations selector (with snapshot fallback before hydration). Report avatars ingetReportSectionsnow derive from snapshot policy instead of live-merged policies — the one accepted staleness tradeoff, aligned with othergetSectionscallers.PR
#93271
Issue Owner
Current Issue Owner: @mallenexpensify