Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>MR VisualizerNew to Visual Studio Code? Get it now.
MR Visualizer

MR Visualizer

devastuxx

|
2 installs
| (0) | Free
Review GitLab merge requests inside VS Code with a GitLab-style side-by-side diff of every changed file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MR Visualizer

Review GitLab Merge Requests right inside VS Code, with the same view as GitLab's Changes tab: the code before the merge on the left, the new code on the right, with the differences highlighted.

You can scroll through all changed files one below the other or look at them one at a time, moving between files with the arrows at the top.


Features

  • The MR of the current branch in one click: the extension finds the open Merge Request on the branch you are working on and shows all its changes.
  • Where you stand, even without an MR: if the branch has no open MR, the notice "No open MR on this branch" appears and the panel still shows the branch's changes against main, including uncommitted ones and new files. The same happens if the project is not on GitLab.
  • Revert a change from the viewer: the ↶ icon on the additions side, at the start of the first line of each block, reverts that block; the one in the file header reverts all the changes to the file. A confirmation is asked every time.
  • MR title and description: in the left column, below the file list, the Merge Request box lets you edit them and save them to GitLab. The ✨ (magic) button suggests the text from the changes.
  • Side-by-side view: pre-merge code on the left, new code on the right, with the changed lines and words highlighted. If you prefer, there is also the Inline view in a single column.
  • Syntax colors and lint: the syntax is highlighted and, in the current branch view, VS Code lint errors and warnings show up on the lines (underline, tooltip and a count in the file header). Linters work on the working copy: for an MR of a branch that is not checked out there are no diagnostics.
  • Full context: Full file shows the whole file, not only the lines near the changes, so you know which function you are in. Wrap lines removes the horizontal scroll by wrapping long lines, and the handle between the two panes lets you resize them.
  • Two ways to navigate:
    • All files: the diffs one below the other, like on GitLab. Each file can be collapsed and expanded, and there are Collapse all / Expand all buttons.
    • One file: one file at a time, with the ‹ › arrows at the top, the counter (e.g. 3 / 12) and a menu to jump to any file.
  • Reviewed files: each file has a Reviewed checkbox, both in the panel and in the side tree. At the top of the MR a recap shows how many files you have reviewed and which ones are left. Reviews are kept even if you close VS Code, and expire on their own when the file changes with a new push, like GitLab's "Viewed".
  • Changed files tree in the sidebar, with the status of each file (A added, M modified, D deleted, R renamed) and the +/− line counts. Click a file to go to its diff.
  • MR header: number (!42, which opens the MR on GitLab), title, author and the Draft status, if any.
  • Shortcuts on each file: Open file opens the file in the editor, Compare in editor opens it in VS Code's native diff editor.
  • Follows the VS Code theme (light, dark, high contrast).
  • Fast even on large MRs: diffs load only when you reach them and very large files start collapsed.

Language

The extension uses the same language as VS Code, which by default is the one of your system. It is currently available in Italian and English; any other language falls back to English.

To have it in Italian, VS Code itself must be in Italian, which means the Italian Language Pack (Italian Language Pack for Visual Studio Code) must be installed. VS Code usually suggests it on its own at first launch on an Italian PC. If it is in English, you can change the language like this:

  1. Ctrl+Shift+P → Configure Display Language;
  2. choose Italiano (if it is missing, install the language pack from the list);
  3. restart VS Code.

Requirements

  • VS Code 1.90 or later.
  • Git installed, with VS Code's Git integration enabled (it is by default).
  • The open project must be a git repository cloned from GitLab (gitlab.com or a company GitLab).
  • For private projects, either a GitLab Personal Access Token with the read_api scope (see below) or the GitLab CLI (glab) already logged in to your GitLab.

Installation

From the Visual Studio Marketplace:

  • From VS Code: open the Extensions view (Ctrl+Shift+X), search for MR Visualizer and click Install.
  • From Quick Open (Ctrl+P): paste ext install devastuxx.mr-visualizer and press Enter.
  • From a terminal: code --install-extension devastuxx.mr-visualizer.

After installing, the MR Visualizer icon appears in the activity bar (on the left).

Without access to the Marketplace (for example on closed company networks) you can install the mr-visualizer-<version>.vsix file: in the Extensions view click the … at the top right, choose Install from VSIX… and select the file.

First use

  1. Open the project in VS Code and check out the MR's branch, for example feature/login.

  2. Click the MR Visualizer icon in the activity bar. The extension immediately looks for the open MR on that branch.

  3. On the first request to GitLab you are asked for an access token:

    • on GitLab open your profile settings (Edit profile → Access tokens) and click Add new token;
    • select the read_api scope for read-only access, or api if you also want to edit MR titles and descriptions;
    • create the token;
    • paste it in the box VS Code shows you.

    The token is stored in VS Code's secure keychain (SecretStorage) and you are not asked again.

    Already use the GitLab CLI? You can skip the token: if GitLab refuses the request and you are logged in with glab auth login, the extension reads the CLI's token (glab auth status --show-token) and uses it, without storing it. The token you saved in VS Code is tried first, the CLI second, the prompt last.

  4. If the MR exists, the panel opens with all the changes and the file tree fills up. If it does not, you see the notice "No open MR on this branch" and the panel shows the branch's changes (see below).

You can run the search again at any time with MR Visualizer: Open Merge Request of Current Branch from the Command Palette (Ctrl+Shift+P) or with the icon at the top of the tree.

Navigating the panel

Action How
Switch between All files and One file All files / One file buttons in the top bar
Previous / next file ‹ › arrows at the top, the [ and ] keys, or the arrows in the editor title bar
Jump to a file Drop-down menu next to the arrows, or click in the side tree
Side-by-side / inline view Side-by-side / Inline buttons
See the whole file Full file button
Remove the horizontal scroll Wrap lines button
Resize the before/after panes Drag the handle between the two panes (double-click to reset, left/right arrow keys to adjust)
Collapse or expand a file (All files) Click the file header, or Collapse all / Expand all
Mark a file as reviewed Reviewed checkbox in the file header or in the side tree; the file collapses
See what is left to review The "x/y reviewed" indicator at the top, or the Review box above the files
Open the MR on GitLab Click the !42 number at the top
Revert a change ↶ icon at the start of the block's first line, on the additions side, or in the file header for the whole file
Update after new pushes or file changes Refresh icon at the top of the tree

Without an MR: the branch's changes

When the branch has no open MR, the extension shows the changes made since the branch diverged from the target branch. The target branch is main, configurable with mrVisualizer.defaultTargetBranch, and if it exists its remote version (origin/main) is used. The changes include:

  • the branch's commits;
  • uncommitted changes;
  • new files not yet added to git (except those in .gitignore).

The staging area (git add) is not touched. No merge request appears at the top. After editing files, press Refresh to update the view.

You can open this view even if the MR exists, with MR Visualizer: Show Changes of Current Branch or the branch icon at the top of the tree.

Reverting a change

  • ↶ on a block, on the additions side (right column in side-by-side view), at the start of the block's first line: reverts only that block. The other blocks, even nearby ones, stay as they are.
  • ↶ in the file header: reverts all the changes to that file. An added file is deleted, a deleted one is restored.

The revert modifies the file in your working copy, after a confirmation:

  • Without an MR: the view updates immediately.
  • With an MR: the change will show up after commit and push. The MR's branch must be checked out.

If the file has changed compared to what is shown, the revert touches nothing and asks you to refresh the view. It is not available for binary files.

MR title and description

The Merge Request box in the left column, below the file list, shows the title and description of the open MR:

  1. edit them;
  2. press Save (or Discard changes to go back to the saved values).

Automatic suggestion (✨ magic)

Next to Title and Description there is the ✨ button, which proposes the text starting from the MR's commits, changed files and diff:

  • With a language model in VS Code (for example GitHub Copilot) the text is written by the model. The first time VS Code asks for permission to use it.
  • Without a model, or if the model does not answer, the title comes from the commit (if there is only one) or from the branch name, and the description lists commits and files.
  • Language: the one of VS Code, or the one already used in title, description and commits.
  • Draft: prefix: if the title has it, it is kept, so the MR stays a draft.

The suggestion only fills the field: review it, fix it, then press Save. Discard changes goes back to the saved text.

