Skip to content

feat: add configurable pageSize option - #14

Merged
Bharath-code merged 1 commit into
Bharath-code:mainfrom
curtis2point1:feat/configurable-page-size
Feb 2, 2026
Merged

Bharath-code merged 1 commit into
Bharath-code:mainfrom
curtis2point1:feat/configurable-page-size

Conversation

@curtis2point1

Copy link
Copy Markdown
Contributor

Summary

  • Add pageSize config option to customize repos displayed per page
  • Default remains 15 for backward compatibility

Problem

The page size (15 repos per page) was hardcoded. Users with many repos or larger screens may want to see more repos at once without paginating.

Solution

Added pageSize field to the config struct:

# ~/.config/git-scope/config.yml
roots:
  - ~/code
editor: code
pageSize: 25

Implementation details:

  • New PageSize int field in Config struct with yaml:"pageSize,omitempty" tag
  • Default value of 15 set in defaultConfig()
  • Validation ensures sensible value (falls back to 15 if ≤ 0)
  • NewModel() now reads from cfg.PageSize instead of hardcoded value

Test plan

  • Run without pageSize in config — should show 15 repos per page (default)
  • Add pageSize: 25 to config — should show 25 repos per page
  • Set pageSize: 0 — should fall back to 15 (default)
  • Verify pagination controls ([ / ]) still work correctly

This PR was created by Claude (claude.ai)

Allow users to customize the number of repos displayed per page via config:

  # ~/.config/git-scope/config.yml
  pageSize: 25

- Add PageSize field to Config struct with yaml tag
- Default remains 15 if not specified or set to 0
- Model now reads pageSize from config instead of hardcoded value

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Bharath-code

Copy link
Copy Markdown
Owner

will review it and close the PR today

@Bharath-code
Bharath-code merged commit 72f6eb2 into Bharath-code:main Feb 2, 2026
@Bharath-code

Copy link
Copy Markdown
Owner

will release this feature in 1.3.2 version. Thank you contribution and sponsor.

steven-pribilinskiy pushed a commit to steven-pribilinskiy/git-scope that referenced this pull request Jun 2, 2026
Allow users to customize the number of repos displayed per page via config:

  # ~/.config/git-scope/config.yml
  pageSize: 25

- Add PageSize field to Config struct with yaml tag
- Default remains 15 if not specified or set to 0
- Model now reads pageSize from config instead of hardcoded value

Co-authored-by: Claude Opus 4.5 <[email protected]>
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.

2 participants