Skip to content

Show the whole poll archive, not the first 50 - #108

Merged
ssavutu merged 1 commit into
mainfrom
fix/polls-archive-pagination
Sep 4, 2026
Merged

Show the whole poll archive, not the first 50#108
ssavutu merged 1 commit into
mainfrom
fix/polls-archive-pagination

Conversation

@ssavutu

@ssavutu ssavutu commented Sep 4, 2026

Copy link
Copy Markdown
Member

/v1/polls answers 50 at a time unless asked otherwise, and getPolls sent no limit, so the archive page rendered 50 of the 179 polls it should have. The missing ones were unreachable by any means — there is no "load more", so scrolling would not have revealed them either.

Page through with limit and offset until a short page comes back, rather than asking for one large number: the endpoint caps a request at 200, so a single big limit would only move the cliff rather than remove it.

A failure part-way through keeps the pages already read instead of returning empty, so a mid-walk blip degrades the archive rather than blanking it. Only the first page still falls back to empty.

Testing

astro check — 0 errors. Verified against the live CMS that the paging walks all 179 polls and stops on the short page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q11ahEMb1HbNDmkd7gwRpr

/v1/polls answers 50 at a time unless asked otherwise, and getPolls sent no
limit, so the archive page rendered 50 of the 179 polls it should have. The
missing ones were unreachable by any means -- there is no "load more" for
scrolling to reveal.

Page through with limit and offset until a short page comes back, rather than
asking for one large number: the endpoint caps a request at 200, so a single
big limit would only move the cliff rather than remove it.

A failure part-way through keeps the pages already read instead of returning
empty, so a mid-walk blip degrades the archive rather than blanking it. Only
the first page still falls back to empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q11ahEMb1HbNDmkd7gwRpr
@ssavutu
ssavutu merged commit 2f090a6 into main Sep 4, 2026
1 check passed
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.

1 participant