Skip to content

fix(issue): reach comments beyond the first 20 - #187

Open
Eotel wants to merge 1 commit into
nulab:mainfrom
Eotel:Eotel/issue-comments-newest
Open

Eotel wants to merge 1 commit into
nulab:mainfrom
Eotel:Eotel/issue-comments-newest

Conversation

@Eotel

@Eotel Eotel commented Oct 29, 2026

Copy link
Copy Markdown

Summary

bee issue comment --list and bee issue view --comments requested comments in ascending order without a count, so the API returned only the 20 oldest comments. On an issue with more than 20 comments, the newest ones could not be read.

 bee issue comment PROJECT-123 --list
+  [-L, --count <n>] [--order <asc|desc>] [--min-id <n>] [--max-id <n>]

 bee issue view PROJECT-123 --comments
-  getIssueComments(order: asc)                     # 20 oldest only
+  getIssueComments(order: asc, count: 100, minId)  # repeated until a page has fewer than 100
  • issue comment --list takes the same paging options as pr comments. Without them it still returns the 20 oldest in ascending order, so existing scripts see no change. --order desc -L 5 lists the five newest, and --min-id reads the next page. The help no longer calls the default "all comments".
  • issue view --comments pages through every comment by ID, 100 per request, so it includes the newest comments.

Automatic pagination for --list is left to #128, which proposes an opt-in --paginate for list commands.

Evidence

Read-only runs of the built CLI against a live issue with 26 comments:

Command Before (bee 1.1.1) After
issue comment --list --json id 20 oldest 20 oldest (default unchanged)
issue comment --list --order desc -L 5 unknown option '--order' 5 newest, same IDs as order=desc&count=5 from the API
issue comment --list --min-id <ID of the 20th> not available the remaining 6
issue view --comments 12 comments, all from the 20 oldest all 17 comments with content, through the newest

The API treats minId as exclusive: minId=<ID> returns the comments after that ID. A build with the page size lowered to 10 (three requests) printed the same issue view --comments output as the normal build, so no comment is repeated or skipped at a page boundary.

The two new tests and the updated --comments test failed before the fix and pass after it.

Test plan

  • vp check
  • vp test
  • vp run --filter @nulab/bee build
  • vp run --filter @nulab/bee generate:skill:check
  • Read-only runs of the built CLI against a live issue, compared with bee api issues/:key/comments (table above)

Merge Danger

Door: Two-way

The change can be reverted without a data migration.

Blast Radius: Issue

issue view --comments sends one request per 100 comments instead of one request. issue comment --list without the new options sends the same request as before.

This PR and #185 both change issue view. They merge cleanly in either order, and vp test passes on the combined branch.

Closes #186

issue comment --list and issue view --comments requested comments in ascending order without a count, so the API returned only the 20 oldest and the newest comments were unreachable.

Add --count, --order, --min-id, and --max-id to issue comment --list, matching pr comments. issue view --comments now pages through every comment by ID, 100 at a time.

Closes nulab#186
@Eotel
Eotel requested a review from lollipop-onl as a code owner October 29, 2026 07:35

This branch has not been deployed

No deployments
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.

bug(issue comment): --list returns only the 20 oldest comments

1 participant