Skip to content

feat(dashboard): refactor transaction history with virtualization and server pagination - #357

Open
lemarjohnny781 wants to merge 1 commit into
kellymusk:mainfrom
lemarjohnny781:transaction-history-virtualization
Open

feat(dashboard): refactor transaction history with virtualization and server pagination#357
lemarjohnny781 wants to merge 1 commit into
kellymusk:mainfrom
lemarjohnny781:transaction-history-virtualization

Conversation

@lemarjohnny781

@lemarjohnny781 lemarjohnny781 commented Jul 26, 2026

Copy link
Copy Markdown

Summary

This PR refactors the transaction history dashboard to improve performance, maintainability, and support real backend data. It separates business logic from presentation, adds virtualization for mobile transaction cards, and introduces server-side pagination support for larger datasets.

Changes

  • Extracted inline mock transactions and quick filters into lib/fixtures/transactions.ts
  • Moved transaction filtering, sorting, and pagination logic into hooks/use-transaction-history.ts
  • Updated components/dashboard/transaction-history.tsx to consume the hook and render a virtualized mobile transaction list using @tanstack/react-virtual
  • Added server-side pagination support via isServerPaginated, totalCount, and onPageChange props
  • Added regression coverage in hooks/__tests__/use-transaction-history.test.ts
  • Updated package.json / package-lock.json to include @tanstack/react-virtual

Testing

  • npm test -- --runInBand hooks/__tests__/use-transaction-history.test.ts
  • npx tsc --noEmit --pretty false

Notes

This work prepares the dashboard for real transaction volumes by reducing render cost on mobile and enabling backend-driven pagination with consistent UI behavior.

closes #320

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@Olisachukwuma1 is attempting to deploy a commit to the kelly musk's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Closing without merging: main already implements this PR's goal (transaction history virtualization + server-side pagination) independently — see components/dashboard/transaction-history.tsx (custom useVirtualList + VIRTUAL_THRESHOLD) and hooks/use-swr-infinite pagination against /api/dashboard/transactions. This PR's branch predates that work and merging it would regress the existing implementation rather than improve it.

@kelly-musk kelly-musk closed this Jul 31, 2026
@kelly-musk kelly-musk reopened this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UX] Add 'Coming soon' indicator to incomplete features visible in UI

3 participants