Add context commit diffs support for MR diffs streaming endpoint
Background
We decided to keep the initial implementation of streaming endpoint for MR diffs simple. As discussed in #450990 (comment 1901990588), we are splitting adding support for existing features that diffs_batch.json
supports.
This issue is for supporting showing context commit diffs. Currently, the streaming endpoint is only getting the diff of latest base diff.
Proposal
Update MergeRequests::DiffsStreamController
to support rendering context commit diffs.
This is how we currently render context commit diffs in diffs_batch.json
which we can take inspiration from: https://gitlab.com/gitlab-org/gitlab/-/blob/d2bb7c9df1c67f2834074907b5aae0022cae75d5/app/controllers/projects/merge_requests/diffs_controller.rb#L173-175