Why vscode.dev is a game changer for code reviews
Learn how the new service can improve your GitHub PR process.
On October 20, 2021, Microsoft launched vscode.dev with little fanfare. It deserves much applause because it can radically improve in-browser code reviews. Keep reading to learn more about the service and how it can help you improve your GitHub Pull Requests (PRs).
GitHub is the leading service for hosting your source code, with a rich set of features and a busting ecosystem of integrations and apps. But when it comes to reviewing PRs, the GitHub web interface leaves much to be desired.
The ‘Files changed’ tab shows you an excerpt or “diff” of the changes. This is useful for looking at each change independently or in limited context (a few lines above and below). It works fine for a superficial review of the changes. However, code changes are rarely that isolated or simple.
To provide a more holistic and meaningful review, the reviewer has to jump around changed and unchanged (but related) files to understand the full context and scope of the PR. This is painfully hard to accomplish in GitHub’s web interface; which is why reviewers often resort to checking out the PR branch on the local dev machine.
For VS Code users, there’s the GitHub extension that enables you to do pull requests right from your editor — provided you have access to your fully configured development machine and you are willing to set up maintain GitHub logins.
The newly released vscode.dev service from Microsoft solves all of these problems with literally one key press. Press the . (period) key while in a Pull Request page to experience it yourself! Doing so will open a light-weight version of VS Code in your browser, dropping you right into the PR context while giving you a fully-functional editor you already know and love.
It takes one PR workflow to experience the benefits of using vscode.dev as your review tool.
- Navigate around the whole repository with familiar keyboard shortcuts — putting the PR changes in context of the overall codebase.
- Use smart navigation features like “Go to implementations” and “Go to references” to understand dependencies (supported for most popular languages).
- Add reviews with “inline reviews” comments, requested changes and approvals, right within the editor.
- Use the “Mark viewed” feature to put a checkmark against files you’ve already reviews — a super useful for large PRs.
- Make quick fixes and improvements in the PR branch and push the changes without leaving the browser.
At Pullflow, our mission is to help dev teams “achieve high-quality code reviews with delightful efficiency”. Given our mission, we spend a lot of time and energy on optimizing the code review workflow. We’ve replaced all our “online” code reviews with vscode.dev. This has improved both the speed and the quality of our reviews.
There are times when vscode.dev is not enough. For instance, some reviews require running the PR branch to better understand or validate the changes. For such cases, we fall back to our decked-out VS Code (with GitHub extension) running on our development machines, with all the local infrastructure needed to execute the code. There is also GitHub Codespaces if you prefer to have your development environment in the cloud.
All in all, vscode.dev is a welcome addition to our code review process. We encourage all dev teams to try it. Chances are, your preferred language is already supported and you will see the benefits right away.
If you use Slack and want to take your code review productivity to the next level, try vscode.dev with the Pullflow beta for a silky smooth GitHub + Slack workflow.
Resources:
