Skip to main content
Managing Sessions & Changes

View and Review Code Changes

Overview

After Qoder modifies code, you typically need to check what it changed and conduct a code review. Qoder CLI offers two features: use /diff to view specific code diffs, and /review to perform a structured code review and identify fixable issues. Both features are Git-based and must be used within a Git repository.

View Changes (/diff)

Use /diff to view the code diff in the current workspace:
/diff
It displays the specific changes in modified and newly added (untracked) files, helping you quickly confirm what Qoder has changed.

Review Changes (/review)

/review performs a code review on the changes to identify fixable issues. It can be used in two ways:

Interactively Select Review Scope

When run without arguments, /review prompts you to select the review scope:
/review
The available review scopes include:
  • Current changes: Review staged, unstaged, and untracked files.
  • Compare with Base Branch: Select a local branch and review the changes in the current branch relative to it.
  • Specific commit: Select a commit from the recent commit list for review (up to 100 commits are listed).
  • Custom instructions: Enter custom review requirements.

Provide Review Instructions Directly

When run with arguments, the arguments are passed directly to Qoder as review instructions:
/review Focus on checking concurrency safety and error handling in this change

Review Scopes

ScopeReview Content
Current ChangesStaged, unstaged, and untracked files in the workspace
Compare with Base BranchDifferences of the current branch relative to the selected local branch
Specific CommitChanges introduced by the selected commit
Custom InstructionsReview according to your entered requirements
When selecting "Compare with Base Branch", if the main or master branch exists locally, it is prioritized as the default base branch.

Recommended Workflow

A typical "modify—view—review" workflow:
  1. Have Qoder complete a modification.
  2. Use /diff to quickly view what it changed.
  3. Use /review to perform a structured review and identify potential issues.
  4. Based on the review results, have Qoder make further corrections.
The "Compare with Base Branch" and "Specific Commit" scopes are particularly useful when you need to strictly vet the entire set of changes before committing.
Both /review and /diff must be run in a Git repository. If you are not in a Git repository, or if no branches or commits are available, Qoder will display an appropriate prompt.