Skip to content

[BUG] Reader dashboard missing pagination on donation query #67

@realproject7

Description

@realproject7

Problem

PR #63 (Reader Dashboard) queries donations without .limit(). If a user has 1000+ donations, this will:

  • Fetch all rows into browser memory
  • Render all DOM nodes
  • Cause performance degradation
  • Risk hitting Supabase rate limits

The total aggregation (reduce over all results) also depends on the full fetch, so adding a limit later will make the total inaccurate unless computed server-side.

Fix

  • Add .limit(50) (or similar) to the donation query
  • Add "load more" or pagination indicator if limit reached
  • Move total donation aggregation to a Supabase RPC or computed column, OR accept that total only reflects displayed page
  • npm run lint and npm run typecheck pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions