Skip to content

Add pagination to observation list #7

Description

@bgorzelic

Problem

getObservations() currently fetches ALL observations for a user with no limit. As users accumulate observations over multiple fire seasons, this will degrade dashboard load times and increase database costs.

Proposed Implementation

  • Add page and pageSize parameters to getObservations()
  • Default page size: 20 observations
  • Add pagination controls below the observations table (Previous / Page N of M / Next)
  • Show total count from getObservationStats() (already exists)
  • URL-based pagination: /dashboard?page=2
  • Mobile: same pagination controls below card list

Acceptance Criteria

  • Dashboard loads only 20 observations per page
  • Pagination controls visible at bottom of table
  • URL updates with page number (shareable/bookmarkable)
  • Page 1 loads by default
  • Total observation count still accurate in stats cards
  • Works on both desktop table and mobile card views
  • Empty state still shows when no observations exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumMedium priority — important but not blockingarea: webNext.js web app (apps/web)size: SSmall — a few hourstype: performancePerformance optimization

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions