Skip to content

Add support to open local file during MR reviews (file diff view)

Problem to solve

When reviewing a merge request sometimes it's better to have better insights on the file like the file path, checkout neighboring files and folder etc.. and sometimes we might even need to open the file in the local to make a small change to see if it would workout or not.

Proposal

Utilize a native feature in VScode to open a diff view while knowing the local path of that file, that will enable few features in VScode like (open file) button, the breadcrump and will allow some of "gitlens" extension features get activated

Further details

Current GitLab Workflow MR file diff view actions: GL

Assumed to be an achievable behavior (Notice the breadcrumb and the "open file" action on the left): GH

I'm aware that the file path is already available on hover, but that doesn't exactly give the features of a breadcrumb found in VScode. GL_path

Some of the features activated by gitlens when a local file with history is diffed (Git blame, refs navigation): GH_gitlens

Links / references

(I've no knowledge of the VScode APIs)