Skip to content

Conversation

@giordano-lucas
Copy link
Member

@giordano-lucas giordano-lucas commented Feb 10, 2026

Expose --page, --page-size, and resource-specific filter flags (--only-active, --only-saved, --name) on all 7 paginated list commands so CLI users can paginate results and filter server-side instead of always fetching the first page with defaults.

Greptile Overview

Greptile Summary

This PR threads pagination (--page, --page-size) and resource-specific filters (e.g. --only-active, --only-saved, --name) through all paginated list commands by adding shared flag helpers in internal/cmd/pagination.go and wiring the resulting optional params into the generated API client request structs. It also updates CLI docs (README + skill references) and adds a unit test to ensure the expected flags are exposed on each list command.

The main functional risk is around pagination semantics: the flags are documented as 1-indexed, but defaults/validation currently allow 0, which can lead to server-side errors or surprising behavior depending on how the API interprets omitted vs zero values.

Confidence Score: 4/5

  • Mostly safe to merge once pagination value semantics are clarified/validated
  • The changes are largely mechanical flag wiring and documentation updates, but pagination defaults/validation (1-indexed help text vs allowing 0) can cause incorrect API requests or user confusion; no other clear runtime issues were identified in the diff.
  • internal/cmd/pagination.go

Important Files Changed

Filename Overview
internal/cmd/pagination.go Adds shared pagination flag helpers; currently ignores errors from GetInt() and returns pointers to locals, which can mask flag parsing issues and create ambiguous optional semantics.
internal/cmd/agents.go Wires pagination and new filters into agents list; no obvious runtime bugs found, but filter combination semantics (only-active + only-saved) are not validated.
README.md Docs updated to advertise new pagination/filter flags for list commands; no code impact.
internal/cmd/flags_test.go Adds test asserting paginated list commands expose page/page-size and resource-specific filters; test is presence-only and may not catch invalid defaults.
internal/cmd/functions.go Adds pagination + only-active filters to functions list and runs list params; follows existing param wiring patterns.
internal/cmd/personas.go Adds pagination + only-active filter to personas list; straightforward parameter wiring.
internal/cmd/profiles.go Adds pagination and name filter to profiles list; passes optional Name pointer when flag provided.
internal/cmd/sessions.go Adds pagination + only-active filter to sessions list; straightforward parameter wiring.
internal/cmd/vaults.go Adds pagination + only-active filter to vaults list; straightforward parameter wiring.
skills/notte-browser/SKILL.md Updates skill documentation to show new pagination and filter flags for list commands.
skills/notte-browser/references/account-management.md Adds pagination/filter examples for personas and vaults list commands in reference docs.
skills/notte-browser/references/function-management.md Adds pagination/filter examples for functions list and runs list in reference docs.
skills/notte-browser/references/session-management.md Adds pagination/filter example for sessions list in reference docs.

Expose --page, --page-size, and resource-specific filter flags
(--only-active, --only-saved, --name) on all 7 paginated list commands
so CLI users can paginate results and filter server-side instead of
always fetching the first page with defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@giordano-lucas giordano-lucas self-assigned this Feb 10, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 9 to 12

func getPageFlag(cmd *cobra.Command) *int {
if cmd.Flags().Changed("page") {
v, _ := cmd.Flags().GetInt("page")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid pagination defaults
registerPaginationFlags sets --page and --page-size defaults to 0, but the help string says page is 1-indexed. If a user passes --page 0 (or omits the flag and your API treats nil differently than 0), this can result in server-side validation errors or unexpected paging behavior. Consider either (a) defaulting to 1/a sensible page size, or (b) adding validation to reject values < 1 when the flag is provided.

getPageFlag and getPageSizeFlag now return errors when the user
explicitly passes a value less than 1, preventing invalid requests
to the API since pages are 1-indexed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@giordano-lucas giordano-lucas merged commit 732ee10 into main Feb 10, 2026
6 of 7 checks passed
@giordano-lucas giordano-lucas deleted the feat/add-pagination-flags-to-list-commands branch February 10, 2026 17:56
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.

1 participant