Skip to content

UX-16: Add cursor pagination to global search endpoint #610

@Chris0Jeky

Description

@Chris0Jeky

Context

The global search endpoint (GET /api/search?q=) added in PR #603 has hard-coded result limits (10 boards, 20 cards) but no cursor or offset pagination. The endpoint also accepts a maxResults parameter that is currently ignored by the search logic.

For the current state of the product (single-user, moderate board count), this is fine. But as workspace size grows — especially if multi-tenancy or collaboration features land — users may need to page through search results.

Proposal

  1. Wire the existing maxResults parameter to actually control result limits (or remove it from the API contract if it's not intended to be used)
  2. Add optional offset/cursor pagination for card results (board results are unlikely to exceed 10 for most users)
  3. Return a hasMore flag or total count so the frontend can show "see more results"

Why Priority IV

Hard limits prevent unbounded queries. This is a scalability improvement for future growth, not a current blocker. No user has hit the 20-card limit yet.

Acceptance Criteria

  • maxResults parameter either wired or removed from API contract
  • Card search supports offset or cursor pagination
  • Frontend useGlobalSearch composable handles paginated responses
  • Backend + frontend tests updated

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions