Skip to content

Conversation

@curtis2point1
Copy link

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 <noreply@anthropic.com>
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