Skip to content

fix(mrs): add default per_page=20 to browse_mr_discussions#98

Merged
polaz merged 1 commit intomainfrom
fix/97-discussions-pagination
Jan 21, 2026
Merged

fix(mrs): add default per_page=20 to browse_mr_discussions#98
polaz merged 1 commit intomainfrom
fix/97-discussions-pagination

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 21, 2026

Summary

  • Add default per_page=20 to browse_mr_discussions list action to prevent hanging on large discussion payloads
  • Update tool description to document the default pagination

Problem

browse_mr_discussions could hang for extended periods (80+ seconds observed) when fetching discussions without explicit per_page parameter, as discussion responses include full diff context, position data, and nested notes.

Test plan

  • Lint passes
  • Build passes
  • Coverage > 86% for changed files

Closes #97

Prevents hanging when fetching large discussion payloads without
explicit pagination. Updates tool description to document the default.

Closes #97
Copilot AI review requested due to automatic review settings January 21, 2026 22:01
@github-actions
Copy link
Copy Markdown

📊 Test Coverage Report

Overall Coverage: 90.6%

Coverage Details

Metric Percentage
Statements 90.6%
Branches 83.42%
Functions 78.33%
Lines 91.06%

Coverage Report: View detailed coverage report

This report was generated automatically from your PR changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a performance issue where browse_mr_discussions could hang for 80+ seconds when fetching large discussion payloads without pagination. The fix adds a default per_page=20 parameter to prevent unbounded responses.

Changes:

  • Add default pagination limit to discussion list queries
  • Update tool description to document the default behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/entities/mrs/schema-readonly.ts Add .default(20) to per_page field and update description to document the default
src/entities/mrs/registry.ts Update tool description to mention the default 20 per page limit for the list action

@polaz polaz merged commit 4819a8c into main Jan 21, 2026
24 checks passed
@polaz polaz deleted the fix/97-discussions-pagination branch January 21, 2026 22:15
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

sw-release-bot bot pushed a commit that referenced this pull request Jan 21, 2026
## [6.24.1](v6.24.0...v6.24.1) (2026-01-21)

### Bug Fixes

* **mrs:** add default per_page=20 to browse_mr_discussions ([#98](#98)) ([4819a8c](4819a8c)), closes [#97](#97)
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.

browse_mr_discussions hangs without default pagination

2 participants