Merge requests discussion page fetch blobs for resolved discussions even though we load discussions diffs async

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

I've created oswaldo/test-public-prj!1 (closed) to exemplify (it has a resolved discussion).

  1. It calls list_blobs_by_sha_path upon load when calling Blob#stored_externally? / Blob#binary?
  2. If we click into "Toggle discussion", it makes the exact same call again
{:repository=> {:storage_name=>"nfs-file19", :relative_path=>"oswaldo/test-public-prj.git", :git_object_directory=>"", :git_alternate_object_directories=>[], :gl_repository=>"project-6663773"}, :revision_paths=> [{:revision=>"602535fdf53c691103c3de8aa83a1bb7b80ee1c0", :path=>"asdf"}], :limit=>10485760}

We should be able to use the cached data from https://gitlab.com/gitlab-org/gitlab-ce/issues/45693 when viewing the Discussion tab. That would stop the unnecessary extra Gitaly call when loading resolved discussions.

cc @smcgivern

Edited Sep 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading