fix(output): render truncation footer for nested tables via a pagination sibling - #87
Merged
Conversation
…ion sibling Nested TableColumn::nested arrays hardcoded None for render_table's pagination argument, so they could never show the "(N of M rows, ...)" footer a top-level paginated array gets. A nested array's parent object can now carry a `pagination` sibling field shaped like PaginationMeta (the same type Envelope::pagination already uses), which gets deserialized and threaded through render_table's existing footer logic. Fixes DEVEX-985.
There was a problem hiding this comment.
Pull request overview
This PR fixes human-output rendering so TableColumn::nested(...) child tables can show the same truncation/pagination footer as top-level paginated tables, by reading a pagination sibling (deserializable as PaginationMeta) on the object that owns the nested array.
Changes:
- Thread nested pagination metadata into nested-table rendering by resolving a
paginationsibling next to the nested array field. - Add unit tests in
human.rsfor resolving the parent object, deserializing nested pagination, and verifying footer output (present/absent/malformed). - Add an integration test proving the footer renders correctly through
Cli::run, and update docs to describe thepaginationsibling convention.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cli-engine/src/output/human.rs | Resolves a nested array’s parent object, deserializes an optional pagination sibling as PaginationMeta, and passes it into existing table footer rendering; adds unit tests. |
| cli-engine/tests/consumer_cli.rs | Adds an integration test ensuring nested child tables render the (N of M rows, offset O, limit L) footer when pagination is provided. |
| cli-engine/docs/concepts.md | Updates nested-table documentation and example output to reflect the new pagination sibling behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
qcai-godaddy
approved these changes
Aug 5, 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
TableColumn::nestedarrays never rendered a"(N of M rows, offset O, limit L)"truncation/pagination footer —render_nested_valuehardcodedNoneregardless of what data sat next to the nested array (DEVEX-985).paginationsibling field shaped likePaginationMeta(total/offset/limit/count/has_more) — the exact same typeEnvelope::paginationalready uses at the top level — which gets deserialized and threaded throughrender_table's existing footer logic. No new bespoke convention, noTableColumn/Envelope/PaginationMetaAPI changes.paginationsibling, or one that fails to deserialize asPaginationMeta, keeps today's plain"(N rows)"footer.Test plan
cargo fmt --all --checkcargo clippy --all-targets -- -D warningsRUSTDOCFLAGS='-D warnings' cargo doc --no-depscargo test --all-targets(0 failed across all binaries)cargo test --doccargo rustdoc --lib -- -W missing-docs(zero warnings)cli-engine/src/output/human.rscoveringresolve_field_parent,resolve_nested_pagination(present/absent/malformed sibling), and end-to-endrender_object_with_columnsfooter textcli-engine/tests/consumer_cli.rsproving the fix throughCli::runJira: DEVEX-985
🤖 Generated with Claude Code