Handle diffs unfolding for batch load endpoint
What does this MR do?
The diffs batch endpoint wasn't handling the diff unfolding when leaving comments in hidden parts of the diff.
This MR fixes that for both diff notes and draft notes, unfolding diffs just for the files loaded in the batch.
Ideally we should be doing all the work with DB queries, but currently it's not possible, so I raised #33271 (will push this forward for scheduling).
Main query plan: https://gitlab.com/snippets/1901914
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
Edited by 🤖 GitLab Bot 🤖