diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 12:24:43 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 12:24:43 +0900 |
| commit | 5066aad92282068dfd3ce5e1bf87164264618cfe (patch) | |
| tree | bfdf4fd31dbb92ccaf0eceb6cd49d254d252694a /src/features/smart-scroll | |
| parent | d7d3ac7a20815b1890ee7142dcc51e5e6d2dda03 (diff) | |
| download | dispatch-web-5066aad92282068dfd3ce5e1bf87164264618cfe.tar.gz dispatch-web-5066aad92282068dfd3ce5e1bf87164264618cfe.zip | |
fix(metrics): tail-align when stepId matching fails — prevent misaligned turns
When stepIds are absent on persisted chunks (or don't match), the
sequential fallback was HEAD-aligning — matching the OLDEST entries
(trimmed turns) to the NEWEST segments. This showed 'turn 1' on turn 20's
content and placed the wrong metrics on the wrong segments.
Fix: when stepId matching produces ZERO matches, use TAIL-ALIGNMENT
instead — match the LAST T entries to the T segments (the loaded chunks
are always the newest). The oldest entries (trimmed turns) are unmatched
and emit standalone turn-metrics rows at the top.
686 tests green.
Diffstat (limited to 'src/features/smart-scroll')
0 files changed, 0 insertions, 0 deletions
