Fix missing source code in inline blame for legacy file types
What does this MR do and why?
go.mod and other LEGACY_FILE_TYPES (Gemfile, podspec, cartfile, requirements.txt, Cargo.toml) always render through the legacy viewer path. When blame is expanded on load, activeViewerType is blame, but loadLegacyViewer only routed the fetched HTML into legacySimpleViewer when type === SIMPLE_BLOB_VIEWER. For blame it fell through to legacyRichViewer, leaving the code pane empty, so the source disappeared and the blame layout collapsed.
This fix also routes BLAME_VIEWER through legacySimpleViewer so the fetched HTML renders correctly.
Fixes #605627 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Open a legacy-type file such as
go.modin a repository, e.g./-/blob/master/go.mod. - Append
?blame=1to the URL so blame is expanded on load. - Confirm the source code appears in the code pane alongside the blame info (previously the pane was empty and the layout collapsed).
- Repeat for other legacy types:
Gemfile,*.podspec,Cartfile,requirements.txt,Cargo.toml.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jacques Erasmus

