Skip to content

Multi-round review workflow & diff view#3

Merged
tomasz-tomczyk merged 17 commits intomainfrom
feature/round-diff-resolved-comments
Feb 20, 2026
Merged

Multi-round review workflow & diff view#3
tomasz-tomczyk merged 17 commits intomainfrom
feature/round-diff-resolved-comments

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented Feb 20, 2026

Multi-round review workflow

  • Added crit go subcommand and POST /api/round-complete endpoint so the agent can signal when it has finished
    making edits, triggering a new review round in the browser
  • Server now tracks file edits per round, batching changes and storing a snapshot of the previous round's content and comments on each reload
  • Resolved comments (those addressed by the agent) are filtered out of the generated .review.md output and rendered in the UI as collapsed green cards at their resolved line positions

Diff panel

  • Implemented a line-level LCS diff algorithm and GET /api/diff endpoint to compare the current file against the
    previous round's snapshot
  • Added a side-by-side diff panel in the header, toggled by a "Toggle Diff" button, showing what changed between
    rounds

Waiting modal improvements

  • Live edit counter displays how many file changes the agent has made while the reviewer waits

Finish prompt

  • Updated the finish prompt to include crit go instructions with the port number, and streamlined it by removing agent instructions from the review MD footer

tomasz-tomczyk and others added 17 commits February 20, 2026 19:00
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>
@tomasz-tomczyk tomasz-tomczyk merged commit a2532ed into main Feb 20, 2026
@tomasz-tomczyk tomasz-tomczyk deleted the feature/round-diff-resolved-comments branch February 20, 2026 20:52
@devilql devilql mentioned this pull request May 7, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant