Loading
Fix hide comments not collapsing repositioned diff threads
Summary
The "Hide comments" control in Rapid Diffs did nothing when a comment had been repositioned by newer commits on the merge request: the thread stayed expanded. Collapsing now matches comments the same way the diff renders them. Threads that failed to auto-collapse once their last unresolved note was resolved are fixed by the same change.
Reproduction steps
- Open a merge request that received new commits after a comment was posted (on gitlab.com most comments on an updated merge request qualify).
- Switch the Changes tab to Rapid Diffs.
- Click the collapse arrow next to an inline comment.
- Before this change the thread stays expanded; after it, it collapses.