Coming from a proposal here
Background:
The Search page is the primary tool for accountants and admins to view, filter, and manage large volumes of transaction data. Users frequently interact with this page by toggling filters (e.g., changing status from “all” to “approved”) or selecting multiple items for bulk action. These lists often contain nested transaction groups (e.g., expense reports containing multiple individual expenses), requiring the interface to render complex data structures rapidly to maintain a fluid user experience.
Problem:
When a user viewing a large number of results on the Search page changes a filter or selects an item, the main JavaScript thread blocks for ~1.2 seconds, causing the UI to freeze and become unresponsive.
Solution:
The Search list rendering logic is refactored to decouple selection state from the data mapping process.
Selection logic is moved out of the heavy, memoized data-sorting function and into the lighter render phase. Specifically, selectedTransactions is removed from the main useMemo dependencies, and a “fast path” iterator is implemented to skip unnecessary nested loops for unselected items. This ensures that interacting with filters or checkboxes only triggers a visual update for the relevant rows, rather than a full recalculation of the entire list.
Draft PR: #76339
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021995530275448081060
- Upwork Job ID: 1995530275448081060
- Last Price Increase: 2025-12-01
Issue Owner
Current Issue Owner: @dominictb
Coming from a proposal here
Background:
The Search page is the primary tool for accountants and admins to view, filter, and manage large volumes of transaction data. Users frequently interact with this page by toggling filters (e.g., changing status from “all” to “approved”) or selecting multiple items for bulk action. These lists often contain nested transaction groups (e.g., expense reports containing multiple individual expenses), requiring the interface to render complex data structures rapidly to maintain a fluid user experience.
Problem:
When a user viewing a large number of results on the Search page changes a filter or selects an item, the main JavaScript thread blocks for ~1.2 seconds, causing the UI to freeze and become unresponsive.
Solution:
The Search list rendering logic is refactored to decouple selection state from the data mapping process.
Selection logic is moved out of the heavy, memoized data-sorting function and into the lighter render phase. Specifically, selectedTransactions is removed from the main useMemo dependencies, and a “fast path” iterator is implemented to skip unnecessary nested loops for unselected items. This ensures that interacting with filters or checkboxes only triggers a visual update for the relevant rows, rather than a full recalculation of the entire list.
Draft PR: #76339
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dominictb