Skip to content

[Due for payment 2025-08-22] [$250] Use derived values for report-specific transaction violations #67166

@mountiny

Description

@mountiny

Coming from here

Background

The Expensify app has a derived value system that groups transactions and violations by reportID for performance optimization. Currently, MoneyReportHeader, ReportActionsList, and DebugReportPage components fetch entire collections using useOnyx(ONYXKEYS.COLLECTION.TRANSACTION) or useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS) and then manually filter or select for their specific report data.

Problem

When components fetch entire transaction collections and manually filter for report-specific data, it causes unnecessary memory usage and processing overhead, which prevents efficient utilization of the existing derived value system.

Solution

Replace collection queries with useTransactionsAndViolationsForReport(reportID) in all three components. This leverages existing derived value infrastructure and eliminates redundant filtering operations.
Draft PR: #67154

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021948734741936725013
  • Upwork Job ID: 1948734741936725013
  • Last Price Increase: 2025-07-25
Issue OwnerCurrent Issue Owner: @bfitzexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions