feat(web): acknowledge review command comments with a reaction#1174
feat(web): acknowledge review command comments with a reaction#1174fatmcgav wants to merge 5 commits into
Conversation
|
PR changed again? Review this PR in Change Stack to compare snapshots and stay oriented. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughAdds a configurable acknowledgement reaction for the Review Agent and a minor docs typo fix. Webhooks try to add the configured reaction (env var REVIEW_AGENT_ACK_REACTION, default "eyes") to the triggering GitHub comment or GitLab note (timed, non-blocking) before processing the review command. 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)
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
6ee674d to
428c038
Compare
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 `@docs/docs/configuration/environment-variables.mdx`:
- Line 73: Update the table row for REVIEW_AGENT_ACK_REACTION so the default
value is formatted as inline code; change the Default column from plain eyes to
backtick-wrapped `eyes` (edit the table entry that references
REVIEW_AGENT_ACK_REACTION to use `eyes`).
🪄 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: 518b405b-9f79-4d05-ac41-c28873b26fcd
📒 Files selected for processing (6)
CHANGELOG.mddocs/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
✅ Files skipped from review due to trivial changes (1)
- docs/docs/features/agents/review-agent.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/web/src/features/agents/review-agent/types.ts
- CHANGELOG.md
- packages/shared/src/env.server.ts
- packages/web/src/app/api/(server)/webhook/route.ts
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>
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>
428c038 to
7c21f39
Compare
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 `@docs/docs/configuration/environment-variables.mdx`:
- Line 15: The documentation line for the AUTH_SECRET environment variable
contains a typo; update the description for AUTH_SECRET (the table cell text
currently reading "Genearte one with `openssl rand -base64 33`.") to correct the
spelling to "Generate one with `openssl rand -base64 33`." Ensure only the word
"Genearte" is changed to "Generate" in the AUTH_SECRET entry.
🪄 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: c9401610-a610-4974-a095-06ec56a9c1cf
📒 Files selected for processing (4)
CHANGELOG.mddocs/docs/configuration/environment-variables.mdxdocs/docs/features/agents/review-agent.mdxpackages/shared/src/env.server.ts
✅ Files skipped from review due to trivial changes (2)
- docs/docs/features/agents/review-agent.mdx
- CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/shared/src/env.server.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
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 `@docs/docs/configuration/environment-variables.mdx`:
- Line 15: The documentation line for the AUTH_SECRET environment variable
contains a typo; update the description for AUTH_SECRET (the table cell text
currently reading "Genearte one with `openssl rand -base64 33`.") to correct the
spelling to "Generate one with `openssl rand -base64 33`." Ensure only the word
"Genearte" is changed to "Generate" in the AUTH_SECRET entry.
🪄 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: c9401610-a610-4974-a095-06ec56a9c1cf
📒 Files selected for processing (4)
CHANGELOG.mddocs/docs/configuration/environment-variables.mdxdocs/docs/features/agents/review-agent.mdxpackages/shared/src/env.server.ts
✅ Files skipped from review due to trivial changes (2)
- docs/docs/features/agents/review-agent.mdx
- CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/shared/src/env.server.ts
🛑 Comments failed to post (1)
docs/docs/configuration/environment-variables.mdx (1)
15-15:
⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix typo in the AUTH_SECRET description.
Genearteshould beGeneratein the sentence about creating the secret key.Proposed fix
-| `AUTH_SECRET` **(required)** | - | <p>Used to validate login session cookies. Genearte one with `openssl rand -base64 33`.</p> | +| `AUTH_SECRET` **(required)** | - | <p>Used to validate login session cookies. Generate one with `openssl rand -base64 33`.</p> |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.| `AUTH_SECRET` **(required)** | - | <p>Used to validate login session cookies. Generate one with `openssl rand -base64 33`.</p> |🧰 Tools
🪛 LanguageTool
[grammar] ~15-~15: Ensure spelling is correct
...
Context: ...Used to validate login session cookies. Genearte one withopenssl rand -base64 33.(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for 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. In `@docs/docs/configuration/environment-variables.mdx` at line 15, The documentation line for the AUTH_SECRET environment variable contains a typo; update the description for AUTH_SECRET (the table cell text currently reading "Genearte one with `openssl rand -base64 33`.") to correct the spelling to "Generate one with `openssl rand -base64 33`." Ensure only the word "Genearte" is changed to "Generate" in the AUTH_SECRET entry.
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
Behavior
Configuration
Documentation