Repository navigation
feat(Assemble): Pagination.linkTotal and lastUnknown - #587
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PMempKsgjiV1NDcCJY
🦋 Changeset detectedLatest commit: 68c2b3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Nov 12, 2026
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
Part 2 of #569 (part 1,
edgePageforwardingquery, merged in #571). Semantics confirmed by gardeneria (gardeneria#1263 O8).Assemble.Pagination.linkTotal?: number: the total the offset pagination links (last, and whethernextexists) are computed from. Defaults tototalCount.meta.totalCountstaystotalCount.Assemble.Pagination.lastUnknown?: boolean(defaultfalse): whentrue,links.lastis omitted (key absent, notnull);self/first/prev/nextstay exact, computed fromlinkTotal. Also applies on an unpageable window (limit <= 0).Assemble.edgePage'sinputgains and forwards both.linkTotal = offset + page.length + (hasMore ? 1 : 0)withlastUnknown: true, sonextexists exactly when there is more. Documented with an executed docgen example oncollection.collectionandedgePageare the only consumers ofPagination(Handlers/GroupcalloffsetPaginationLinksdirectly, unchanged).Closes #569
Verification
Run in the worktree, in AGENTS.md order:
pnpm install --frozen-lockfile: passvp run build: passvp check: pass (0 errors, 5301 warnings, none insrc/Assemble*; a clean-trunk baseline total could not be captured, the lint run on a stashed tree failed before analysis)vp run check: passvp run -r test:unit: pass (root 3997 tests, 64 files)vp run docgen: pass (re-run with--no-cache)vp run test:coveragethenvp exec fallow audit --base origin/trunk: pass, no issues in 3 changed filesChangeset
.changeset/pagination-link-total.md:minorNotes
No published type changes:
Handlers.LinksValue.lastwas already optional, soCollectionDocument.linksalready allowslastto be absent. The newPaginationmembers are additive and spelledreadonly x?: Tper the owner rule.@since 0.22.0. Does not touch the capabilities code (#567).Generated by Claude Code