Skip to content

fix(cli): expose generated list pagination controls - #22

Open
realmroot[bot] wants to merge 1 commit into
mainfrom
fix/generated-list-pagination-help
Open

realmroot[bot] wants to merge 1 commit into
mainfrom
fix/generated-list-pagination-help

Conversation

@realmroot

@realmroot realmroot Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #15.

Summary

  • Append Realmroot public pagination controls to compact generated operation help, so generated list commands show --no-paginate, --max-pages, and --max-items alongside per-page flags such as --page-size.
  • Explain that generated list operations automatically follow pagination links when available, and distinguish per-page sizing (--page-size/similar operation flags) from total limiting (--max-items).
  • Route Restish pagination warnings through the existing product-vocabulary translation so user-facing diagnostics mention public Toolbox flags instead of --rsh-* internals.
  • Fix rejected-review duplicate help regression by making the generated-help writer flush idempotently when the embedded runtime flushes and runRestish flushes again.
  • Add generated-list coverage for help, actual generated-command help execution wiring with one Usage/Flags/Pagination section, public-to-internal flag translation, first-page/no-paginate with an envelope body, --max-pages=1 warning semantics, and --max-items total item limiting.
  • Stabilize one existing session-cache test by clearing ambient AGENT_SESSION_ID, matching Codex session precedence documented in internal/agent tests.

Reviewer Journey

  1. Inspect internal/cli/cli.go around operationHelpWriter.Flush: the writer resets its buffer and only emits once, so Restish internal flush plus runRestish post-run flush cannot duplicate help.
  2. Inspect appendGeneratedPaginationHelp: it documents Toolbox pagination controls for generated operation help and explicitly says list operations auto-paginate when pagination links are available.
  3. Inspect internal/cli/cli_test.go: TestGeneratedOperationHelpExecutionPrintsPaginationOnce runs generated list-tasks --help through the embedded runtime/writer wiring and asserts exactly one Usage, Flags, and Pagination section.
  4. Inspect TestEmbeddedGeneratedListPaginationUsesTranslatedProductFlags: the fixture now returns a page-envelope body (items) and configures Pagination.ItemsPath, covering first-page/no-paginate and total --max-items behavior on envelope responses.

Checks

  • go test ./internal/cli -run 'Test(ParseToolboxFlagsTranslatesPaginationControls|GeneratedListHelpDocumentsProductPaginationControls|GeneratedOperationHelpExecutionPrintsPaginationOnce|ProductVocabularyWriterRewritesPaginationWarnings|EmbeddedGeneratedListPaginationUsesTranslatedProductFlags)' -count=1 -v\n- go run . toolbox agent-kanban task list-tasks --help (exit 0; one Usage/Flags/Pagination section)\n- go test ./internal/cli\n- go build ./...\n- AGENT_SESSION_ID= go test ./...\n\nNote: plain go test ./... in this Codex session inherits AGENT_SESSION_ID and fails existing internal/agent session-isolation tests that vary CODEX_THREAD_ID; clearing AGENT_SESSION_ID matches their intended isolated environment.\n\nBase SHA: 7964480\nHead SHA: 4f70c9c

🤖 Created by Cedar via Realmroot

@realmroot
realmroot Bot force-pushed the fix/generated-list-pagination-help branch from 2dd737d to 44a8118 Compare September 13, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toolbox: generated list help omits automatic pagination controls

0 participants