Virtualize the transaction list and use cursor pagination so accounts with thousands of transactions stay smooth and memory-light.
Requirements and Context
frontend/components/TransactionList.tsx and the transactions page render transaction history in a plain list. Large accounts (thousands of rows) cause slow initial renders and high memory use, and the current pagination is not cursor-based, so deep-page navigation is O(n) and can skip/duplicate rows when new transactions arrive.
Objectives
- Add cursor-based pagination (e.g.,
?cursor=...) to the transaction fetch path.
- Virtualize
TransactionList (windowed rendering, e.g., a lightweight virtualizer or react-window).
- Preserve filters/search (
TransactionSearchBar.tsx, frontend/lib/transactionSearch.ts) across pagination.
- Add performance tests/assertions (render time / memory) for a large synthetic dataset.
Suggested Execution
git checkout -b feat/virtualized-transactions.
- Implement cursor pagination in
frontend/lib/api.ts and the transactions page.
- Virtualize
TransactionList.tsx and keep the highlighted-row/actions intact.
- Add
frontend/__tests__/transactionPagination.test.ts and run npm run type-check && npm test.
Acceptance Criteria
Guidelines
- Verify the virtualizer is a11y-friendly (keyboard navigation, screen-reader announcements).
- Do not regress existing transaction actions (tags, export, receipts).
Timeframe: 96 hours
Requirements and Context
frontend/components/TransactionList.tsxand the transactions page render transaction history in a plain list. Large accounts (thousands of rows) cause slow initial renders and high memory use, and the current pagination is not cursor-based, so deep-page navigation is O(n) and can skip/duplicate rows when new transactions arrive.Objectives
?cursor=...) to the transaction fetch path.TransactionList(windowed rendering, e.g., a lightweight virtualizer orreact-window).TransactionSearchBar.tsx,frontend/lib/transactionSearch.ts) across pagination.Suggested Execution
git checkout -b feat/virtualized-transactions.frontend/lib/api.tsand the transactions page.TransactionList.tsxand keep the highlighted-row/actions intact.frontend/__tests__/transactionPagination.test.tsand runnpm run type-check && npm test.Acceptance Criteria
Guidelines
Timeframe: 96 hours