docs(loops): document the server-rendered loop page query parameter - #396
Open
asachs01 wants to merge 1 commit into
Open
docs(loops): document the server-rendered loop page query parameter#396asachs01 wants to merge 1 commit into
asachs01 wants to merge 1 commit into
Conversation
An infinite-mode loop already renders any page of its own results from `?loop_<loopNodeId>_page=N` — loopPrefetch.ts builds and reads the param, and publicRouter.ts routes requests carrying it past the Layer A artefact into a live render. The parameter is documented today only as a cache-invalidation input, in architecture.md, server.md, publisher.md and reference/architecture-tests.md. features/loops.md — the doc a page author reads, and the one that describes the pagination modes — never mentions it, and its Pagination section instead recommends a manual one-loop-node-per-page workaround for exactly the case the parameter already covers. Documents the parameter with its four real constraints (infinite-only, no contextual sources, empty render past the end, no exposed total) so the section does not promise a numbered paginator the runtime cannot support.
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.
Summary
An infinite-mode loop already server-renders any page of its own results from
?loop_<loopNodeId>_page=N.loopPageQueryKeybuilds the name (server/publish/loopPrefetch.ts:177),readPageNumberreads it (:204), andpublicRouter.ts:224-240deliberately routes any request carrying it past the Layer A disk artefact into a live Layer B render.The parameter is not undocumented — but it is documented only as a cache-invalidation input, in
docs/architecture.md:240,docs/server.md:487,docs/features/publisher.md:19,384,474anddocs/reference/architecture-tests.md:202. All six describe how it affects the fast path, none mention that it renders a different page.docs/features/loops.md— the doc a page author actually reads, and the one that describes the pagination modes — never mentions it. Its "Pagination" section instead recommends a manual workaround for precisely the case the parameter already covers:This adds a
### Deep-link to a loop pagesubsection next to that one, and points the existing bullet at it.What it documents
The mechanism, plus the four constraints that bound it — deliberately, so the section cannot be read as promising a numbered paginator:
pagination: 'infinite', silently ignored otherwiseloopPrefetch.ts:229entry.field)loopPrefetch.ts:292-299,renderLoop.ts:155-159renderLoop.ts:78-80renderLoop.ts:111-116,server/handlers/cms/loop.ts:131,169src/modules/base/loop/index.ts:17-23says numeric pagination will live in a futurebase.paginationmodule, so perdocs/CONVENTIONS.mdrule 8 nothing here describes that as existing.Also in the same change, since they belong to the same section:
canonicalRenderQuery.test.tsandstatic-artefact-served-before-render.test.tsadded to the "Gate tests" list, andpublicRouter.tsto the source-of-truth list (rule 4).Verification
Docs-only — no code changed, so no new test. Claims were checked against the source at
6b055cf7and against the existing suites:and the canonicalisation claim directly:
File is 531 lines, within the ~600 cap. No nav registration needed —
docs/README.mdindexes files, not subsections.Note
#350 also touches
docs/features/loops.md, but adds a subsection around line 265; this one lands in the Cookbook at 460+. They should not conflict.Happy to cut the "Forbidden patterns" row or the gate-test lines if you would rather keep this to the new subsection alone.