[PR #12188] feat(tui): add interactive code review system for reviewing agent changes #14109

Open
opened 2026-02-16 18:18:55 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12188

State: open
Merged: No


https://github.com/user-attachments/assets/a86875ec-1596-4a86-a3be-5f193f75a71d

Depends on opentui#621

Summary

Added a new /changes route that enables users to review file changes made by the agent and provide feedback through inline comments.

Features

  • Interactive diff viewer with split/unified views, syntax highlighting, and word wrap
  • File list sidebar grouped by directory with additions/deletions counts
  • Inline commenting on any line (add, remove, or context lines)
  • Comment management: add, edit, and delete comments
  • Keyboard navigation: j/k scroll, tab switch panes, ctrl+enter submit feedback
  • Feedback submission: formatted comments sent as a user message to continue the session

Architecture

  • Session based diff using the builtin sync.data.session_diff
  • Slottable diff system injects comment UI at specific line positions opentui#621
  • Comments tracked per-file using line anchors (old:, new:, v:) for diff view compatibility
  • Comments formatted as markdown with file path, line numbers, and change type when given to agent
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12188 **State:** open **Merged:** No --- https://github.com/user-attachments/assets/a86875ec-1596-4a86-a3be-5f193f75a71d ### Depends on [opentui#621](https://github.com/anomalyco/opentui/pull/621) ### Summary Added a new `/changes` route that enables users to review file changes made by the agent and provide feedback through inline comments. ### Features - **Interactive diff viewer** with split/unified views, syntax highlighting, and word wrap - **File list sidebar** grouped by directory with additions/deletions counts - **Inline commenting** on any line (add, remove, or context lines) - **Comment management**: add, edit, and delete comments - **Keyboard navigation**: j/k scroll, tab switch panes, ctrl+enter submit feedback - **Feedback submission**: formatted comments sent as a user message to continue the session ### Architecture - Session based diff using the builtin `sync.data.session_diff` - Slottable diff system injects comment UI at specific line positions [opentui#621](https://github.com/anomalyco/opentui/pull/621) - Comments tracked per-file using line anchors (old:, new:, v:) for diff view compatibility - Comments formatted as markdown with file path, line numbers, and change type when given to agent
yindo added the pull-request label 2026-02-16 18:18:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14109