Multi-round review workflow & diff view#3
Merged
tomasz-tomczyk merged 17 commits intomainfrom Feb 20, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the signaling mechanism for agents to tell crit they're done editing. The endpoint resets the pending edit counter and signals via a channel that will be consumed by the batch file-watching logic (Task 3). The `crit go` subcommand wraps this API call for a cleaner developer experience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WatchFile now sends "edit-detected" SSE events (with edit count) on file changes instead of immediately sending "file-changed". The full "file-changed" event is deferred until the agent signals round completion via the roundComplete channel, allowing multiple file edits to be batched into a single review round. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend the Comment struct with Resolved, ResolutionNote, and ResolutionLines fields. These allow agents to mark comments as resolved by editing .comments.json directly. The fields use omitempty so they don't appear in JSON output for unresolved comments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…oter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Only snapshot PreviousContent/PreviousComments on first edit of a round (pendingEdits == 0), not on every file change. This ensures the diff covers all changes since the round started, not just the last edit. - Load resolved comments from .comments.json on round-complete so the agent's resolved/resolution_note/resolution_lines fields are available to the frontend. - Don't delete .comments.json in ReloadFile — the agent needs it during the editing phase. Clean up happens on round-complete instead. - Re-render document after fetching previousComments so resolved comment cards appear at their mapped positions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move "Round #N" and "Show Diff" button to header-right - Rename button to "Show Diff" / "Show Review" - Fix diff side labels overlapping content (remove sticky positioning) - Diff closed by default on new round (user clicks to open) - Remove .btn-active style, use standard button styling - Restore round state on browser refresh (fetch /api/previous-round on init) - Add reviewRound field to Document, expose via /api/previous-round - Fix bug: SignalRoundComplete now clears comments and resets nextID (previously stale comments persisted if agent didn't edit source file) - Clean up .review.md on round-complete - Add tests for round increment, comment clearing, and review_round API Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The review file now contains only the original content + inline comments, no boilerplate footer. The finish prompt is shorter while keeping the essential info (review file path, JSON path, crit go command). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
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.
Multi-round review workflow
making edits, triggering a new review round in the browser
Diff panel
previous round's snapshot
rounds
Waiting modal improvements
Finish prompt