Add blame group normalization and per-chunk mapping

What does this MR do and why?

Adds two pure functions to source_viewer/utils.js that will replace the absolute-positioning math currently used for the inline blame gutter:

  • normalizeBlameGroups(blameData) — blame groups are requested per chunk and appended in fetch-completion order, so the flat list can arrive out of order, and a commit whose block straddles two requests shows up as two consecutive groups for the same SHA. This sorts and merges them into one group per contiguous run of lines. It merges on overlap rather than exact contiguity, so a duplicate delivery is absorbed instead of stacked as a second group.
  • blameGroupsForChunk(blameGroups, chunk) — maps normalized groups onto a single chunk's grid rows, clamping any group that starts before the chunk or runs past its last line, and returns 1-based rowStart / rowSpan plus a hasSeparator flag for rendering group boundaries.

Neither function has a caller yet — that wiring lands in the next MR. This is intentional: it keeps this diff reviewable purely on the function contracts and specs, with zero runtime risk since nothing in the app executes this code path yet.

Related to #589723 (closed)

This MR targets master. It's the first of three MRs split out of !248531 (closed) following review feedback asking for smaller diffs.

Implementation breakdown

Step MR Status
Blame group normalization and per-chunk mapping (utils only, no callers) (this MR) ⏳ In review
Render inline blame in a CSS subgrid instead of an overlay !251529 (merged) ⏳ In review
Cache per-chunk blame slices across renders !251530 (merged) ⏳ In review
Migrate simple_viewer.vue off blame_info.vue, remove legacy blame positioning code TBD Planned
Edited by Joseph Fletcher

Merge request reports

Loading
Loading