Paginate the post archive at 25 instead of 250 - #1964
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
250 items per page is the site-wide figure for listing pages whose item is one row. On
/:slug/postsevery 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).The agent-format siblings and
/api/2.0deliberately 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.jsona quarter of the archive with atotalsaying otherwise.Two things the pager was missing, now that it actually shows up:
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