Draft comment is duplicated and attached to every match line
Summary
Sometimes (exact circumstances unknown), a draft comment (i.e., when writing comments in a review) will be incorrectly duplicated and attached to every match line
(the collapsed segments) of the file.
Steps to reproduce
Unknown.
Some discussion:
markrian 20 days ago
When I finally submitted that review, the weird duplicated comment was completely dropped - it no longer exists even in singular form :disappointed:
----
andr3 20 days ago
Yeah somehow the batch comment (draft) thinks it should be displayed on the match line (Show unchanged lines). That’s why it’s repeating. If this happens again, it would be interesting to inspect the vuex store for Diffs app/component props and see what that DraftNote has for the lines. seeing we’re in prod, it be harder to get to it
----
andr3 20 days ago
My hunch is that the DraftNote has an invalid/empty line code and it matches the match lines.
Example Project
What is the current bug behavior?
A single draft comment is duplicated to all match lines, and then dropped entirely when the review is submitted.
What is the expected correct behavior?
Draft comments should appear attached to the correct line, and they should be submitted successfully.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
Unknown.
Edited by Thomas Randolph