Can't leave a comment or a draft comment on an expanded unchanged line in a large file
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary If you try to add a comment on a line that was made visible by pressing "Show unchanged lines" or "show full file", it will fail. This affects: * normal comments * draft comments (batch comments/MR Reviews) ~~This could be related to the recently rolled out Batch Diff Loading.~~ Actually it doesn't seem to be. ![Kapture_2020-02-17_at_22.01.22](/uploads/5e0562637cc771756867e91ac995ccf0/Kapture_2020-02-17_at_22.01.22.mp4) ### Steps to reproduce 1. Go to an MR with changes on a large file (team.yml for example) 1. Expand the unchanged lines. 1. Try to leave a comment/batch comment. ### Example Project Example where this was first identified: https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/41348/diffs ### What is the current *bug* behavior? Draft comments don't show up at all on the lines but are added to a review (or a review is started). Upon submission, it fails. Comments simply fail. Failures occur with: ``` POST https://gitlab.com/gitlab-com/www-gitlab-com/notes?target_id=50161032&target_type=merge_request 422 (Unprocessable Entity) ``` ### What is the expected *correct* behavior? Comments and draft comments are persisted normally.
issue