Diff note can possibly not show after a file has been changed
Summary
When an existing diff note gets added on a line on a file and the file changes after and the changes didn't touch the same line, the diff note won't get displayed anymore.
Steps to reproduce
- Add a comment on a line.
- Update a line on the file that is not the commented line.
- Push the changes.
- The comment added on step 1 won't be displayed on refresh.
This can also be replicated by just applying a suggestion made on a different line.
Example Project
What is the current bug behavior?
The diff note that should still be displayed is no longer displayed on "Changes" tab.
What is the expected correct behavior?
The diff note that should still be displayed should still be shown on "Changes" tab.
Possible fixes
Include the position of the diff note in the cache key of discussion. If that does not work, look into bumping the diff note when position changes.
Edited by Patrick Bajao