Skip to content

Comments

refactor: delete total_count and remaining_count from pagination results#117

Merged
jason-rl merged 6 commits intomainfrom
jason/remove_total_remaining_count
Feb 19, 2026
Merged

refactor: delete total_count and remaining_count from pagination results#117
jason-rl merged 6 commits intomainfrom
jason/remove_total_remaining_count

Conversation

@jason-rl
Copy link
Contributor

@jason-rl jason-rl commented Feb 17, 2026

Description

Note: PR titles should follow Conventional Commits format (e.g., feat(devbox): add support for custom env vars or fix(snapshot): resolve pagination issue) as they are used for automatic release notes generation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test updates

Related Issues

Closes #

Changes Made

  • Make our TUI pagination and CLI list subcommand no longer use total_count and remaining_count from our API since it will be deprecated
  • Make our TUI pagination keep track of # of items seen so far (when scrolling to previous page, it shouldn't decrease). However, this isn't necessarily equal to total number of items that exist
  • Add --limit option to list subcommands of blueprints and snapshots
    • Breaking: these subcommands only list 20 by default (just like the other ones) instead of all

Testing

  • I have tested locally
  • I have added/updated tests
  • All existing tests pass

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

@jason-rl jason-rl changed the title refactor: remove total_count and deprecated_count in pagination results refactor: allow total_count and remaining_count of pagination results to be null Feb 17, 2026
@jason-rl jason-rl changed the title refactor: allow total_count and remaining_count of pagination results to be null refactor: delete total_count and remaining_count from pagination results Feb 17, 2026
items: pageBlueprints,
hasMore: page.has_more || false,
totalCount: page.total_count || pageBlueprints.length,
totalCount: pageBlueprints.length,

Choose a reason for hiding this comment

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

whats the effect of taking this || branch only - doesn't this affect how the UI shows the number of total results?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be no effect

@jason-rl jason-rl force-pushed the jason/remove_total_remaining_count branch from 66bb8b7 to 7a9b98e Compare February 18, 2026 00:03
@jason-rl jason-rl requested a review from alb-rl February 18, 2026 22:59
@jason-rl jason-rl force-pushed the jason/remove_total_remaining_count branch from c1eb746 to 9adc529 Compare February 19, 2026 00:32
@jason-rl jason-rl merged commit 54601c0 into main Feb 19, 2026
14 checks passed
@jason-rl jason-rl deleted the jason/remove_total_remaining_count branch February 19, 2026 01:08
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.

3 participants