Comments are the primary feedback mechanism provided by Swarm. 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 Emoji emoticons, see Comment features for details.
You can add comments to:
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.
This section describes how to add comments.
Related comment features:
You can use @mention 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.
To hide the description comments, click X Comments (where X is the number of description comments that exist). To display the comments again, click X Comments.
This section describes how to edit comments.
Related comment features:
Edit the comment content, including adding new attachments or removing existing attachments.
When you remove an attachment, the attachment is marked for removal, the green bar for the attachment is muted, and the X button is replaced with a Restore button .
Click the Restore button to the right of the attachment to keep the attachment on the comment.
Attachments cannot be restored after the comment edit has been saved. In this case you must edit the comment again and add the attachment to it.
Click Save to save the edited comment and remove any attachments marked for removal. The comment timestamp is marked as (edited) to show that the comment has been changed. Swarm sends a notification to everyone involved in the review, including the review author and the reviewers, but not the editor of the comment.
Swarm does not provide a mechanism to see older versions of edited comments.
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.
To flag a comment as a task, select the Flag as Task checkbox when posting a comment, or click the Flag button in the upper right of an existing comment and select Flag as 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.
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:
A comment with a green check indicates that the task has been addressed. Click the Green Check button to display a drop-down menu with the following options:
A comment with a blue double-check indicates that the task has been verified. Click the Blue Double-check to display a drop-down menu with the following option:
A summary of the number and status of comments flagged as tasks is displayed below the code review description. Archived comments that are flagged as tasks are not included in the summary.
Click the Task list button to display a dialog listing all 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:
Archived tasks do not appear in the Tasks dialog.
To view a particular task, select the task in the Tasks dialog, and click the View button. Alternately you can double-click on the task in the Tasks dialog. The Tasks dialog closes and Swarm adjusts the review display so that the chosen task is in view.
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 Swarm 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 Prevent 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 Approve or, Approve and Commit a review that has open tasks with Swarm, 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.
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.
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 Swarm administrator, see Comment notification delay.
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 Swarm. 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 Swarm administrator, see Comment threading.
If the thread depth is reduced by a Swarm administrator, earlier replies at a deeper level will continue to be displayed but you cannot reply to them.
To reply to a comment:
Swarm comments support Emoji short-hand; when you save a comment, emoticon text like :smile:
is displayed as: . Hover your mouse over an Emoji emoticon to see a tooltip displaying the text short-hand for the emoticon:
For more information on Emoji, see Emoji on Wikipedia. Emoji emoticons are listed in the Emoji Cheat Sheet.
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.
Arbitrary files can be attached to comments. This is useful for sharing documents that are helpful in code reviews, such as screenshots of error conditions, reference code, etc.
Swarm 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.
To attach a file to an open comment:
Multiple files can be attached to a comment, either one at a time, or by dragging a group of files. Folders cannot be attached to comments.
The filename and file size is displayed in the comment for each attached file, click on the filename to view the file.
When comments are viewed in the Comments tab, image previews are displayed for the attached images.
Image previews are only displayed in the Comments tab, they are not displayed when a comment is viewed in the Files tab.
As an authenticated user, you can like a comment by clicking the muted heart icon beneath the comment .
When you like a comment, a notification is sent to the author of the comment , and the heart icon changes to red to indicate that you have liked the comment . The number of likes the comment has is displayed next to the heart icon. If a comment is edited, all of the likes for that comment are removed.
Hover your mouse pointer over the number of likes to display the usernames of everyone that has liked the comment:
Click the heart icon again to unlike a comment.
You cannot like/unlike a comment that has been archived.
When comments are added to files in a review, on lines that have been changed, Swarm 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.
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:
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.
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, Swarm 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:
Mark a single comment as unread:
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.
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 button is only available for top level comments, if a comment has replies they are archived with the parent comment.
To archive a comment:
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.
Click on the archived comments button to toggle the archive comment display on and off.
Archived comments can be restored. If archived comments have replies, the replies are also restored.
To restore archived comments: