review: wire per-blocker AI fix-context, CodeRabbit-style - #6086
Conversation
|
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 @@
## review/comment-decision-driver-chips #6086 +/- ##
=======================================================================
Coverage ? 95.23%
=======================================================================
Files ? 595
Lines ? 47028
Branches ? 15021
=======================================================================
Hits ? 44786
Misses ? 1493
Partials ? 749
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-15 09:09:23 UTC
🛑 Suggested Action - Manual Review Review summary Nits — 5 non-blocking
CI checks failing
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
The structured fix-context data (path/line/instruction/suggested diff) already existed via buildFixHandoffBlock, but only ever rendered into its own disconnected, all-severities-combined "Fix handoff" collapsible -- never attached to the blockers a reader is actually looking at. Split fixHandoffBlocks by severity: blocker-severity findings now render as their own "Copy AI fix context" collapsible directly under each blocker (still gated by the existing review.fixHandoff toggle); nit-severity findings keep going into the combined "Fix handoff" collapsible as before. The whole-PR "Copy for AI agents" prompt is unchanged and stays available as the aggregate option. Closes #6068
4de0443 to
6b99f6b
Compare
dca092b
into
review/comment-decision-driver-chips
Closes #6068. Highest-value item in #6065.
Stacked on #6083 (which is itself stacked on #6077) — same file, sequential edits; this PR's diff is scoped to just the fix-context wiring.
Summary
Today's "Copy for AI agents" block is one combined prompt for the whole PR, built from the same free-text
blockers: string[]shown in "Why this is blocked" — no file/line/rule metadata. Separately,buildFixHandoffBlock(src/review/fix-handoff-render.ts) already produces exactly the structured shape this needs ({ path, line, severity, instruction, suggestedChange?, body }) per AI inline finding — but it only ever rendered into its own disconnected, all-severities-combined "Fix handoff" collapsible, gated behindreview.fixHandoff(default off).This PR connects them:
UnifiedReviewInputgets a new optionalblockerFixContext?: ReadonlyArray<{ path, line?, body }>. Rendered as its own🔧 Copy AI fix contextcollapsible per entry, labeled with the finding'spath:line, placed right after the blockers list — independent of the plain-text blockers (can render even with zero string blockers).buildUnifiedCommentBody) now splitsargs.fixHandoffBlocksbyseverity: blocker-severity findings feed the new per-blocker collapsibles; nit-severity findings keep going into the existing combined "Fix handoff" collapsible, unchanged.review.fixHandoff, operator kill-switchLOOPOVER_REVIEW_FIX_HANDOFF) — this PR does not flip any default, it only improves what renders when the feature is already on.Test plan
npx vitest run test/unit/unified-comment.test.ts test/unit/unified-comment-bridge.test.ts test/unit/signals-coverage.test.ts test/unit/fix-handoff-collapsible.test.ts test/unit/review-fix-handoff.test.ts— 253/253 pass (9 new tests: renderer-level per-entry rendering/labeling/escaping/independence, bridge-level severity split incl. mixed/all-blocker/all-nit/absent/no-line-sentinel)npx tsc --noEmitcleannpm run docs:drift-check,npm run manifest:drift-check,npm run command-reference:check— pass