Repository navigation
Report has_more and next_link on paged lists - #117
Merged
Merged
Conversation
List commands without --all-pages fetched one page and printed it with
success true, discarding Graph's @odata.nextLink. A caller could not
tell a complete collection from a truncated one, nor resume: `teams chat
list --page-size 1` looked the same whether one chat existed or fifty.
get_paged and get_paged_without_top now return a Page { items,
next_link }; list API wrappers pass it through and CLI list commands
print it with output::print_success_page. JSON metadata gains has_more
and, when true, next_link (the existing, previously unused field).
--all-pages gives has_more false. data is unchanged. Human and plain
output print "More results available; use --all-pages" on stderr, so
stdout stays parseable. Envelope docs (README, docs/README.md,
teams-agent-contract.7) describe the fields.
Tests: wiremock tests of get_paged for a truncated page (next_link
kept), the last page (none) and --all-pages (links followed, none);
output tests for has_more/next_link in the envelope and for data
matching the plain list envelope.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hd5XXx9UkpLZpAAkvPPyUg
Merged
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.
List commands without
--all-pagesdropped@odata.nextLink, so 50 results looked like the whole collection. JSON output now says whether there is more.Behaviour changes:
metadata.has_more, plusmetadata.next_linkwhen there is more.datais unchanged, and--all-pagesreports false.searchanduser resolvepage separately and don't report it yet.Review guide: one commit,
0c0ed40. The interesting parts areget_pagedinsrc/api/client.rsand the envelope insrc/output/mod.rs; the rest is mechanical.Testing: two-page mock tests. Checked live with
chat list --page-size 5.https://claude.ai/code/session_01Hd5XXx9UkpLZpAAkvPPyUg