Skip to main content
This page walks you through the different sections of the Graphite PR page, and their purposes. You can be notified that a PR needs your review in Graphite in one of two ways:
  • Pull requests appear in the Needs Review section of your pull request inbox
  • Through the Graphite integration for Slack

Stack

The Stack section shows you all the PRs that are stacked alongside the PR you’re currently viewing.

Description

The description editor supports rich-text editing and Markdown. You can quickly access robust rich-text formatting options by typing a / in the description to do things like adding images, formatting as code, inserting tables, collapsible sections, and alerts. You can use the toggle in the top left of the section to switch between editing in rich-text or as Markdown. You can click the “Generate” button to have Graphite Agent automatically generate a PR description. Click Save in the upper right corner to save your changes. Description editing

Discussion

Discussion is below the PR description, and contains PR-level comments that aren’t related to a specific line of code.

PR info & status

PR info and statuses appear in the top right of the page.
  • Status of the PR appears at the top right of the page.
  • Review status shows whether the PR is waiting on reviewers or if it’s ready to merge. It will also show if Graphite Agent found any issues.
  • Checks is an expandable toggle that contains your CI checks and their information. You can click on the checks to open them in GitHub.
  • Reviewers contains the currently assigned reviewers. You can hover over the reviewers to remove them or re-request a review.
  • Labels are the labels assigned to the PR, where you can add or remove them.
  • Assignees are the owner(s) of the PR.
  • Related tasks are related tasks from your project management platform (such as Linear).
The file tree is expanded by default next to the diff, below the PR Description and Discussion sections. Clicking on a file name in the file tree will scroll you to that file in the diff. You can press F to expand or collapse the file tree. When the file tree is collapsed, the list of files is still accessible from a table of contents visualizer on the left side of the page. Adding comments

Start a review

You can start a review by hovering over a line number to leave a comment. Clicking the line number will allow you to leave a comment on a single line. Clicking and dragging across multiple lines will allow you to leave a comment spanning those lines. Graphite allows you to comment on both changed and unchanged lines of code. Adding comments Clicking the comment icon that appears next to the line number will open a comment editor to the right of the diff. Comments support rich-text editing, and you can attach files or add a comment as part of a review. Hit Cmd+Enter to submit your comment once you’re done typing it, or click the blue up arrow. This posts the comment immediately — useful for one-off, non-opinionated comments. Checking the box next to “Add to review” will add the comment to a “batch.” Once you batch the comment, it will be pending and only visible to you until you’ve submitted your final review, at which point all of your batched comments will also be submitted. Adding a comment to review will cause it to appear in the “Finish review” button at the top of the page:

Suggested edits

While reviewing, you can directly leave a suggested code edit to streamline the review process.

Line-level actions & Graphite Agent

If you hover over any lines in the diff, you can use the overflow menu to perform actions on the associated lines of code.
  • Add comment allows you to add a comment on that line.
  • Suggest change allows you to add a suggested edit.
  • Add to chat will open the Chat sidebar and add the selected lines to the Chat context, where you can prompt Graphite Agent to fix the code, explain it, or improve it.
  • Copy code allows you to copy the code from that line.
  • Copy link creates a shareable link to the line of code you selected.
Adding comments

Submitting your review

To finish your review, you can click the “Finish review” button at the top of the page, or you can scroll down to the bottom of the diff and click “Comment” (R then C), “Request changes” (R then N), or “Approve” (R then A). Using any of these options will open a panel where you can comment, request changes, approve, or submit your review with a review summary comment. If you’d like to approve a PR without a comment, use the shortcut R then Y to quick-approve.