Saving

A token with the api scope and the permissions to edit the MR are needed. If the saved token is read_api, a new one is requested on the first save. If someone changed the MR on GitLab in the meantime, you are asked whether to overwrite it. What you type is kept even if you hide the box.

Manual branch comparison

You do not need an MR to use the view: MR Visualizer: Compare Branches… lets you pick a source and a target branch and shows the differences as GitLab would.

The comparison starts from the point where the two branches diverged (merge-base), so commits that arrived in the meantime on the target branch do not show up as changes. With the Swap icon you can invert source and target.

Commands

All commands are in the Command Palette under the MR Visualizer category. With VS Code in Italian they appear translated (e.g. Apri la Merge Request del branch corrente, Confronta branch…).

Command What it does
Open Merge Request of Current Branch Looks for the open MR on the current branch and shows it; if there is none, shows the branch's changes
Show Changes of Current Branch Shows the current branch's changes against main, including uncommitted ones
Compare Branches… Compares two hand-picked branches
Set GitLab Access Token Sets or replaces the token (leave empty to remove it)
Refresh Reloads the comparison (e.g. after a push to the MR)
Swap Source and Target Inverts the branches (manual comparison only)
Previous File / Next File Previous / next file
Toggle All Files / One File Changes the navigation mode
Toggle Side-by-side / Inline Changes the diff style

Settings

From VS Code's Settings (Ctrl+,), searching for "MR Visualizer":

Setting Default Description
mrVisualizer.fileDisplayMode all all = all files one below the other, single = one file at a time
mrVisualizer.diffViewMode side-by-side side-by-side (pre-merge on the left, new on the right) or inline
mrVisualizer.largeDiffThreshold 1000 Files with more changed lines start collapsed in the All files view
mrVisualizer.defaultTargetBranch main Target branch for the branch changes without an MR, and the one proposed in the manual comparison
mrVisualizer.gitlabUrl (empty) URL of the GitLab instance; if empty it is derived from the git remote (see below)

Troubleshooting

"Target branch … not found" The target branch for the view without an MR exists neither remotely nor locally (e.g. the project uses master or develop). Set mrVisualizer.defaultTargetBranch.

The revert says the working copy does not match The file changed after the view was loaded or, with an MR, your local copy is not aligned with the MR. Press Refresh (and, with an MR, run git pull) and try again.

"No open MR on this branch" but the MR exists

  • Check that you are on the right branch: it must be the MR's source branch.
  • The MR must be open: closed or already merged MRs are not shown.
  • MRs opened from a fork live on the original project: open the repository with the target project's remote.

You are asked for the token even though you already entered it The token has expired, was revoked or does not have the required scope: read_api to read, api to edit title and description. Create a new one and enter it, or use Set GitLab Access Token. If you use glab, check that glab auth status --hostname <your GitLab> shows you as logged in.

"Remote … is not a GitLab project URL" or GitLab unreachable The extension uses the current branch's remote (or origin) to find out which GitLab to query. If your GitLab has a web address different from the SSH one, for example the remote is git@ssh.gitlab.company.it:team/project.git but the site is https://gitlab.company.it, or if GitLab is installed under a sub-path, set mrVisualizer.gitlabUrl.

"The commits of !N are not available locally" The extension tries a git fetch on its own. If that is not enough, run git fetch by hand and press Refresh.

The diff shows "Binary file not shown" or "No content changes" The first is a binary file (images, archives…). The second is a file that was only renamed or whose permissions alone changed.

Support

For problems, questions or suggestions write to dev@test.test.

Privacy

  • The extension contacts only the GitLab instance of your repository: to read MRs and, only when you press Save, to update their title and description (API v4).
  • The token stays in VS Code's secure keychain and is sent only to that instance. If you use the GitLab CLI, the extension runs glab auth status --show-token locally to read its token; that token is used for the request and is not stored.
  • Only when you press ✨: the MR's commits, file list and diff (up to about 24,000 characters) are sent to the language model configured in VS Code (for example GitHub Copilot), under that service's terms. Without a model nothing is sent.
  • Code and diffs are read from the local git repository: apart from the ✨ case above, nothing is uploaded elsewhere.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft