Repository navigation
AI reviews brief the user, with real diagrams in reviews and Chat - #360
Merged
Merged
Conversation
A reviewer's submit_review now takes a `briefing`: markdown written for the user rather than the author agent — what the change does and why, how it works (with ASCII diagrams), the critique with blockers kept apart from non-blocking notes, and a merge recommendation. It is stored on the submission and shown in the Review tab above the summary, but never delivered to the author, who wrote the change and only needs the summary and comments. The default reviewer and PR-review prompts now ask for that explanation instead of telling the agent to skip restating what the PR does. The review-request footer changed with it, so the previous wording is kept as a retired footer that transcripts on disk still strip cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The summary is what the author agent receives; next to the briefing it read as a second, redundant verdict. It now sits behind a disclosure, and submit_review tells the reviewer to keep it a terse to-do list for the author rather than restate the briefing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ```mermaid block in review markdown or a Chat message now draws as a diagram, themed from the Ness color variables and sized from the root font-size so it follows uiScale. Mermaid loads lazily on the first diagram, renders are serialized and cached by theme + source, and a parse error falls back to the code block with the error underneath. A hover toggle shows the source. In Chat, remarkMermaid only marks a block once its closing fence has arrived, so a diagram streaming in stays a code block instead of re-running mermaid on every token. It matches blocks by body rather than position because remarkInsight re-parses Insight cards. The reviewer prompts, submit_review's briefing description and the Ness system prompt now tell agents mermaid renders, keeping ASCII for tiny sketches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agents can't see the user's theme, so hex colors they pick often vanish against it. A node marked :::added, :::changed, :::removed or :::focus is now colored from the success/warning/danger/accent theme variables (removed is also struck through), in flowcharts, state and class diagrams. The rules use !important because mermaid's own style block is scoped by the svg id. The system prompt and reviewer prompts point agents at these classes instead of raw colors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- remarkMermaid compares bodies line-trimmed and strips blockquote markers, so a fence nested under a list item or inside a blockquote is marked closed. remark strips the container indent from code.value, so the raw-source key never matched and those diagrams stayed as source. - Reset the cached theme key when the last diagram unmounts. Otherwise a theme switch with no diagram on screen went unseen and the next diagram hit a cached SVG in the old colors. - Word the shipped review prompts neutrally. "Visual learner" and "wants to merge" described one user, and the latter nudged every reviewer toward softer verdicts. - Test that a malformed briefing is dropped on load; formatting nit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this does
AI reviews used to be a verdict and summary written for the author agent. A reviewer now also writes a briefing for you: what the change does and why, how it works (with a diagram), the critique with blockers kept separate from non-blocking notes, and a recommendation. It shows in the Review tab. The author agent never receives it.
Diagrams are real now: a
```mermaidblock renders as a themed diagram in review markdown and in Chat tabs.sequenceDiagram participant R as Reviewer agent participant N as Ness participant A as Author agent participant U as You R->>N: submit_review(verdict, summary, briefing) N->>A: verdict + summary + comments N-->>U: Review tab: briefing cardChanges
Briefing
ReviewSubmission.briefing(optional). It's accepted bysubmit_review(mcp-bridge.js→control-server.ts→review-service.ts) and stripped on load if it's malformed.Mermaid
MermaidDiagramis shared byReviewMarkdownandJsonModeChat.uiScale. Wide diagrams shrink to 65% at most, then scroll.remarkMermaidonly marks a block once its closing fence has arrived, so a diagram that's still streaming stays a code block and never re-renders per token. It matches blocks by their body, not their position, becauseremarkInsightre-parses Insight cards.:::added,:::changed,:::removedand:::focusmap to success, warning, danger and accent, so agents don't have to guess hex colours.Testing
npm run typecheck,npx electron-vite build,npx vitest run(165 files / 2262 tests). New tests cover the briefing inreview-service, the retired footer, the bridge forwarding the briefing, andremarkMermaid(fences closed vs. still streaming, fence matching, blocks inside Insight cards).Known gaps
submit_review, so their explanation appears in chat rather than as a briefing card.🤖 Generated with Claude Code