On Thu, Jan 27, 2022 at 09:42:35AM +0100, 'Dhruv Srivastava' via Repo and Gerrit Discussion wrote:
>There are some clicks that we can avoid such as what Ben mentioned
>above,
>automatically marking owner replies to comments as resolved. This is
>something I plan to work on and should be there in the next release.
>
i'm not convinced that this is a good idea. the "closing" comments that
are available through buttons already default to resolved, which covers
95% of the cases. manually entered comments are typically discussion and
shouldn't resolve unless explicitly selected.
the question would be what to do about the legacy comments. one could do
a schema migration kinda thing, where final comments that match certain
patterns resolve the threads. however, that doesn't really fix the
issue, because thread resolving was introduced quite a while before
comment porting. some people just didn't care, because it didn't bother
*them* - regardless of the fact that it disrupts their reviewers'
workflow. so they kinda had it coming.
nonetheless, one could apply a heuristic: if the code a comment applied
to changed (possibly only if it cannot be ported at all any more), it is
automatically resolved based on the fact that it is apparently not
applicable any more. the cut-off point would have to be the migration to
the gerrit version that introduced comment porting - i suppose it would
be possible to deduce that from notedb. the question would be whether
this effort is really worth it, given that large changes with a history
that is so long that this would matter are quite rare.
the quick and dirty solution would be introducing a checkbox to the
"reply" dialog, "resolve all threads", somewhere below the "publish
drafts" checkbox. of course, this kinda invites over-use (counter it by
introducing a nasty confimation dialog that explains possible unintended
consequences for the workflow?).
somewhat on a tangent, but it would help countering the fallout of
resolving more aggressively: instead of a simple "resolved" bit, threads
could have a proper status field. this would allow comment authors to
confirm that issues are *actually* resolved before they go out of view.
a "confirm thread resolutions" checkbox in the reply dialog could
reasonably provide a shortcut for this.
https://bugs.chromium.org/p/gerrit/issues/detail?id=4080 is about this,
though imo it goes somewhat overboard by suggesting issue types and
severities as well.