feat(web): acknowledge review command comments with a reaction#1174
feat(web): acknowledge review command comments with a reaction#1174fatmcgav wants to merge 4 commits intosourcebot-dev:mainfrom
Conversation
Adds a configurable acknowledgment reaction/emoji to the triggering comment when the review agent receives a `/review` command, so users get immediate feedback that the request was received. - GitHub: reacts to the issue comment via the reactions API (default: `eyes`) - GitLab: awards an emoji on the MR note via `MergeRequestNoteAwardEmojis` - New `REVIEW_AGENT_ACK_REACTION` env var (default: `eyes`) controls the reaction - Acknowledgment failures are logged as warnings and do not block the review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds a configurable acknowledgement reaction for the Review Agent. When a ChangesReview Agent Acknowledgment Reaction
Sequence Diagram(s)sequenceDiagram
participant GitHost as GitHub/GitLab
participant Webhook as Webhook Handler
participant AckAPI as Reactions API
participant Processor as Review Processor
GitHost->>Webhook: issue_comment / Note Hook (review command)
Webhook->>AckAPI: create reaction (uses env.REVIEW_AGENT_ACK_REACTION)
alt ack succeeds within 1500ms
AckAPI-->>Webhook: 200 OK
else ack fails or times out
AckAPI-->>Webhook: error/timeout (logged)
end
Webhook->>Processor: fetch PR/MR and invoke processGitHubPullRequest / processGitLabMergeRequest
Processor-->>Webhook: processing result
Webhook-->>GitHost: respond 200
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/web/src/app/api/`(server)/webhook/route.ts:
- Around line 189-199: Wrap the best-effort acknowledgment calls in a timeout
wrapper so they don't block webhook processing: replace the direct await of
octokit.rest.reactions.createForIssueComment(...) (and the analogous GitLab ack
call) with a withTimeout or Promise.race that races the API promise against a
1500ms timeout promise, and proceed regardless of timeout or error; keep
existing error logging (logger.warn) for failures but ensure the handler
continues immediately when the timeout fires and do not await the ack
indefinitely—use the existing env.REVIEW_AGENT_ACK_REACTION and method
octokit.rest.reactions.createForIssueComment to locate the GitHub call and the
corresponding GitLab ack function to apply the same pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c0ea19aa-2825-42c9-83a3-4ab2a5de8919
📒 Files selected for processing (5)
docs/docs/configuration/environment-variables.mdxdocs/docs/features/agents/review-agent.mdxpackages/shared/src/env.server.tspackages/web/src/app/api/(server)/webhook/route.tspackages/web/src/features/agents/review-agent/types.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a configurable acknowledgment reaction/emoji to the triggering
comment when the review agent receives a
reviewcommand, so usersget immediate feedback that the request was received.
github: reacts to the issue comment via the reactions API (default:eyes)gitlab: awards an emoji on the MR note viaMergeRequestNoteAwardEmojisREVIEW_AGENT_ACK_REACTIONenv var (default:eyes) controls the reactionCo-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Summary by CodeRabbit
New Features
Documentation