Full Code Reviews in CodeSandbox
Tags: webdev, programming, reviews
Published: 2023-08-02 16:40:20

---
title: Full Code Reviews in CodeSandbox
published: true
description: The all-in-one solution for code reviews. No context switching, no waiting, no ambiguity.
tags: webdev, programming, reviews
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s509lr7wf3f38q5lgfst.png
canonical_url: https://codesandbox.io/blog/full-code-reviews-in-codesandbox
---

**At CodeSandbox, we run your code in our cloud infrastructure, configure the environment for you and keep your code always ready, behind a shareable URL. Give it a try with this [Next.js example](https://codesandbox.io/p/sandbox/next-js-fxis37) or [import your GitHub repo](https://codesandbox.io/dashboard?import_repo=true)!**

---

The way we review PRs hasn’t changed much in the last few decades. But that doesn’t mean it should remain the way it is

If we zoom into the process itself, it quickly becomes clear it’s highly inefficient for both the person requesting a review and those reviewing it.

Typically, the person creating the PR will try to organize their work into meaningful commits, provide some context in the description, and then add reviewers. Those reviewing the PR will likely need to stash the changes of their current work before spinning up the review branch locally, and then hop between their local editor and GitHub to reference any prior conversation.

Even though this is *status quo*, each step of the way opens the door to context-switching, fragmented communication and ambiguity. So that’s why we’re thrilled to present CodeSandbox as an all-in-one solution for code reviews 🎉

## The Cost of Review Chaos

As we found in our recent report on “[The State of Code Reviews](https://codesandbox.io/the-state-of-code-reviews-report-2023)”, one of the main frustrations of the code review process is context switching. More than breaking your current flow, stopping your work to checkout another branch locally is a significant time sink—especially when you have to tinker with the setup if something is not up-to-date.

Then, spinning up a dev server to visually inspect the changes may result in 5+ minutes of idle time waiting for the server to start. And to cap it all off, communication is often scattered between GitHub, Slack, Jira and synchronous meetings—which builds up ambiguity and frustration for everyone involved.

Multiply all this by the number of reviews done per week and you’ll likely land on 1-5 hours lost every week for each developer in the company. Of course, some developers might choose to avoid dealing with all of this and just check the code diffs and “[LGTM](https://codesandbox.io/blog/lgtm-or-tldr-the-problem-of-cop-out-code-reviews)!”.

Suffice it to say, this is far from ideal.

## Code Reviews in CodeSandbox

As a team of developers, we have felt this pain at CodeSandbox. So we decided to build a PR review workflow that solves what we have identified as the fundamental problems of code reviews:

1. Context switching:  This breaks the coding flow and siphons energy from developers.
2. Idle time: Setting up and running a branch locally takes too much time and is prone to errors and inconsistencies.
3. Lost context: Scattered communication leads to loss of context, ambiguity, cop-out reviews, and lower code quality.

Thanks to the instant cloud development environments provided by the [“new” version of CodeSandbox](https://codesandbox.io/dashboard/repositories), we are giving a dedicated [microVM](https://codesandbox.io/docs/learn/environment/vm) to every branch (and every PR) while making sure that it resumes in 1 second. And if you configure our GitHub App, we automatically comment on every PR with a link to this microVM, so you can start reviewing immediately.

<a href="https://codesandbox.io/new/blog/full-code-reviews-in-codesandbox/review-github-app-fast.mp4" target="_blank"><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2prielkhsvqhxf63f3mw.png" alt="Video thumbnail"></a>

This is a game-changer. It means that you’ll never have to wait for a dev server ever again. Plus, because we run it all in our cloud infra, you can open as many simultaneous branches as you’d like, each with its own dev server running. Then, you can share them with a URL with any team member so they can access them just as quickly—either through our web editor, [VS Code](https://marketplace.visualstudio.com/items?itemName=CodeSandbox-io.codesandbox-projects), or our [iOS app](https://apps.apple.com/us/app/codesandbox/id1423330822).

While this already brings a lot of value, we still wanted a way to improve problem #3: communication. And that’s the latest major update we’ve brought to CodeSandbox: built-in review functionality.

This [update](https://codesandbox.io/docs/learn/repositories/review) brings all the review tooling you know and love, built into CodeSandbox with two-way sync with GitHub. Now, on the new PR review panel you will find:

- a list of reviewers
- the review state
- a view of changes by file
- support for adding line comments to diffs
- AI-generated review messages
- support for submitting reviews directly through the CodeSandbox UI.

<a href="https://codesandbox.io/new/blog/full-code-reviews-in-codesandbox/review-features.mp4" target="_blank"><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hukfd9vac1wu7p5x5xah.png" alt="Video thumbnail"></a>

After beta testing this with the first batch of teams, we have received [overwhelmingly positive feedback](https://codesandbox.io/blog/how-adverity-uses-codesandbox-to-improve-developer-experience) and are happy to roll it out to everyone!

If you’re interested, don’t miss our tutorial on how to set things up. You simply need to set it up once per repo—and in most cases, it just takes 5 minutes!

{% youtube dRkpuUMHCNQ %}

## A Win for Builders

Code reviews are probably not every developer’s cup of tea. But they’re still a crucial part of the development process.

So we are thrilled to empower builders to win back hours every week that they can reinvest in the parts of coding that they love.

Give it a try by [importing a repo](https://codesandbox.io/dashboard?import_repo=true)! We have a 14-day [free trial](https://codesandbox.io/pro?team) you can use to test all our features.

And as always, do let us know how we can make this experience even better for you. Leave a message on [Discord](https://discord.gg/C6vfhW3H6e) or tag [@codesandbox](https://twitter.com/codesandbox) on Twitter. We’d love to hear from you!