feat: add list_recent_unresolved tool to surface comments on merged PRs#183
Merged
ichoosetoaccept merged 1 commit intomainfrom Feb 18, 2026
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile SummaryAdds a new
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Agent as MCP Agent
participant Server as server.py
participant Stack as stack.py
participant GH as gh CLI / GraphQL
Agent->>Server: list_recent_unresolved(repo, limit)
Server->>Server: _get_workspace_cwd()
Server->>Server: _check_auto_detect_prerequisites()
Server->>Stack: list_recent_unresolved()
alt repo provided
Stack->>Stack: split("owner/repo")
else repo not provided
Stack->>GH: get_repo_info()
GH-->>Stack: (owner, repo_name)
end
Stack->>GH: _fetch_merged_prs(gh pr list --state merged)
GH-->>Stack: [{number, title, url, mergedAt}, ...]
loop For each merged PR
Stack->>GH: _fetch_pr_summary(GraphQL reviewThreads)
GH-->>Stack: PRReviewStatusSummary
alt unresolved > 0
Stack->>Stack: append to summaries
end
end
Stack-->>Server: StackReviewStatusResult(prs with unresolved only)
Server-->>Agent: StackReviewStatusResult
Last reviewed commit: 27e69e4 |
Member
Author
Merge activity
|
4916c9d to
d0d8ee4
Compare
This comment has been minimized.
This comment has been minimized.
d0d8ee4 to
482c17f
Compare
482c17f to
27e69e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add a
list_recent_unresolvedMCP tool that scans recently merged PRs for unresolved review threads. Closes #182.Problem
When agents review PR stacks, they only discover the current open stack via
gt log. Reviewers like Greptile that post late-arriving comments on already-merged PRs are invisible — agents miss actionable feedback.Solution
New tool:
list_recent_unresolvedgh pr list --state merged_fetch_pr_summary()(lightweight GraphQL — first comment per thread only)StackReviewStatusResult— same format assummarize_review_status, zero new modelsParameters:
repo: explicit repo or auto-detectlimit: how many merged PRs to scan (default 10, max 50)Changes
src/codereviewbuddy/tools/stack.py:_fetch_merged_prs()helper +list_recent_unresolved()async functionsrc/codereviewbuddy/server.py: register MCP tooltests/test_stack.py: 5 new teststests/test_mcp_integration.py: update expected tool set + count