fix(tag-mode): enable inline PR comments alongside sticky comments#1046
fix(tag-mode): enable inline PR comments alongside sticky comments#1046sunnypatell wants to merge 4 commits intoanthropics:mainfrom
Conversation
- added `mcp__github_inline_comment__create_inline_comment` to tag mode's allowed tools when the context is a PR - the inline comment MCP server was previously only available in agent mode or when explicitly passed via `claude_args`, making it impossible to post review feedback on specific diff lines in tag mode - this allows sticky comments (for the main tracking comment) and inline comments (for code-level review feedback) to coexist - added tests verifying inline comments are excluded for non-PR contexts and that both comment servers work together with sticky comments enabled closes anthropics#955
863638f to
162843d
Compare
There was a problem hiding this comment.
Pull request overview
This PR enables GitHub inline PR comment support in tag mode for PR contexts, and adds tests to validate when the inline-comment MCP server is (and isn’t) included in the generated MCP config.
Changes:
- Automatically add the
mcp__github_inline_comment__create_inline_commenttool in tag mode whencontext.isPRis true. - Add tests ensuring the inline-comment server is excluded for non-PR contexts, and coexists with the standard comment server for PRs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/modes/tag/index.ts |
Adds inline-comment tool to the tag-mode allowed tool list for PR contexts. |
test/install-mcp-server.test.ts |
Adds coverage around inline-comment server inclusion/exclusion in prepareMcpConfig. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- changed "should include inline comment server alongside sticky comment support for PRs" to "should include both comment and inline comment servers for PR contexts" since the test validates server coexistence, not sticky comment behavior specifically
|
@wolffiex It would be appreciated if this could be addressed soon, its a feature that I know several people would like to have |
|
@claude review |
- extracted dedupedTools and used it for both prepareMcpConfig and the --allowedTools cli string - prevents duplicates when user CLAUDE_ARGS includes a tool we also push (e.g. mcp__github_inline_comment__create_inline_comment on PRs)
|
@tombrov @km-anthropic @wolffiex addressed all outstanding review feedback in 8f49f3f, all three review threads resolved. |
…omments-tag-mode # Conflicts: # src/modes/tag/index.ts
fixes #955
tag mode never included
mcp__github_inline_comment__create_inline_commentin its allowed tools, so the inline comment MCP server was never started for PR contexts. this made it impossible to post review feedback on specific diff lines when using@claudementions, and the problem surfaced clearly when users enableduse_sticky_comment: truesince both features should work together.root cause
tagModeToolsinsrc/modes/tag/index.tsincluded the comment server (mcp__github_comment__update_claude_comment) and CI tools, but not the inline comment tool. without that tool in the allowed list,prepareMcpConfigininstall-mcp-server.tsskipped starting thegithub_inline_commentserver entirely (thehasInlineCommentToolscheck on line 80 was always false for tag mode).fix
conditionally adds the inline comment tool to tag mode's allowed tools for PR contexts. this causes
prepareMcpConfigto:--allowedToolsflag passed to the Claude CLIthe sticky comment feature (controlled by
create-initial.ts) is completely orthogonal to inline comments. sticky controls how the main tracking comment is created/updated, while inline comments are separate PR review comments on diff lines. both now coexist.tests
github_commentandgithub_inline_commentservers coexist whenuseStickyComment: trueon a PR contextall 654 tests pass.