You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Inline review comments in the V2 TUI diff viewer #50561
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When reviewing changes in OpenCode’s TUI diff viewer, I’d like to comment directly on a line or range and send the collected feedback back to the agent. Currently, I have to return to the conversation and manually describe the file, lines, and code I’m referring to.
I’ve tried tuicr and herdr-reviewr, and I like their select-lines → comment → collect-feedback workflow. Having this inside OpenCode would make reviewing and iterating on the agent’s changes much easier.
Suggested workflow:
Select a line or range in the diff with the keyboard or mouse.
Add a comment, with a visible marker beside the relevant code.
Continue reviewing other files, with a summary for navigating, editing, and deleting comments.
Choose Add review to prompt to return to the conversation with the comments, file locations, and relevant code excerpts.
Edit the resulting prompt and submit it normally.
Draft comments should survive closing and reopening the viewer. If the code changes during review, the original excerpt should remain available and the comment should be marked as referring to an older diff.
I’d like to contribute this for the V2 TUI. Would this workflow fit the product direction, and what scope would maintainers prefer for an initial contribution?
A working version of this exists as a plugin: opencode-cockpit's Review bay (https://github.com/Codestz/opencode-cockpit), on OpenCode 1 and 2. You comment on lines of the diff, submit, and the agent answers each thread through tools (review_list, review_reply), with the conversation shown under the line. Two lessons that apply to a built-in version:
Threads need to follow their code as the agent edits it. Anchor by the quoted text, not the line number; line numbers drift on the first answer.
The agent works better reading the threads through a tool than as one long prompt.
Thanks for the detailed proposal, @samuelbriole! You're asking for inline review comments in the v2 TUI diff viewer: select a line or range, comment on it, and then send the collected comments, with file locations and code excerpts, back into the prompt to edit and submit. Drafts would survive reopening the viewer and be flagged when the code they refer to has changed.
For context: the desktop/web review panel already supports line comments (packages/gui-plugins/src/review/panel.tsx and the SessionReview* components in packages/session-ui). Matching how that works and the format it adds to the prompt would probably make a TUI version easier to review. The TUI diff viewer itself is packages/tui/src/feature-plugins/system/diff-viewer.tsx.
Maintainers will consider whether this fits the product direction and what scope they'd want for a first contribution. I can't promise anything on their behalf, so it's worth waiting for their input before you put a lot of work into a PR.
Activity
Codestz commentedon Sep 25, 2026
A working version of this exists as a plugin: opencode-cockpit's Review bay (https://github.com/Codestz/opencode-cockpit), on OpenCode 1 and 2. You comment on lines of the diff, submit, and the agent answers each thread through tools (
review_list,review_reply), with the conversation shown under the line. Two lessons that apply to a built-in version:Happy to help if this gets picked up.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed proposal, @samuelbriole! You're asking for inline review comments in the v2 TUI diff viewer: select a line or range, comment on it, and then send the collected comments, with file locations and code excerpts, back into the prompt to edit and submit. Drafts would survive reopening the viewer and be flagged when the code they refer to has changed.
For context: the desktop/web review panel already supports line comments (
packages/gui-plugins/src/review/panel.tsxand theSessionReview*components inpackages/session-ui). Matching how that works and the format it adds to the prompt would probably make a TUI version easier to review. The TUI diff viewer itself ispackages/tui/src/feature-plugins/system/diff-viewer.tsx.Maintainers will consider whether this fits the product direction and what scope they'd want for a first contribution. I can't promise anything on their behalf, so it's worth waiting for their input before you put a lot of work into a PR.