Skip to content

feat(github-work-app): add reaction tooling to github mcp#2130

Merged
miles-kt-inkeep merged 10 commits intomainfrom
feat/github-mcp-emoji-support
Feb 18, 2026
Merged

feat(github-work-app): add reaction tooling to github mcp#2130
miles-kt-inkeep merged 10 commits intomainfrom
feat/github-mcp-emoji-support

Conversation

@miles-kt-inkeep
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 18, 2026 8:52pm
agents-manage-ui Ready Ready Preview, Comment Feb 18, 2026 8:52pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 18, 2026 8:52pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 18, 2026

🦋 Changeset detected

Latest commit: 588a1dd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@inkeep/agents-work-apps Major
@inkeep/agents-api Major
@inkeep/agents-manage-ui Major
@inkeep/agents-cli Major
@inkeep/agents-core Major
@inkeep/agents-mcp Major
@inkeep/agents-sdk Major
@inkeep/ai-sdk-provider Major
@inkeep/create-agents Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(11) Total Issues | Risk: High

🔴❗ Critical (5) ❗🔴

Inline Comments:

  • 🔴 Critical: utils.ts:1017 Wrong API method name — deleteForPullRequestComment should be deleteForPullRequestReviewComment
  • 🔴 Critical: utils.ts:104 Non-null assertion on reaction.user!.login crashes on deleted users
  • 🔴 Critical: utils.ts:136 Same null safety issue as line 104
  • 🔴 Critical: schemas.ts:26-30 Missing id field makes remove-comment-reaction unusable
  • 🔴 Critical: utils.ts:601-603 Breaking change to generatePrMarkdown output format (markdown → JSON)

🟠⚠️ Major (5) 🟠⚠️

🟠 1) scope Missing unit tests for new reaction functions

Issue: Six new utility functions were added (createIssueCommentReaction, deleteIssueCommentReaction, createPullRequestReviewCommentReaction, deletePullRequestReviewCommentReaction, fetchIssueCommentReactions, fetchReviewCommentReactions) with no corresponding tests. Existing tests in utils.test.ts cover similar functions.

Why: The tests reviewer identified a potential bug (deleteForPullRequestComment vs deleteForPullRequestReviewComment) that would have been caught by unit tests. Missing test coverage allows regressions and API contract violations to ship.

Fix: Add unit tests following the existing patterns in packages/agents-work-apps/src/__tests__/github/mcp/utils.test.ts. At minimum, test:

  • Correct Octokit API method calls with proper parameters
  • Return value extraction (id, content)
  • Error propagation
  • Null user handling

Refs:

🟠 2) scope Missing documentation for new MCP tools

Issue: Two new MCP tools (add-comment-reaction, remove-comment-reaction) are added but no customer-facing documentation exists. The GitHub MCP server currently provides 12+ tools with no tool-level documentation.

Why: Customers cannot discover these capabilities or understand how to use them. The comment_type parameter distinguishing issue_comment vs review_comment is particularly non-obvious without docs.

Fix: Add documentation for the GitHub MCP server tools, either as a new guide page or within the existing MCP documentation. Document:

  • Available tools and their purposes
  • Parameters (especially comment_type enum values and valid reactions)
  • That add-comment-reaction returns a reaction_id needed for removal

Refs:

Inline Comments:

  • 🟠 Major: index.ts:1044-1066 Missing 403 error handling for add-comment-reaction
  • 🟠 Major: index.ts:1135 Missing 403 error handling for remove-comment-reaction
  • 🟠 Major: utils.ts:452-456 Reactions fetch not wrapped in try-catch — failures crash entire operation
  • 🟠 Major: utils.ts:486-490 Same try-catch issue for review comment reactions
  • 🟠 Major: .changeset:2 Changeset should be minor (breaking change), not patch

🟡 Minor (1) 🟡

Inline Comments:

  • 🟡 Minor: index.ts:1006 Missing .describe() on reaction parameter

💭 Consider (1) 💭

💭 1) index.ts:1001-1005 comment_type enum naming

Issue: The comment_type enum values use GitHub API internal terminology (issue_comment, review_comment) which may confuse users unfamiliar with GitHub's API structure.

Why: From a customer perspective, both are "PR comments" — one is a general comment, one is an inline code comment. More intuitive values like general/inline or pr_comment/code_comment could improve discoverability.

Fix: Consider renaming the enum values and explaining the mapping in the description. This is a preference — the current values are technically accurate.


🚫 REQUEST CHANGES

Summary: This PR adds valuable reaction tooling but has several critical issues that need addressing before merge:

  1. Bug: Wrong API method name (deleteForPullRequestCommentdeleteForPullRequestReviewComment) will cause runtime failures
  2. Broken workflow: Missing id field in ReactionSchema makes remove-comment-reaction unusable
  3. Breaking change: generatePrMarkdown output format changed from human-readable markdown to JSON — this appears unintentional and will break existing tests and consumers
  4. Null safety: Non-null assertions on reaction.user will crash on deleted accounts
  5. Missing tests: New functions lack coverage

I recommend addressing the critical issues (especially the API method name bug and the generatePrMarkdown change) before merging.

Discarded (3)
Location Issue Reason Discarded
schemas.ts:26-30 ReactionSchema.user could use GitHubUserSchema for consistency with CommentSchema.author Design consideration, not a bug — current string-based approach is simpler and sufficient
utils.ts:105,137 Type assertion as Reaction['content'] bypasses runtime validation Low severity — GitHub's reaction types are stable; trade-off vs parsing overhead not warranted
index.ts:1052 404 error message could include more helpful guidance Merged with 403 handling suggestion; single error handling improvement covers both
Reviewers (8)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-standards 3 0 0 0 3 0 0
pr-review-product 5 0 1 0 2 0 2
pr-review-consistency 6 0 0 0 3 0 1
pr-review-breaking-changes 2 0 0 0 2 0 0
pr-review-docs 1 1 0 0 0 0 0
pr-review-tests 5 1 0 0 0 0 0
pr-review-types 3 0 0 0 0 0 2
pr-review-errors 6 0 0 0 4 0 0
Total 31 2 1 0 14 0 5

Note: Multiple reviewers flagged overlapping issues (API method name, null safety, breaking change) — findings were deduplicated and consolidated.

Comment thread packages/agents-work-apps/src/github/mcp/utils.ts
Comment thread packages/agents-work-apps/src/github/mcp/utils.ts Outdated
Comment thread packages/agents-work-apps/src/github/mcp/utils.ts Outdated
Comment thread packages/agents-work-apps/src/github/mcp/schemas.ts
Comment on lines +601 to +603
markdown += `comments: ${JSON.stringify(issueComments)}\n`;
markdown += `Review summaries: ${JSON.stringify(reviewSummaries)}\n`;
markdown += `Inline review comments: ${JSON.stringify(reviewComments)}\n`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL: Breaking change to generatePrMarkdown output format

Issue: The comments section output changed from human-readable markdown to raw JSON.stringify() blobs. This breaks existing consumers of get-pull-request-details.

Why:

  • Before: Formatted markdown that LLMs could easily parse:
    [APPROVED] @reviewer (1/15/2026)
    LGTM!
    
    @commenter (1/15/2026)
    Fixed as requested
    
    src/file.ts:
      @reviewer line 42 (1/15/2026)
      Consider using const here
    
  • After: Raw JSON strings:
    comments: [{"id":123,"body":"Fixed as requested",...}]
    Review summaries: [{"id":1,"body":"LGTM!",...}]
    

This significantly degrades usability for LLM agents and breaks any downstream parsing.

Fix: Restore the previous human-readable format. If reactions need to be included, append them inline per comment (e.g., Reactions: +1 (2), heart (1)) rather than switching to JSON.

Refs:

Comment thread packages/agents-work-apps/src/github/mcp/index.ts
Comment thread packages/agents-work-apps/src/github/mcp/utils.ts
Comment thread packages/agents-work-apps/src/github/mcp/utils.ts
Comment thread .changeset/legal-silver-grouse.md Outdated
Comment thread packages/agents-work-apps/src/github/mcp/index.ts Outdated
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
@vercel vercel Bot temporarily deployed to Preview – agents-docs February 18, 2026 19:25 Inactive
@vercel vercel Bot temporarily deployed to Preview – agents-docs February 18, 2026 19:25 Inactive
@vercel vercel Bot temporarily deployed to Preview – agents-docs February 18, 2026 19:25 Inactive
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(10) Total Issues | Risk: High

