Best way to leave comments when reviewing someone else's code?

Does anyone have some good ideas on how to do this? Our team has started working more and more with developers offsite and we haven’t found a good system for leaving review comments.

Hi @Dave, there is 2 options:

i) Use the Comment activity

ii) Right click the activity in workflow -> annotations -> add annotation

I’ve found a couple problems with these methods
1). It’s easy to miss both options (especially annotations)
2). It’s hard to differentiate between review comments/annotations and the comments/annotations that are there for explanation purposes.
3). It’s hard to tell when the comment is fixed and ready to be cleared, as well as finding where the comment is located within the workflow

Depending on your source control system, you could use commenting there.
TFS/AzureDevOps does this pretty nicely actually, especially since you can tag people directly (triggers a mail message) and comments have actionable statuses (you can reopen them if needed):
Downside is, the actual resolve action will be a separate changeset and you cannot (AFAIK) tag a changeset in a comment response, only a pull request (which is a bummer :frowning: ).

If you’re using git, then pull request revisions are the way to go. IMHO git handles this the most natural way - a dev can work however he wants until he wants to merge, then a review step is pretty much built-in to the functionality. (for git commenting can’t check right now)

If you’re using SVN, change :wink: jokes aside, no idea how that works there.

Alternatively, you could try staged changesets/commits. They’re a little bit of a hassle to get used to and do not integrate directly with UiPath Studio, but could work as well.

For anything inside the code, it’s always going to be a hassle, since it becomes part of the source code that’s committed to the repo, so even if the comment is unnecessary (can be removed) and no actual code change is required, you will still need to commit a change to that file.

If you would still want to have something in the code directly (as in - visible in the UiPath Studio), best bet might be a custom activity - something like an actionable comment.
Since it would be for only this purpose and could be it’s own package, you could then relatively easily script a removal of all before pushing to prod (strip project.json from dependency, remove it from xaml headers, remove all activity instances) with a simple text replace.
That might be overkill though :wink:


Obviously, you wouldn’t want to put review comments where explanation comments should be (note: you can pin annotation). So, it’s more like you want an update log, so whatever the reviewer changes gets updated there. I think this update log would be an external file (like in Word or Excel maybe with image snippets), or utilize the version logging with version control (like TFS or the Publish Log for versions 18.4 and newer).

But, that might be a good idea for UiPath to add. Like next to Annotation, you can add a Review comment, as well as an option in the menu ribbon to remove all Review comments. However, I still don’t know if doing this in the code itself is more beneficial than having this in an external file, because you wouldn’t be able to see all the changes or input by reviewers on parts of the code all in one place.

1 Like

This is what we’re doing now. We just have a log in Excel. It’s pretty clunky though. Wasn’t sure if people here had some better ideas

Unfortunately we are using SVN and there isn’t a built-in way for review comments pre or post commit. The screenshot above looks amazing, but doubt we’ll be able to switch to TFS, or even to git as our company isn’t a huge fan of changing pretty much anything