Fix reader read-aloud races and add rows.Err checks

- reader.js: guard read-aloud against the loading placeholder (bodyReady)
  and invalidate stale speechSynthesis callbacks with a generation token
- storage: check rows.Err() after iterating story-view/content-length reads
- metrics: reuse placeholders() instead of duplicating the IN-clause builder
This commit is contained in:
prosolis
2026-07-07 22:35:09 -07:00
parent 616055a704
commit 8f9fcc45f3
3 changed files with 18 additions and 8 deletions

View File

@@ -438,6 +438,9 @@ func StoryContentLengths(ids []int64) map[int64]int {
}
out[id] = int(n)
}
if err := rows.Err(); err != nil {
slog.Error("story content lengths iteration failed", "err", err)
}
return out
}