Skip to content

Caps pagination never links to the last page #3566

Description

@AryaKesharwani

Description

The Caps pagination never links to the last page, and some pages can't be reached except by stepping through Previous/Next.

CapPagination only renders page 1, the current page and the page after it, then an ellipsis after them. With 57 Caps (4 pages of 15):

Viewing Links shown Problem
Page 1 1 2 Next no way to jump to page 4
Page 3 Prev 1 3 … Next page 2 only via Prev; ellipsis after the last link
Page 4 Prev 1 4 … Next Next links back to page 4

The same component is used by space pages (SharedCaps.tsx) and public collections (/c/[id]).

Reproduction

  1. Have more than 45 Caps (4+ pages).
  2. Open My Caps and look at the pagination bar; then open ?page=3 and ?page=4.

Expected: first and last page always linked, neighbours of the current page shown, ellipsis only where pages are skipped, no Next on the last page.

Additional Context

  • Cap version: web, main at 197db2b
  • Reproduced in a local self-hosted web build (Chromium). apps/web/app/(org)/dashboard/caps/components/CapPagination.tsx.

Activity

  1. linear commented on Oct 29, 2026

    @linear
  2. ghazy2001 commented on Oct 29, 2026

    @ghazy2001
    Contributor

    I've submitted PR #3575 to render complete pagination links (including the last page anchor and neighbours) with unit test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions