Commit 54601c0
authored
refactor: delete total_count and remaining_count from pagination results (#117)
## Description
<!-- Provide a brief description of your changes -->
**Note:** PR titles should follow [Conventional
Commits](https://www.conventionalcommits.org/) 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
<!-- Mark the relevant option with an 'x' -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [x] Code refactoring
- [x] Performance improvement
- [ ] Test updates
## Related Issues
<!-- Link to related issues using #issue-number -->
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
<!-- Describe how you tested your changes -->
- [x] I have tested locally
- [ ] I have added/updated tests
- [x] All existing tests pass
## Checklist
- [x] My code follows the code style of this project
- [x] 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
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published
## Screenshots (if applicable)
<!-- Add screenshots to help explain your changes -->
## Additional Notes
<!-- Any additional information that reviewers should know -->1 parent 08a67c7 commit 54601c0
19 files changed
Lines changed: 476 additions & 174 deletions
File tree
- src
- commands
- blueprint
- devbox
- gateway-config
- network-policy
- object
- secret
- snapshot
- hooks
- services
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
627 | 631 | | |
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
631 | 639 | | |
632 | 640 | | |
633 | 641 | | |
| |||
875 | 883 | | |
876 | 884 | | |
877 | 885 | | |
878 | | - | |
| 886 | + | |
879 | 887 | | |
880 | 888 | | |
881 | 889 | | |
| |||
889 | 897 | | |
890 | 898 | | |
891 | 899 | | |
892 | | - | |
| 900 | + | |
893 | 901 | | |
894 | 902 | | |
895 | 903 | | |
| |||
907 | 915 | | |
908 | 916 | | |
909 | 917 | | |
910 | | - | |
| 918 | + | |
| 919 | + | |
911 | 920 | | |
912 | 921 | | |
913 | 922 | | |
| |||
917 | 926 | | |
918 | 927 | | |
919 | 928 | | |
920 | | - | |
| 929 | + | |
| 930 | + | |
921 | 931 | | |
922 | 932 | | |
923 | 933 | | |
| |||
982 | 992 | | |
983 | 993 | | |
984 | 994 | | |
| 995 | + | |
985 | 996 | | |
986 | 997 | | |
987 | 998 | | |
| |||
992 | 1003 | | |
993 | 1004 | | |
994 | 1005 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1002 | 1009 | | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1007 | 1022 | | |
1008 | | - | |
1009 | | - | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1010 | 1043 | | |
1011 | | - | |
| 1044 | + | |
1012 | 1045 | | |
1013 | 1046 | | |
1014 | 1047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
566 | 574 | | |
567 | 575 | | |
568 | 576 | | |
| |||
712 | 720 | | |
713 | 721 | | |
714 | 722 | | |
715 | | - | |
| 723 | + | |
716 | 724 | | |
717 | 725 | | |
718 | 726 | | |
| |||
730 | 738 | | |
731 | 739 | | |
732 | 740 | | |
733 | | - | |
| 741 | + | |
| 742 | + | |
734 | 743 | | |
735 | 744 | | |
736 | 745 | | |
| |||
740 | 749 | | |
741 | 750 | | |
742 | 751 | | |
743 | | - | |
| 752 | + | |
| 753 | + | |
744 | 754 | | |
745 | 755 | | |
746 | 756 | | |
| |||
796 | 806 | | |
797 | 807 | | |
798 | 808 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
806 | 812 | | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
811 | 825 | | |
812 | | - | |
813 | | - | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
814 | 846 | | |
815 | | - | |
| 847 | + | |
816 | 848 | | |
817 | 849 | | |
818 | 850 | | |
| |||
0 commit comments