Skip to content

fix(zsh): fetch 100 items in the ghi and ghpc pickers - #382

Merged
laurigates merged 1 commit into
mainfrom
fix/gh-picker-fetch-limit
Aug 21, 2026
Merged

fix(zsh): fetch 100 items in the ghi and ghpc pickers#382
laurigates merged 1 commit into
mainfrom
fix/gh-picker-fetch-limit

Conversation

@laurigates

Copy link
Copy Markdown
Owner

What

Adds --limit 100 to the gh issue list / gh pr list calls behind the ghi and ghpc fzf pickers.

Why

Both omitted --limit, so they took gh's default of 30 — while every sibling helper (_gh_pr_pick, _gh_issue_pick, ghsq, ghrb, ghrp) already used --limit 100. The inconsistency was the tell.

For ghpc this is a plain cap. For ghi it also broke the ordering the picker exists to provide. The jq runs sort_by(.createdAt) client-side, but over a server-side newest-30 slice — so the header promising oldest-first with the cursor on the oldest was sorting the newest 30 and presenting that as oldest.

Measured against laurigates/claude-plugins (43 open issues, so the cap bites today):

ghi showed as "oldest"   #2174  2026-07-27
actually oldest          #1017  2026-04-09

3.5 months off, with the 13 genuinely-oldest issues unreachable from the picker.

How

Two-line change. Verified by extracting the shipped pipeline with sed and running it against a live repo rather than retyping the logic — #1017 now sorts to the top, matching a --limit 100 control. zsh -n passes on the rendered ~/.zshrc, and chezmoi apply touched exactly the two intended lines.

ghprls deliberately keeps no limit: it is a documented thin gh pr list passthrough (ghprls -L 50 --state all).

Both pickers omitted --limit, so they took gh's default of 30 while every
sibling helper (_gh_pr_pick, _gh_issue_pick, ghsq, ghrb, ghrp) already used
--limit 100.

For ghpc this is a plain cap. For ghi it also broke the ordering the picker
exists to provide: the jq runs sort_by(.createdAt) client-side, but over a
server-side newest-30 slice, so "oldest-first with the cursor on the oldest"
was sorting the newest 30 and calling the result oldest.

Measured in laurigates/claude-plugins (43 open issues):

  ghi showed as oldest   #2174  2026-07-27
  actually oldest        #1017  2026-04-09

The 13 genuinely-oldest issues were unreachable from the picker.

Verified by extracting the shipped pipeline with sed and running it rather
than retyping it; #1017 now sorts to the top, matching a --limit 100 control.

ghprls keeps no limit on purpose: it is a documented thin `gh pr list`
passthrough (`ghprls -L 50 --state all`).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPT64ByhPz27jQDUUnvUFU
@laurigates
laurigates merged commit 4a7af58 into main Aug 21, 2026
9 checks passed
@laurigates
laurigates deleted the fix/gh-picker-fetch-limit branch August 21, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant