Skip to content

Paginate the post archive at 25 instead of 250 - #1964

Merged
wintermeyer merged 1 commit into
mainfrom
archive-pagination
Sep 3, 2026
Merged

Paginate the post archive at 25 instead of 250#1964
wintermeyer merged 1 commit into
mainfrom
archive-pagination

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

250 items per page is the site-wide figure for listing pages whose item is one row. On /:slug/posts every item is a full post card, and a reply draws the card it answers — so 93 entries became 258 cards and a 3.5 MB document (measured on a copy of production: 136 ms of render locally, about 1.3 s on the production machine).

posts/page HTML render
250 3,455,755 B 136 ms
25 293,271 B 16 ms

The agent-format siblings and /api/2.0 deliberately keep 250: neither document carries a next-page pointer, so a smaller page would not paginate them, it would silently hand a reader of /posts.json a quarter of the archive with a total saying otherwise.

Two things the pager was missing, now that it actually shows up:

  • it is handed the same page size the query used, or the page count and the rows disagree;
  • a page link keeps the type filter — a reader paging through "Replies" landed back on "All" at page two.

The header now says how much there is to page through, shown only when there is more than one page.

Where: VutuvWeb.PostController.index/2, Vutuv.Posts.author_posts_per_page/0.

An AI agent wrote this text in my name. I know that is problematic.

https://claude.ai/code/session_015uHLPurrJ61uaUE9G7d5xY

250 Einträge pro Seite ist die seitenweite Zahl für Listen, deren Eintrag eine
Zeile ist; hier ist jeder Eintrag eine ganze Beitragskarte, und eine Antwort
zeichnet die Karte mit, die sie beantwortet. Gemessen an einer Kopie der
Produktion wurden aus 93 Einträgen 258 Karten und 3,5 MB Dokument (136 ms
lokal, gut 1,3 s auf der Produktionsmaschine); mit 25 sind es 293 kB und
16 ms. Die Agentenformate und /api/2.0 behalten die 250 mit Absicht: keines
der beiden Dokumente trägt einen Zeiger auf die nächste Seite, eine kleinere
Seite würde sie also nicht blättern, sondern still abschneiden.

Der Blätterer bekommt dieselbe Seitengröße gereicht wie die Abfrage, sonst
widersprechen sich Seitenzahl und Zeilen, und der Typfilter reist jetzt mit:
wer „Antworten" las, landete auf Seite zwei wieder bei „Alle". Über den
Karten steht, wie viel es insgesamt ist — ein Blätterer, der „1 2 3 4" anbietet,
sagt sonst, wie weit man gehen kann, aber nicht, wie weit man muss.

Diesen Text hat ein KI-Agent in meinem Namen geschrieben. Ich weiß, dass das
problematisch ist.

Claude-Session: https://claude.ai/code/session_015uHLPurrJ61uaUE9G7d5xY
@wintermeyer
wintermeyer merged commit 1ed2b4f into main Sep 3, 2026
1 check passed
@wintermeyer
wintermeyer deleted the archive-pagination branch September 3, 2026 07:52
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