Skip to content

Add Phase 3a: review submission, feedback sidebar, and inline annotations#729

Closed
selfcontained wants to merge 1 commit into
mainfrom
worktree-agent-a56ee9effb72b4d8c
Closed

Add Phase 3a: review submission, feedback sidebar, and inline annotations#729
selfcontained wants to merge 1 commit into
mainfrom
worktree-agent-a56ee9effb72b4d8c

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Adds structured review system for agent diffs (Phase 3a from the diff review design spec)
  • Human reviewers can enter review mode in the Changes tab, accumulate draft comments anchored to code lines, and submit them as a batch review
  • On submission: persisted to DB (3 new tables), tmux notification sent to agent, SSE event for live updates
  • New "Reviews" tab in the right sidebar showing all reviews with expandable cards, status chips, and progress bars
  • Inline annotations in the diff view show persisted feedback items at their line ranges as collapsible widgets

New files

  • apps/server/src/db/migrations/0029_reviews.sql -- 3 tables: reviews, review_feedback_items, review_thread_messages
  • apps/server/src/agents/reviews.ts -- data layer (create, list, get review, list all feedback items)
  • apps/server/src/routes/agents/review-routes.ts -- 4 API endpoints (POST/GET reviews, GET detail, GET feedback)
  • apps/web/src/components/app/reviews-tab-content.tsx -- sidebar Reviews tab UI
  • apps/web/src/hooks/use-agent-reviews.ts -- React Query hooks for reviews and feedback

Modified files

  • Route registration, SSE event types, frontend types, sidebar tab, diff viewer (review mode + annotations)

Test plan

  • pnpm run check (TypeScript) passes
  • pnpm run finalize:web (production build) passes
  • pnpm run test (188 unit tests pass, including migration-repair test)
  • pnpm run test:e2e (172 E2E tests pass)

🤖 Generated with Claude Code

…ions

Introduces a structured review system for agent diffs. Humans can enter
review mode in the Changes tab, accumulate draft comments anchored to
code lines, and submit them as a batch review. On submission the review
is persisted (reviews + review_feedback_items + review_thread_messages
tables), the assigned agent receives a tmux notification, and an SSE
event pushes a live update to all connected clients.

New "Reviews" tab in the right sidebar shows all reviews for the focused
agent with expandable cards showing feedback items, status chips,
resolution progress bars, and thread messages.

Inline annotations in the diff view render persisted feedback items at
their line ranges as collapsible widgets with status, reviewer badge,
and the initial comment. Resolved items appear muted and collapsed by
default.

Backend: 3 new tables (migration 0029), data layer with transaction-
based creation, 4 API endpoints (POST/GET reviews, GET review detail,
GET all feedback items), SSE event types for live updates.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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