✅ Issues Resolved in This Update

The author addressed 3 critical issues from the prior review:

  1. utils.ts:104 — Fixed null safety: reaction.user?.login ?? '[deleted]'
  2. utils.ts:136 — Fixed null safety: same pattern applied
  3. utils.ts:1017 — Fixed API method name: deleteForPullRequestReviewComment

These fixes are correct and properly implemented.


🕐 Pending Recommendations (10)

The following issues from the prior review remain unresolved:

Critical (2):

  • 🔴 schemas.ts:26-30 Missing id field in ReactionSchema makes remove-comment-reaction unusable — users can't get reaction IDs to remove them
  • 🔴 utils.ts:601-603 Breaking change to generatePrMarkdown output format (human-readable markdown → JSON blobs)

Major (6):

  • 🟠 index.ts:1044-1066 Missing 403 error handling for add-comment-reaction
  • 🟠 index.ts:1135 Missing 403 error handling for remove-comment-reaction
  • 🟠 utils.ts:452-456 Reactions fetch not wrapped in try-catch — failures crash entire operation
  • 🟠 utils.ts:486-490 Same try-catch issue for review comment reactions
  • 🟠 Prior review Missing unit tests for new reaction functions
  • 🟠 Prior review Missing documentation for new MCP tools

Minor (1):

Versioning (1):

  • 🟠 .changeset:2 Changeset should be minor (breaking change), not patch

🚫 REQUEST CHANGES

Summary: Good progress — the 3 fixes in this update are correct. However, 2 critical issues remain unresolved:

  1. ReactionSchema missing id field — Users cannot remove reactions because they can't obtain reaction IDs from get-pull-request-details
  2. generatePrMarkdown breaking change — Output switched from human-readable markdown to JSON, breaking existing consumers

Please address these critical issues. The 403 error handling and try-catch improvements are also important for production reliability but are lower priority.

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
N/A — delta review

Note: This was a delta-scoped re-review. The 3-line change was verified directly without dispatching subagent reviewers.

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(8) Total Issues | Risk: High

✅ Issues Resolved in This Update

Good progress! The following issues from prior reviews have been addressed:

  1. schemas.ts:27 — Added id field to ReactionSchema
  2. index.ts:1005-1007 — Added .describe() to reaction parameter
  3. utils.ts:457-465 — Added try-catch for issue comment reactions fetch
  4. utils.ts:499-507 — Added try-catch for review comment reactions fetch
  5. index.ts:1073-1083 — Added 403 error handling for add-comment-reaction
  6. .changeset — Updated to minor version (though format is malformed)
  7. ✅ Unit tests added for all 6 new reaction utility functions
  8. ✅ New list-comment-reactions tool added — enables users to discover reaction IDs

🔴❗ Critical (1) ❗🔴

🔴 1) utils.ts:1035 + utils.test.ts:915,922,934 Regression: Invalid API method name

Issue: Commit 38b39b22b ("address feedback") changed the API method FROM deleteForPullRequestReviewComment TO deleteForPullRequestComment. This is the opposite of what the prior review suggested. The method deleteForPullRequestComment does not exist in Octokit.

Why: This will cause runtime errors when users try to remove reactions from PR review comments. The tests pass because they mock the same invalid method name — providing false confidence.

Fix: Revert to deleteForPullRequestReviewComment in both utils.ts and the test file (see inline comments with 1-click suggestions).

Refs:

Inline Comments:

  • 🔴 Critical: utils.ts:1035 Invalid API method name (regression)
  • 🔴 Critical: utils.test.ts:915 Test mocks invalid method
  • 🔴 Critical: utils.test.ts:922 Test assertion uses invalid method
  • 🔴 Critical: utils.test.ts:934 Test mocks invalid method (error case)

🟠⚠️ Major (1) 🟠⚠️

Inline Comments:

  • 🟠 Major: .changeset/legal-silver-grouse.md:1-5 Malformed frontmatter (4 delimiters instead of 2)

🕐 Pending Recommendations (4)

The following issues from prior reviews remain unresolved:

  • 🔴 utils.ts:619-621 Breaking change: generatePrMarkdown outputs JSON blobs instead of human-readable markdown — still unaddressed
  • 🟠 index.ts:1150-1164 Missing 403 error handling for remove-comment-reaction (only 404 is handled)
  • 🟠 Prior review Missing documentation for new MCP tools
  • 💭 Prior review comment_type enum naming could be more user-friendly

🚫 REQUEST CHANGES

Summary: Good progress on addressing prior feedback — 8 issues were fixed! However, a critical regression was introduced: the deletePullRequestReviewCommentReaction function now calls an invalid Octokit method (deleteForPullRequestComment instead of deleteForPullRequestReviewComment). This will cause runtime failures.

Blocking issues:

  1. API method name regression — 1-click fixes provided in inline comments
  2. Malformed changeset — 1-click fix provided

Still pending from prior reviews:

  • generatePrMarkdown breaking change (JSON output) — this is the most significant remaining issue
  • Missing 403 handling for remove-comment-reaction
Discarded (0)

No findings were discarded in this delta review.

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
N/A — delta review

Note: This was a delta-scoped re-review analyzing commits 38b39b22b and 1ac22e04c. No subagent reviewers were dispatched — the delta was analyzed directly by the orchestrator.

Comment thread packages/agents-work-apps/src/github/mcp/utils.ts
const mockOctokit = {
rest: {
reactions: {
deleteForPullRequestComment: vi.fn().mockResolvedValue({}),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL: Test mocks invalid API method name

Issue: This test mocks deleteForPullRequestComment, but the correct Octokit method is deleteForPullRequestReviewComment. The test passes because it's mocking the same invalid method the implementation uses — but both are wrong.

Why: This test provides false confidence. It will pass even though the actual API call at runtime will fail because deleteForPullRequestComment doesn't exist.

Fix: Update to mock the correct method:

Suggested change
deleteForPullRequestComment: vi.fn().mockResolvedValue({}),
deleteForPullRequestReviewComment: vi.fn().mockResolvedValue({}),

Refs:


await deletePullRequestReviewCommentReaction(mockOctokit, 'owner', 'repo', 55, 202);

expect(mockOctokit.rest.reactions.deleteForPullRequestComment).toHaveBeenCalledWith({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL: Same issue — update to deleteForPullRequestReviewComment

Suggested change
expect(mockOctokit.rest.reactions.deleteForPullRequestComment).toHaveBeenCalledWith({
expect(mockOctokit.rest.reactions.deleteForPullRequestReviewComment).toHaveBeenCalledWith({

const mockOctokit = {
rest: {
reactions: {
deleteForPullRequestComment: vi.fn().mockRejectedValue(new Error('Not found')),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL: Same issue — update to deleteForPullRequestReviewComment

Suggested change
deleteForPullRequestComment: vi.fn().mockRejectedValue(new Error('Not found')),
deleteForPullRequestReviewComment: vi.fn().mockRejectedValue(new Error('Not found')),

Comment thread .changeset/legal-silver-grouse.md Outdated
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
miles-kt-inkeep and others added 8 commits February 18, 2026 14:50
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@miles-kt-inkeep miles-kt-inkeep force-pushed the feat/github-mcp-emoji-support branch from be9034f to 9124e0b Compare February 18, 2026 19:50
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
@miles-kt-inkeep
Copy link
Copy Markdown
Contributor Author

test

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
miles-kt-inkeep

This comment was marked as resolved.

@vercel vercel Bot temporarily deployed to Preview – agents-docs February 18, 2026 20:49 Inactive
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
@github-actions github-actions Bot deleted a comment from claude Bot Feb 18, 2026
@miles-kt-inkeep miles-kt-inkeep merged commit 5bd9461 into main Feb 18, 2026
9 checks passed
@miles-kt-inkeep miles-kt-inkeep deleted the feat/github-mcp-emoji-support branch February 18, 2026 21:00
@claude claude Bot mentioned this pull request Feb 18, 2026
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.

1 participant