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

  1. Open a merge request that received new commits after a comment was posted (on gitlab.com most comments on an updated merge request qualify).
  2. Switch the Changes tab to Rapid Diffs.
  3. Click the collapse arrow next to an inline comment.
  4. Before this change the thread stays expanded; after it, it collapses.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading