Helix Core is now P4 and Helix Swarm is now P4 Code Review. Product user interfaces will be updated soon. Learn more >>

Documentation | 2025.5

# Comments

Comments are the primary feedback mechanism provided by P4 Code Review. Review comments can be flagged as tasks for a lightweight workflow within a review that helps authors and reviewers prioritize review feedback, see Tasks for details. By default, comment notifications are delayed to allow you to add or edit comments as you progress through a review without sending a notification for each individual comment on the review. Comment notifications are rolled up into a single notification that you can either leave to be sent automatically, or you can send manually, see Comment notification delay.

You can also like comments, add links, add attachments, and add Emojis, see Comment features for details.

- Markdown content is displayed in review comments, but Markdown support is limited to prevent execution of raw HTML and JavaScript content. For information about Markdown, see Markdown in comments and review descriptions

- If you use Markdown styles in your review comment, P4 Code Review renders them when you post the comment.

You can add comments to:

- A changelist, review, or job
- A review description
- A changelist description
- Lines in a changelist, or review
- A file in a changelist, or review

Access comments for a changelist, review, or job, by clicking the Comments tab. The number of open (non-archived comments) is displayed in the tab. Hover your mouse pointer over the comment count, the tooltip shows how many comments are archived. See Archiving comments for details.

## Adding comments

This section describes how to add comments.

Related comment features:

- Comment notification delay
- Reply to comment
- Emoji
- Links
- Attachments
- Markdown

You can use Links in descriptions and comments in comments. An @mention includes the specified user in the review, and they will receive a notification whenever there is an update to the review.

### Commenting on a changelist, review or job

1. From the changelist, review, or job page: click Comments to view the Comments tab.

2. Add your comment in the text area.

3. (Optional) To add a file, drag and drop the file into the text area. Text must by provided when adding a file. The image files are previewed once the comment is posted.

4. Click Post.

   Use the keyboard shortcut Ctrl + Enter to submit the comment or form.

### Commenting on a review description

1. From the changelist or review page description area: click Comments (n) (where n is the number of comments that already exist).
2. Click Add a comment.
3. Add your comment in the text area.
4. Click Post.

To hide the description comments, click Comments n (where n is the number of description comments that exist). To display the comments again, click Comments n.

### Commenting on a changelist description

1. From the changelist or review page description area: click Add a Comment or n Comments (where n is the number of comments that already exist).
2. Add your comment in the text area.
3. Click Post.

### Commenting on lines in a file in a changelist or review

You can add a comment to a single line or a set of lines in a file in a changelist or review.

1. From the changelist or review page: click Files to view the Files tab.

2. To add a comment to a single line, click on the line to comment on.

3. To add a comment to multiple lines, select the lines and click on the comment icon within the pop-up.

4. Add your comment in the text area.
5. Optional (Review page only): Select the Flag as Task checkbox to mark the comment as a task that needs to be addressed.
6. Click Post.

### Commenting on a file in a changelist or review

1. From the changelist or review page: click Files to view the Files tab.
2. If there are multiple files, click the file you want to comment on to expand its view.
3. Click the Add a comment link in the footer of the file display.
4. Add your comment in the text area.
5. Optional (Review page only): Select the Flag as Task checkbox to mark the comment as a task that needs to be addressed.
6. Click Post.

To close an empty comment text box, click outside the comment text box or select Esc on your keyboard.

## Editing comments

This section describes how to edit comments.

Related comment features:

- Comment notification delay
- Reply to comment
- Emoji
- Links
- Attachments
- Markdown

- You can only edit comments that you have created.
- If a comment is edited, all of the likes for that comment are removed.

1. Click the comment Edit comment link.

2. Edit the comment text.

3. Add attachments or remove attachments. For instructions on adding and removing attachments, see Comment attachments.

   If you remove the wrong file attachment but have not saved the comment yet, click Cancel, and the file will remain attached to the comment.

4. Click Save to save the edited comment.

   P4 Code Review sends a notification to everyone involved in the review, including the review author and the reviewers, but not the editor of the comment.

   The comment timestamp is marked as (edited) to show that the comment has been changed.

To close an empty comment text box, click outside the comment text box or select Esc on your keyboard.

P4 Code Review does not provide a mechanism to see older versions of edited comments.

## Tasks

Flagging review comments as tasks is a lightweight workflow within a review that helps authors and reviewers prioritize review feedback. Any comment on a code review can be flagged as a task, indicating to the code review's author that the described issue needs to be addressed, and that the review is unlikely to be approved without a fix.

Changelist and Job comments cannot be flagged as tasks.

### Flag a comment as a task

To flag a comment as a task, select the Flag as Task checkbox when posting a comment, or click the Comment actions button in the upper right of an existing comment and select Flag as Open task in the drop-down menu.

If you do not have permission to archive comments, you do not have permission to flag comments as tasks. Anonymous users never have permission to archive comments, and can only view current task states.

### Set a task to Task addressed or Not a task

Once a comment is flagged as a task, it is considered to be an open task. Click the Red flag button to display a drop-down menu with the following options:

- Task addressed: usually used by the author of the review to indicate that the issue has been fixed.
- Remove task: used to correct comments that have been flagged as tasks by mistake.

### Verify a task, verify and archive a task, or reopen a task

A comment with a green check indicates that the task has been addressed. Click the Green check mark button to display a drop-down menu with the following options:

- Verify task: usually used by the author of the comment, or another reviewer, after confirming that the issue is fixed.
- Verify and Archive (only supported in the classic review page): used to both indicate that the issue has been fixed, and to archive the comment so that it is hidden from view. Archived tasks, whether they are open, addressed, or verified, are not included in the task counts for the code review.
- Reopen task: used if the issue needs further work after it has been marked as addressed.

### Reopen a task

A comment with a blue double-check indicates that the task has been verified. Click the Blue double-check mark button to display a drop-down menu with the following option:

- Reopen task: used if the issue needs further work post-verification, or if verification was made by mistake.

### Task details

A summary of the number and status of comments flagged as tasks is displayed in the Information panel to the right of the review.

Archived comments that are flagged as tasks are not included in the summary or the Tasks dialog.

- Red Flag: Displays the number of open tasks on the review.
- Green check mark: Displays the number of addressed tasks on the review.
- Blue double-check mark: Displays the number of addressed and verified tasks on the review.

Show Task details : Click to display a dialog listing all of the tasks associated with the review:

Within the Tasks dialog, you can filter the tasks by the Reporter (the userid of the user who created the task), and/or by task state using the buttons at the top of the dialog:

- Click the Red flag button to display only open tasks (comments that need to be addressed).
- Click the Green check mark button to display only addressed tasks (comments that have been addressed).
- Click the Blue double-check mark button to display only verified tasks (comments that have been addressed and verified).

To change the state of a task from the Tasks dialog, click the task state dropdown for the task and select the new task state.

To view the full comment text for a task, click the ellipses to the right of the task.

### Approve a review with open tasks

Flagging a comment as a task provides a visual indication that there is an identified issue that needs to be addressed before the review can be approved, see Set a task to Task addressed or Not a task.

If P4 Code Review is configured to prevent approval of reviews with open tasks and a review has open tasks, the Approve, and Approve and commit options will not be available for the review. This option is configured by an administrator. See Disable approve for reviews with open tasks.

To approve, or approve and commit a review with open tasks, you must address the tasks first and then set them to Task Addressed, or Not a Task. See Set a task to Task addressed or Not a task for details.

If you select Approve or Approve and Commit for a review that has open tasks, a warning message is displayed in the Update Review dialog. The warning is only advisory, either click Cancel and address the open tasks or click Approve to approve the review. Archived open tasks will not trigger the warning message.

## Comment features

The various features available for commenting in P4 Code Review include:

- AI Assistant

- Comment notification delay

- Reply to comments

- Emojis

- Reacting to comments

- Links in comments

- Comment attachments

- Comment context

- Unread comments

### AI Assistant

Use the AI Assistant to review and improve the text in a comment before you post it.

Beneath the comment text box, click AI Assistant and select one of the following options:

- Improve comment

- Summarize writing

- Fix spelling and grammar

The text is sent to an AI vendor and returned for you to review.

To keep the suggested text, click Accept. To go back to the AI Assistant options, Click Discard and select another prompt.

The text is not posted as a comment, it is just added to the comment text area.

After you have accepted the AI suggested text, if you prefer your previous comment, click Revert to restore the text replaced by the AI suggestion.

You can add custom prompts to the AI Assistant and update the default prompts. For information on how to update the AI assistant prompts, see AI Assistant for comments.

### Comment notification delay

By default, comment notifications are delayed to allow reviewers to add or edit comments as they progress through a review without sending a notification for each individual comment on the review. Comment notifications are rolled up into a single notification and sent either manually by the reviewer, or automatically after the notification delay time has been exceeded.

The delay countdown is reset each time the reviewer adds or edits a comment on the review, by default the notification delay time is set to 30 minutes.

- If you are commenting on more than one review, each of the reviews that you are commenting on has its own notification delay countdown that only applies to the comments that you make on that review.
- If another reviewer is making comments on the same review as you, that reviewer has their own notification delay timer for that review.
- If you manually send a delayed comment notification, the notification will only contain the comments that you made on that review.

The comment notification delay does not delay the posting of the comments, only the comment notification is delayed.

Comment notifications are only delayed for comments on reviews. Comments on commits or jobs produce notifications immediately.

The notification delay time is a global configuration setting configured by the P4 Code Review administrator, see Comment notification delay.

#### Manually send the comment notification immediately:

1. Add or edit your comment as normal.
2. Click the Post and notify (n) button to the right of the comment box.
   Where (n) is the number of delayed comment notifications in the queue waiting to be sent, this number does not include the current comment you are working on.

- If you forget to click the Post and notify (n) button, click the Send All Notifications (n) button below the review description to send all of your notification for the review immediately.
- Only the comments that you have made on this review are rolled up into the notification that is sent when you click Post and notify (n) or Send All Notifications (n).

### Reply to comments

By default, you can reply to comments, replies are displayed in a thread below the parent comment. Comment thread depth is set to 4 by default, this means you can have up to 4 levels of replies for a parent comment. The Reply link is not displayed for replies at or above the maximum thread depth set for P4 Code Review. If the parent comment is archived, replies are archived with the parent, see Archiving comments.

Comment replies can be disabled, and the thread depth can be increased or reduced by a P4 Code Review administrator, see Comment threading.

If the thread depth is reduced by a P4 Code Review administrator, earlier replies at a deeper level will continue to be displayed but you cannot reply to them.

To reply to a comment:

1. Click Reply below the comment you are replying to.
2. Add your comment in the text area.
3. Click Post.

### Emojis

P4 Code Review comments support Emoji shorthand. So when you save a comment, emoticon text like :smile: is displayed as:

For a list of supported emojis, see the Emoji Cheat Sheet.

### Reacting to comments

Add an emoji to a comment by clicking the emoji icon beneath the comment. Choose from the standard selection of emojis and also the color of the skin used in the emojis.

You can add as many emojis to a comment as you like. When you add an emoji to a comment, a Notification is sent to the author of the comment.

To use the same emoji as another user, click on the emoji attached to the comment. The number next to the emoji corresponds to how many users have reacted to the comment with the same emoji.

To remove an emoji you have added, just click on the emoji.

### Links in comments

Whenever you include a URL in a comment, it is automatically made into a link.

If the link points to an image, or a YouTube video, that resource is displayed at the end of the comment. For information about linking images and videos, see Common text styles.

### Comment attachments

- P4 Code Review must be configured to enable comment attachments. Once the configuration is complete, the comment area will include the following text Drop files here to attach them.

- By default, the maximum file size of a single comment attachment is limited to:

  - Ubuntu: 8Mb

  - RHEL 8 and later: 2Mb

  Your P4 Code Review administrator can increase the maximum attachment size if required. See Increasing the maximum attachment file size.

Files can be attached to comments. This is useful for sharing files in code reviews, such as screenshots of error conditions, reference code, and documents.

