Align removed lines with code quality findings in Rapid Diffs

What does this MR do?

In Rapid Diffs, files with code quality or SAST findings show an indicator in the line gutter. In the inline diff view, that indicator pushed added and unchanged lines to the right by about 17px, but removed lines kept their original position. As a result, a removed line and the line that replaced it looked like they had different indentation even when only the content changed. This MR reserves the gutter space for every line of a file that has findings, so all of its lines line up, in both inline and side-by-side views. Files without findings keep their current layout. The indicator and the test coverage marker stay where they are, and the - sign on removed lines no longer overlaps their text. This is a CSS-only change.

#596236 (comment 3914796823)

Reproduction steps

  1. Open a merge request that has a code quality report with findings on a file that also has removed lines.
  2. Open the Changes tab with Rapid Diffs enabled, in inline view.
  3. Compare where the text of a removed line starts versus the added line next to it.

Before: removed lines start further left than added or unchanged lines. After: all lines start at the same position.

Screenshots

Taken on a merge request with code quality findings, test coverage and a diff comment on the same lines. SECURITY.md has findings; README.md has coverage only.

Case Before After
Inline, file with findings, coverage and a comment before_inline_findings after_inline_findings
Inline, file without findings (coverage only) before_inline_nofindings after_inline_nofindings
Side-by-side, file with findings, coverage and a comment before_parallel_findings after_parallel_findings
Side-by-side, file without findings (coverage only) before_parallel_nofindings after_parallel_nofindings

🤖 Generated with Claude Code

Edited by Stanislav Lashmanov

Merge request reports

Loading
Loading