Skip to content

Add a notion of pending / draft state to code review comments #171166

@hermannloose

Description

@hermannloose

#127473 introduced CommentThreadState with Unresolved and Resolved values to indicate the actionable vs non-actionable state of a particular conversation in code review.

In addition to that, GitHub pull requests and other code review systems frequently treat new comment threads or specific replies added by a user as pending / draft, being visible only to the user until they publish all pending comments at the same time.

We propose adding a new field to Comment objects to model this state.

For type, we think a boolean might be enough, but similar to #127473 we might want to use an enum instead for flexibility.

We don't have a preference for a particular name, draft, pending, or published (with inverse semantics) would all work well.

Areas in VS Code that would benefit from having a draft state:

  • the line gutter and the comments panel could render different icons for threads with drafts, to better indicate to users which conversations they have already replied to, for overview
  • there could be built-in commands to expand or collapse threads with drafts in the editor, so that users can hide threads that they have already replied to
  • the filtering functionality in the comments panel could have an option to "Show Drafts" so that users can hide threads they have already replied to

cc @laurentlb @JonasMa

Metadata

Metadata

Assignees

Labels

apiapi-proposalcommentsComments Provider/Widget/Panel issuesfeature-requestRequest for new features or functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions