Skip to content
Versora

Manual

Review

Changes tab: files, diff and Viewed

6 min read

On this page

The Changes tab is where the review actually happens: the list of the merge request's files on the left and the diff of the chosen file on the right, with the threads below each line. In large MRs, each file's Viewed mark tells you what you've already read, and it goes back to "not viewed" on its own when the file changes after a push.

Where to find it

  • MR review › Changes tab. The number on the tab is the number of files.
  • On the Overview tab, a thread's file and line take you straight to the line here ("Show in changes").

The file list

The top of the list

From top to bottom:

  1. What to compare: all changes, one commit, a range or two versions. See Commits, ranges and versions.
  2. Where the diff comes from: "Local git diff a1b2c3d4…e5f6a7b8" or "Server diff" (see below).
  3. Code owners: with CODEOWNERS on the target branch, the box shows the sections with owners and each one's approval ("1 of 2 sections approved"), with + Reviewer to request the review from an owner. See CODEOWNERS.
  4. The file count ("40 files"; "(the server didn't send all of them)" when the API cut the list).
  5. The progress ("12 of 40 viewed") and the Go to the next file not viewed button.
  6. Group files: List, Folders or Owners.
  7. Hide viewed.
  8. The comment filter.

Each file

  • The viewed checkbox ("Mark src/login.ts as viewed").
  • The state (added, modified, renamed, deleted) and the path. A renamed file also shows the old path in the tooltip.
  • The owner from CODEOWNERS, when there is one.
  • A yellow dot: "The file changed since it was marked as viewed".
  • The number of threads on the file ("2 threads").

Click the file (or Enter) to open the diff.

The viewed mark records that you've already read that file, in that version.

How to mark it

WayWhere
The checkbox next to the fileFile list.
VWith focus on the list: marks or unmarks the selected file ("Mark as viewed (V)").
Viewed in the diff header"Mark as viewed and go to the next file not viewed": marks it and opens the next one right away.
List menu (right-click or Shift+F10)Mark as viewed, Mark as not viewed, Mark all as viewed, Mark all as not viewed and, on groups, Mark group as viewed and Mark group as not viewed.

Go to the next file not viewed jumps to the next file in the list that hasn't been viewed yet. When there are none left, you see "All files have been viewed.".

When the mark goes back to "not viewed"

The mark belongs to the version of the file you viewed. If the MR receives a push that changes that file, the mark goes back to "not viewed" on its own and the file gets the yellow dot. Files that didn't change stay viewed. The mark works in any comparison mode (whole MR, one commit, one version), always by the version of the file shown.

The marks are kept in Versora, on this computer. They aren't sent to the server and your teammates don't see them.

Hide viewed

With Hide viewed on, only the files not viewed yet stay in the list. It's the fastest way to get through a 100-file MR.

Grouping the list

ModeWhat it does
List"All files in a single list".
Folders"Group by folder, with the progress of each one". Files at the root go in "(root)".
Owners"Group by CODEOWNERS owner, with each owner's progress". Files without a rule go in "No owner". "A file with more than one owner appears in each owner's group." Disabled when "The target branch has no CODEOWNERS".

Each group shows its own progress ("5 of 8 viewed") and collapses with a click (or ← and → from the keyboard). The menu has Collapse all groups and Expand all groups. The chosen mode and Hide viewed are remembered.

The diff

The diff header shows the folder and the file name, "(from old/path)" for renamed files, the total of added and removed lines and the controls:

ControlWhat it does
Unified / Side by sideOne column with the removed and added lines, or the two versions side by side.
Wrap lines"Wrap long lines".
ViewedMarks it and goes to the next one not viewed.
Encoding buttonHow the file was read (for files in Windows-1252, UTF-16…). See Repository.

Unified, side by side and wrap lines are the same diff preferences as in the rest of the app.

Each line has the + for commenting (see Comments). Threads sit below the line; the ones from earlier versions appear with Show 2 threads from earlier versions of this file.

In very large files, the diff shows the first 4000 lines, and the Show the remaining 1200 lines button brings the rest.

Diff messages:

  • "Loading the diff…";
  • "The server didn't send the diff for this file (binary, too large, or only renamed).";
  • "Binary file — the content can't be shown.";
  • "No content changes (only a rename or a mode change).";
  • "Choose a file." and "No changed files.".

Diff from local Git or from the server

The app prefers to build the diff with local Git. To do that, it fetches the MR's commits from the remote (the source and target branches, or the MR's special ref when the branch is from a fork or no longer exists). Meanwhile, the list shows "Preparing the local diff…".

  • "Local git diff a1b2c3d4…e5f6a7b8": the diff comes from your repository, between the base commit and the MR's head. It has the app's syntax highlighting and encoding detection.
  • "Server diff": the hunks the API returns. When local Git didn't work, the reason appears ("Server diff: the review's commits aren't in origin (the branch may have been rewritten)") with the Try local git button.

Common reasons: "the server hasn't reported the diff commits yet", "the commits aren't in the local repository", "couldn't fetch the commits from origin: …".

What Versora does in git

Only reads and fetches. The working directory and your branches don't change:

bash
# brings in the MR's commits, if they aren't in the repository yet
git fetch --no-tags origin refs/heads/feature/login refs/heads/main
git fetch --no-tags origin refs/merge-requests/42/head refs/heads/main   # fork or deleted branch (GitLab)

# lists the files (with renames) and each one's lines
git diff --no-ext-diff --name-status -M a1b2c3d4...e5f6a7b8
git diff --no-ext-diff --numstat -M a1b2c3d4...e5f6a7b8

# the diff of one file
git diff --no-ext-diff -M a1b2c3d4...e5f6a7b8 -- src/login.ts

On GitHub, the special ref is refs/pull/42/head. The three dots compare from the common commit, the way the server shows the MR diff.

How to undo

Nothing to undo: the tab only reads. Viewed marks are undone by unchecking them.

Caveats and messages

  • "Couldn't read the file versions: the viewed mark is unavailable.": the mark depends on each file's version; without it, the checkboxes are disabled ("Couldn't read the file version"). While the version is read: "Reading the file version…".
  • "Couldn't read CODEOWNERS from the target branch: …": the Code owners box doesn't load; fetch if the branch is new.
  • Code font and size: Preferences › Navigation and appearance (see Customization).
  • Viewed shortcut (V): Preferences › Keyboard shortcuts.

See also