Comments disappear when showing whitespace changes
Description
While going through the commits of a merge request I added some comments to a commit. I used the 'Show whitespace changes' button to hide whitespace changes. I added some comments and committed the comments. I started doing some other work and later returned to the commit, only to see my comments missing. But when I toggled the whitespace button, my comments re-appeared. Another toggle and they were gone again. Also the comments did not appear on in the discussion section of the merge request.
This occurs when the old_line / new_line combination doesn't exist in the hide whitespace view. Similar to #338844 (comment 1130729221)
Reproduction
- Go to MR
- Show whitespace changes / side-by-side view
- Comment on old line 52
- switch to hide whitespace view
- Comment is no longer visible
Screenshots
Edited by Jay McCure