JetBrains Space Help

Discussion and Comments in Code Review

All code review participants can discuss changes right within a review by posting comments and reply to the comments left by others.

Comments posted on the review pages also appear in the participant's Chats in a dedicated channel. So, once a discussion is started, you can continue either from Chats or from the review — all comments and replies are synced.

Types of comments

There are two types of comments you can post:

  • Review comment is not tied up to any particular file or part of code — its subject matter may be anything within the scope of the review.

  • Line comment is intended to pinpoint and discuss a particular line of code in one of the files being reviewed. A line comment can be continued as a discussion which can be marked resolved when finished.

To post a review comment:

  1. On the Review page, go to Timeline (it's the default view).

  2. Enter your message in the text box and either post it now (press Ctrl+Shift+P) or save (press Enter) to submit later with other comments.

    postReviewComment.png

    Your comment will be displayed in the Timeline feed.

  3. You can also:

    • Start a thread when replying to a comment.

    • Add a reaction (emoji) to a posted comment.

    • Copy a link to a comment (to show a comment to someone).

    • Edit or delete your comment.

    Hover over the comment area and choose the desired action:

    reviewCommentOptions.png

To post a line comment:

  1. On the review page, go to the Changes tab.

  2. Select the commit (if more then one included) and the file to display its diff.

  3. In the diff, select the line you want to comment by clicking the edit icon to the left:

    postLineComment.png
  4. Enter your message in the text box and either post it now (press Ctrl+Shift+P) or save (press Enter) to submit later with other comments.

    Your comment will be embedded in code and highlighted with yellow.

  5. postedLineComment.png
    • You can reply to comments left by others.

    • When a discussion comes to a logical end, it can be marked as resolved.

    • You can hide discussions to reduce noise when viewing the code.

Posting options

Any comment you write can be submitted right away — just click Post now or press Ctrl+Shift+P. However, each time you post a comment, a notification is sent to the other party. If you don't want to disturb other participants before you are finished reviewing or revising, you can save your comments as drafts and submit them all at once when you're done.

To save your comment as a draft, just press Enter or click Save draft.

When you're ready to submit your saved commments, change your status to Waiting:

  • If you are author, click Update review:

    authorUpdateReview.png
  • If you are reviewer, click Finish → Wait for response (or Accept changes if you're ready to approve):

    reviewerCommentsWait.png

Your comments will be posted and the other party will be notified.

Last modified: 05 March 2021