You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of branch search does not support pagination. When a user tries to use pagination with branch search, they receive an error:
paging is not supported when searching branches. It will be supported after API refactoring.
Expected Behavior
Branch search should support pagination similar to how regular branch listing works, allowing users to navigate through large numbers of search results.
Technical Details
The search_branches method in the Git client does not support paging in the same way as get_branches. These two methods should be merged into a single paginated method.
See code location: openhands/app_server/git/git_router.py lines 245-252
Acceptance Criteria
Implement pagination support for branch search queries
Ensure consistent behavior between branch search and branch listing
Hi, I'd like to work on this issue.
I plan to look into openhands/app_server/git/git_router.py, compare the current branch listing and branch search implementations, and add pagination support for search while keeping the behavior consistent with regular branch listing.
I'll keep the PR focused and include tests if there is existing coverage around the Git router/client behavior.
I've completed my investigation. I'll start working on a PR now. The approach will be:
Add a page parameter to search_branches in the GitService protocol and each provider implementation
For providers with native pagination support (GitLab, Bitbucket), pass the page parameter directly
For providers with client-side filtering (GitHub GraphQL, Azure DevOps, Forgejo), handle pagination at the service level
Remove the HTTP 400 restriction in git_router.py and pass pagination through consistently
Add test coverage for paginated branch search
This keeps the behavior consistent with how branch listing (get_paginated_branches) already works.
Hi! I'd like to work on this. Adding pagination support to branch search queries is a clearly scoped fix — it looks like the search endpoint needs to accept page/per_page parameters and pass them through correctly. I have Python backend experience and am comfortable working with API pagination patterns. Would it be okay if I take this on?
Hi! I'm a student in the CodePath AI301 program and I'd like to work on this issue.
From my initial understanding, branch listing supports pagination, but branch search currently does not, which causes an error when users try to paginate through branch search results. I’ll start by reproducing the issue locally and reviewing the branch search/listing logic around openhands/app_server/git/git_router.py.
My initial plan is to compare the behavior of search_branches and get_branches, then look for a way to make branch search use the same paginated behavior as regular branch listing. Any pointers on related tests or preferred implementation direction would be appreciated!
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
[Automatic Post]: This issue has had no activity for 39 days (labels: good first issue). Could someone take a look when they have a chance and help figure out next steps?
Generated by OpenHands automation on behalf of the user.
Activity
github-actions commentedon Apr 11, 2026
🙌 Hey there, future contributor! 🙌
This issue has been labeled as good first issue, which means it's a great place to get started with the OpenHands project.
If you're interested in working on it, feel free to! No need to ask for permission.
Be sure to check out our development setup guide to get your environment set up, and follow our contribution guidelines when you're ready to submit a fix.
Feel free to join our developer community on Slack. You can ask for help, feedback, and even ask for a PR review.
🙌 Happy hacking! 🙌
Add TODO comment with GitHub issue reference for branch pagination su…
tofarr commentedon Apr 11, 2026
Created GitHub issue #22 to track this work. The TODO comment has been updated to reference this issue.
Fix PR review issues: type safety and pagination
feat: merge branch search and listing into unified paginated endpoint
feat(git): add pagination support for branch search queries
feat(git): add pagination support for branch search queries
fix: support pagination for branch search queries (#13883)
feat: merge branch search and listing into unified paginated endpoint
Ella-horizon commentedon Apr 30, 2026
Hi @tofarr
I am so interested in this issue.
I would like to work on your issue.
Thank you!
yangjj-iso commentedon May 16, 2026
Hi, I'd like to work on this issue.
I plan to look into
openhands/app_server/git/git_router.py, compare the current branch listing and branch search implementations, and add pagination support for search while keeping the behavior consistent with regular branch listing.I'll keep the PR focused and include tests if there is existing coverage around the Git router/client behavior.
yangjj-iso commentedon May 16, 2026
I've completed my investigation. I'll start working on a PR now. The approach will be:
Add a page parameter to search_branches in the GitService protocol and each provider implementation
For providers with native pagination support (GitLab, Bitbucket), pass the page parameter directly
For providers with client-side filtering (GitHub GraphQL, Azure DevOps, Forgejo), handle pagination at the service level
Remove the HTTP 400 restriction in git_router.py and pass pagination through consistently
Add test coverage for paginated branch search
This keeps the behavior consistent with how branch listing (get_paginated_branches) already works.
Quantum0uasar commentedon May 18, 2026
Hi! I'd like to work on this. Adding pagination support to branch search queries is a clearly scoped fix — it looks like the search endpoint needs to accept page/per_page parameters and pass them through correctly. I have Python backend experience and am comfortable working with API pagination patterns. Would it be okay if I take this on?
feat: merge branch search and listing into unified paginated endpoint
shayar commentedon Jun 7, 2026
Hi! I'm a student in the CodePath AI301 program and I'd like to work on this issue.
From my initial understanding, branch listing supports pagination, but branch search currently does not, which causes an error when users try to paginate through branch search results. I’ll start by reproducing the issue locally and reviewing the branch search/listing logic around
openhands/app_server/git/git_router.py.My initial plan is to compare the behavior of
search_branchesandget_branches, then look for a way to make branch search use the same paginated behavior as regular branch listing. Any pointers on related tests or preferred implementation direction would be appreciated!Merge pull request #1 from wenwangcode/wenwang/issue-13883-paginated-…
github-actions commentedon Jul 18, 2026
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
all-hands-bot commentedon Sep 4, 2026
[Automatic Post]: This issue has had no activity for 39 days (labels: good first issue). Could someone take a look when they have a chance and help figure out next steps?
Generated by OpenHands automation on behalf of the user.
revert(app-server): move git search pagination to its own PR