feat(web): list only the spots to check, in order and capped (ADR-035)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 09:01:21 +02:00
co-authored by Claude Sonnet 5.5
parent 8cb0b0a12d
commit 24d1a99ed0
+15 -7
View File
@@ -283,9 +283,9 @@ func (a *App) uploadChatView(u domain.UploadedTranscript, model string, history
}
}
// maxSpotsShown is how many contested spots the page lists. The stored list holds up to
// 200 and the counts are exact; a page of two hundred "check this" items is not a page
// anyone reads, so the rest are counted, not listed.
// maxSpotsShown is how many spots to check the page lists. The stored list holds every
// judged spot and the counts are exact; a page of two hundred "check this" items is not a
// page anyone reads, so the rest are counted, not listed.
const maxSpotsShown = 50
// minuteMark renders where in the recording a spot is, as the nearest minute.
@@ -293,12 +293,20 @@ func minuteMark(seconds float64) string {
return fmt.Sprintf("~%d min", int(math.Round(seconds/60)))
}
// shownSpots is the part of the contested list the page renders.
// shownSpots is the part of the stored list the page renders: the spots a reader should
// check, changed or uncertain, in order, capped. A spot the model confidently kept is
// stored (ADR-035) but is not one to check, so it is not listed.
func shownSpots(r *domain.Reconciliation) []domain.ContestedSpot {
if len(r.Contested) > maxSpotsShown {
return r.Contested[:maxSpotsShown]
var out []domain.ContestedSpot
for _, c := range r.Contested {
if c.Used == "alt" || c.Unsure {
out = append(out, c)
if len(out) == maxSpotsShown {
break
}
}
}
return r.Contested
return out
}
// moreSpots is how many spots to check are not listed, from the exact counts.