Repository navigation
feat(review): explain agent-generated findings with Ask AI - #1181
backnotprop merged 15 commits into
Conversation
Review (at
|
|
Thanks for the review! I will work on them |
|
Addressed in
Verification: 170 review-editor tests passed, the 84-test CI DOM command passed, the 22 Guided Review/all-files DOM tests passed, typecheck passed, and both review/hook production builds passed. |
…ding-explanations
# Conflicts: # packages/core/guide-viewer-manifest.ts
# Conflicts: # packages/core/guide-viewer-manifest.ts
…, docs The chat shows "Explain this finding: …" (AskAIParams.displayPrompt) while the agent, a separate AI or "Ask this session", gets the full prompt. The prompt is shorter and fits the session's "answer briefly" header. Agent findings in the all-files view republish through refreshItem, as main does for other header state.
…job rows - All-files cards call the latest Explain handler (useStableCallback), so a provider switch reaches cards already on screen. - Agent job findings keep main's header action slot; Explain sits next to Copy instead of adding a row. - Memo dependencies for the new handler and source set. - Replace the prop-echo CommentActions test with one that checks only a launched job's finding gets Explain.
…te the viewer manifest)
Context
Review agents can add useful findings directly to the code review, but following up on one currently means copying its text and rebuilding the relevant code context by hand.
This adds an Explain finding action that hands the finding to Ask AI in place. The response independently checks the finding before explaining the behavior and impact, then offers a brief recommendation when the finding holds.
What changed
agent-source prefix.Demo
Review focus
buildExplainFindingRequestowns the context boundary: general findings stay fileless, file findings carry only the path, valid line findings carry normalized coordinates and extracted code, and stale/historical ranges fall back to file context with an explicit note.agentJobs.jobs[].source; user annotations and GitHub/GitLab review comments remain ineligible.GuideFileCardpath rather than restoring the removed legacy guide viewer.Test plan
bun test packages/review-editor— 170 passed, 29 skippedCommentActions.test.tsx— 84 passedbun run typecheckbun run build:reviewbun run build:hook