feat(review): add a combined "Copy for AI agents" block to the PR comment#5387
Merged
Conversation
…ment Mirrors CodeRabbit's combined "Prompt for AI agents" feature (per their own docs: gathers every fix prompt from a review into ONE structured instruction instead of one per finding, specifically to cut the repeated copy-paste that produced). Right after "Why this is blocked" / "Concerns raised", render one collapsible containing every blocker as a numbered plain-text instruction inside a fenced code block -- GitHub renders a copy icon on the fence for free, no custom JS needed. Uses the FULL (pre-display-truncation) blocker set, not the human- facing capped subset shown above it, since an agent benefits from complete context. Never gated by comment_verbosity: quiet -- it extends the never-gated blockers themselves, not decorative detail like Nits.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5387 +/- ##
==========================================
- Coverage 94.43% 94.40% -0.04%
==========================================
Files 551 551
Lines 44223 44227 +4
Branches 14654 14654
==========================================
- Hits 41764 41751 -13
- Misses 1784 1801 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Researched CodeRabbit's actual "Prompt for AI Agents" feature design (their own blog/docs + third-party extraction tooling) and adapted the pattern to gittensory's existing panel structure:
comment_verbosity: quiet— it's an extension of the blockers themselves (which are never gated), not decorative detail like Nits.Test plan
npm run typecheck— clean'Copy for AI agents' blockdescribe block inunified-comment.test.ts): omitted with no blockers, renders every blocker as a numbered item, uses the full (not truncated) blocker set, survivesquietverbosity, renders pre-expanded underdetailedverbosity, escapes angle brackets consistently with every other public fieldnpx vitest runacross all 14 affected test files (unified-comment*, every*-collapsible.test.ts, all 5queue*.test.ts) — 940/940 passingnpm run test:engine-parity— cleansrc/review/unified-comment.tsdiff is 100% lines / 100% branches (verified via lcov; the two remaining uncovered items in this file are pre-existing, outside this diff's changed lines)