From 162843d30cf1d80e8eaa68f494558f66235d3882 Mon Sep 17 00:00:00 2001 From: Sunny Patel Date: Wed, 11 Mar 2026 17:52:48 -0400 Subject: [PATCH 1/2] fix(tag-mode): enabled inline PR comments alongside sticky comments - 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 #955 --- src/modes/tag/index.ts | 6 +++++ test/install-mcp-server.test.ts | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/modes/tag/index.ts b/src/modes/tag/index.ts index 0adf746c2..50865794e 100644 --- a/src/modes/tag/index.ts +++ b/src/modes/tag/index.ts @@ -131,6 +131,12 @@ export async function prepareTagMode({ ...userAllowedMCPTools, ]; + // Enable inline PR comments for PR contexts so Claude can post + // review feedback directly on diff lines alongside the tracking comment + if (context.isPR) { + tagModeTools.push("mcp__github_inline_comment__create_inline_comment"); + } + // Add git commands when using git CLI (no API commit signing, or SSH signing) // SSH signing still uses git CLI, just with signing enabled if (!useApiCommitSigning) { diff --git a/test/install-mcp-server.test.ts b/test/install-mcp-server.test.ts index 152d2be78..8b225cd85 100644 --- a/test/install-mcp-server.test.ts +++ b/test/install-mcp-server.test.ts @@ -313,4 +313,47 @@ describe("prepareMcpConfig", () => { const parsed = JSON.parse(result); expect(parsed.mcpServers.github_ci).not.toBeDefined(); }); + + test("should not include inline comment server for non-PR contexts", async () => { + const result = await prepareMcpConfig({ + githubToken: "test-token", + owner: "test-owner", + repo: "test-repo", + branch: "test-branch", + baseBranch: "main", + allowedTools: ["mcp__github_inline_comment__create_inline_comment"], + mode: "tag", + context: mockContext, // isPR: false + }); + + const parsed = JSON.parse(result); + expect(parsed.mcpServers.github_inline_comment).not.toBeDefined(); + }); + + test("should include inline comment server alongside sticky comment support for PRs", async () => { + const mockPRContextWithSticky: ParsedGitHubContext = { + ...mockPRContext, + inputs: { + ...mockPRContext.inputs, + useStickyComment: true, + }, + }; + + const result = await prepareMcpConfig({ + githubToken: "test-token", + owner: "test-owner", + repo: "test-repo", + branch: "test-branch", + baseBranch: "main", + allowedTools: ["mcp__github_inline_comment__create_inline_comment"], + mode: "tag", + context: mockPRContextWithSticky, + }); + + const parsed = JSON.parse(result); + // Both comment server (for sticky tracking comment) and inline comment server should coexist + expect(parsed.mcpServers.github_comment).toBeDefined(); + expect(parsed.mcpServers.github_inline_comment).toBeDefined(); + expect(parsed.mcpServers.github_inline_comment.env.PR_NUMBER).toBe("456"); + }); }); From 4e4daa2d1557a90370927284b8706d4b5d451a13 Mon Sep 17 00:00:00 2001 From: Sunny Patel Date: Wed, 11 Mar 2026 18:39:21 -0400 Subject: [PATCH 2/2] fix(test): renamed test to better reflect what it asserts - 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 --- test/install-mcp-server.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-mcp-server.test.ts b/test/install-mcp-server.test.ts index 8b225cd85..7d4df2b6d 100644 --- a/test/install-mcp-server.test.ts +++ b/test/install-mcp-server.test.ts @@ -330,7 +330,7 @@ describe("prepareMcpConfig", () => { expect(parsed.mcpServers.github_inline_comment).not.toBeDefined(); }); - test("should include inline comment server alongside sticky comment support for PRs", async () => { + test("should include both comment and inline comment servers for PR contexts", async () => { const mockPRContextWithSticky: ParsedGitHubContext = { ...mockPRContext, inputs: {