Skip to content

[Due for payment 2026-08-19] Dedupe getTransactionsForReport lookups in Search row Action column #97975

Closed

Description

@mountiny

Problem

useLiveRowCapabilities runs once per Search list row, and for report rows it called getTransactionsForReport(data, reportID) twice per render — once inside getActions and again inside getPrimaryAction. Each of those calls scans every key of the search snapshot, so fast-scrolling the expenses list burned significant JS time re-deriving the same transaction list for every visible row, and produced blank rows.

Solution

Add getTransactionsByReportID(data) to SearchUIUtils, which groups the snapshot's transactions by reportID in a single pass using the same grouping rule processTransactionEntry already applies inside classifyAndPreprocess. SearchResultsProvider computes it once per snapshot and exposes currentSearchTransactionsByReportID on the existing SearchResultsContext, where the React Compiler memoizes it on data identity so it recomputes only when the snapshot changes. The hook then looks up its own report's transactions and passes them into getActions (through the already-present but previously unused precomputedTransactionsForReport param) and into getPrimaryAction (a new optional param of the same name), with getTransactionsForReport kept as the fallback when no precomputed array is supplied. Behavior is unchanged: all three call sites already sourced snapshotData from the same context, transaction rows never hit this lookup, and every other caller of getTransactionsForReport is untouched.

PR

#97877

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. changed the title [-]Dedupe getTransactionsForReport lookups in Search row Action column[/-] [+][Due for payment 2026-08-19] Dedupe getTransactionsForReport lookups in Search row Action column[/+] on Aug 12, 2026
  2. melvin-bot commented on Aug 12, 2026

    @melvin-bot

    @parasharrajat

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.52-11 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-08-19. 🎊

    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]

  3. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  4. parasharrajat commented on Aug 13, 2026

    @parasharrajat
    Member

    No checklist needed here. It was speed optimization.

  5. melvin-bot commented on Aug 18, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
  6. melvin-bot commented on Aug 18, 2026

    @melvin-bot

    @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

  7. mallenexpensify commented on Aug 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @parasharrajat due $250 via NewDot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2Task

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions