# Review changes

Batch inline comments into one review and submit them together, from the
"Files changed" tab of a pull request.

## Commenting on a line

Pressing "+" on a diff line opens a comment form. If you may review the pull
request, the form offers two ways to post:

- **Add single comment** publishes the comment immediately, on its own.
- **Start a review** (or **Add review comment** once a review is pending) adds
  the comment to your pending review. Nobody else sees it until you submit.

Replies to an existing thread are always single comments.

Pending comments render with a yellow **Pending** mark under the line they
target. You can edit or delete them in place until the review is submitted.

Select a range of diff lines, then press "+" at an endpoint to comment on the
whole selection. The comment stays attached to that range when published or synchronized with GitHub.

**Comment on file** in a file header posts a standalone comment about that
file. File comments are not included in pending reviews.

Comments from earlier revisions remain grouped with their replies below the
diff. GitHub comments retain their original range and available diff context,
even when the original left-side revision cannot be recovered. Replies stay
in that existing thread.

## The pending review bar

While you have a pending review, a bar above the diff shows "N pending
comments" with two controls:

- **Review changes** opens the submit dialog listing every pending comment
  (file, line and body), a summary composer and the verdicts Comment, Request
  changes and Approve. With pending comments, Comment and Request changes no
  longer need a summary. Submitting publishes the review and all its inline
  comments at once.
- **Discard review** deletes the pending review and every comment in it.

The same **Review** button in the pull request header shows a count of pending
comments and opens the same dialog, so a review can also be submitted from the
Conversation tab.

## Revisions

A pending review is pinned to the pull request version and head/base revision
it was started on. If that version changes or the head or base moves, the bar says the review targets an earlier
revision: its comments are kept but no new ones can be added, and the dialog
asks you to discard it before reviewing the current revision.

## Viewed files

For signed-in users, the "Viewed" checkbox on each file follows you across
browsers for the same pull request revision. If the
head or base changes, files start unviewed again. Signed-out viewers keep a
browser-local copy only.
