Skip to main content

Changes and Reviews

How Treq presents workspace changes and turns them into structured feedback for an agent.

Changes and reviews belong to a workspace. Treq reads its diff, lets you comment on changed lines, and saves the pending review in the repository's local Treq database.

You can copy the formatted review or send it to an agent for planning or editing.

Pending Reviews

Treq saves comments and summary text as a pending review. This state is separate from repository history. Editing a review does not modify the working copy or create a commit.

Pending reviews save automatically while you work.

Changes and Diffs

The default review shows uncommitted changes in the workspace. Treq loads the changed file list first, then requests diff hunks for each file. This keeps the initial view responsive when a workspace contains many changes.

You can switch to committed changes when the workspace has commits above its target. The cumulative view combines those commits into one diff.

ViewWhat it shows
UncommittedChanges in the working copy
CommittedAll workspace commits above the target

Line selection belongs to the review layer. Selecting lines gives a comment precise context, but it does not stage those lines for a commit. Commit selection works at the file level. To review one commit at a time, see Commit Management.

Conflict Management

Treq detects unresolved conflicts in the workspace and marks the affected files. Diff hunks identify conflict regions so the review can show them beside the surrounding code.

You can write resolution instructions for a conflict and include them in the review prompt. The agent receives those instructions in a separate conflict-resolution section. Treq disables workspace merging while unresolved conflicts remain.

When files change during a review, Treq compares the new diff with the saved comment context. It marks stale files and drops comments whose lines no longer match. Re-read those files before finishing the review.

Comments

Comments attach to changed lines in the rendered diff. Treq records the file path, line context, and comment body so an agent can locate the issue.

Comments use plain text. State whether the agent should fix a defect, answer a question, or consider a suggestion in the comment itself.

note

Local review data stays on your machine. Treq does not publish these comments to GitHub.

GitHub Review Threads

When the workspace branch has an open GitHub pull request and gh is authenticated, the Review tab also loads GitHub review comment threads. Treq places those threads on matching diff hunks in the uncommitted and committed views. Threads whose lines no longer appear in the visible diff sit in an outdated comments group for that file.

You can quote a GitHub thread into a local pending comment so an agent can act on it. Quoting does not reply on GitHub. Creating and viewing the PR itself is covered under GitHub Integration.

Learn More