When a file is attached to a comment, you can:

- Hover over the attachment to see its filename and file size.

- Click the attachment to open the file in a new browser tab.

- Hover over the attachment and click the Download button to download the file.

#### Adding attachments to a comment

Multiple files can be attached to a comment, either one at a time or multiple files at the same time.

To attach a file to an open comment:

1. Do one of the following:
   - Drag the files from your file browser and drop them on the comment.

   If you drag a folder onto a comment, all of the files in the folder and the files in any subfolders are added to the comment.

   - Click Choose your files and select the files from the browse dialog.

   You cannot add folders to a comment using the file picker.

2. If you attach a file to the comment by mistake, you can remove it by clicking the X button on the attachment.
3. Click Post.

The file attachments are displayed below the comment text and image thumbnails are displayed for supported image formats.

#### Removing an attachment from a comment

1. Click the comment Edit comment link.

2. Hover over the attachment you want to remove and click X to remove the file.

3. Confirm you want to remove the attachment when prompted.

4. Click Save to save the comment.

If you remove the wrong file attachment but have not saved the comment yet, click Cancel, and the file will remain attached to the comment.

### Comment context

When comments are added to files in a review, on lines that have been changed, P4 Code Review records several lines of context before the line receiving the comment. This helps makes sense of the comments should later changes remove those lines.

Each comment associated with that line has a record of the context, but only the first comment displays that context.

### Unread comments

P4 Code Review displays unread comments as a fraction X/Y, where X is the number of unread comments and Y is the total comments. The unread comment count is specific to the logged-in user.

The number of unread comments is displayed in the review page, within the file header section and the comments tab. The number of unread comments is automatically updated as comments are read.

## Mark comments as read

When you mark a comment as read, the comment is rolled up into a single line to save space and make it easier for you to find comments you have not read. The read flag is remembered independently for each user.

Mark a single comment as read:

1. Click the Mark comment as read button to the right of the comment.
2. The comment is rolled up into a single line to save space.

Marking a parent comment as read will not mark the child comments as read.

Mark all of the comments on a review as read:

Mark all comments read will mark all the comments as read including the description comments.

1. Click the Review actions button.
2. Select Mark all comments read from the dropdown menu.
3. All of the comments in the review are rolled up into single lines to save space.

## Mark comments as unread

Marking a comment as unread expands the comment so that you can view the comment content. If a comment is marked as read and the comment changes, P4 Code Review will automatically clear the read flag so that you can see that the comment has changed. Changes that automatically mark a comment as unread are:

- Comment text is edited
- Comment attachments are added or removed
- Comment is marked as a task
- Task is reopened
- Comment or task is unarchived

Mark a single comment as unread:

1. Click the button to the right of the comment.
2. The comment content is expanded.

Marking a parent comment as unread will not mark the child comments as unread.

Mark all of the comments on a review as unread:

Mark all comments unread will expand the content of all the comments including the description comments.

1. Click the Review actions button.
2. Select Mark all comments unread from the dropdown menu.
3. The content of all of the comments in the review are expanded.

## Archiving comments

When you archive a comment, it is archived for all of the P4 Code Review users.

As a code review progresses, comments made on earlier versions of a file might become less useful. Archiving these comments tidies up the comment view and makes it easier to find the more important comments.

The Archive option is only available for top level comments, if a comment has replies they are archived with the parent comment.

To archive a comment:

1. Click the Comment actions button at the top right of the comment you want to archive.

2. Select Archive from the dropdown menu.

Archived comments are hidden from view, the number of archived comments that exist for the review is displayed in the archived comments button at the top of the Comments tab.

To display and hide archived comments:

Click on the archived comments button to toggle the archive comment display on and off.

## Restoring comments

When you restore a comment, it is restored for all of the P4 Code Review users.

Archived comments can be restored. If archived comments have replies, the replies are also restored.

To restore an archived comment:

1. Click the archived comments button at the top of the Comments tab to display all of the archived comments.

2. Find the comment you want to restore.
3. Click the Restore button in the top right of the comment to restore it.

Your search for returned results