Transcript Incremental Projection

Nucleic-Session: 0FFD007B-0696-4517-9429-129C7B0FD5AC
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 18:30:14 -07:00
co-authored by Nucleic
parent fd045f8ece
commit aa6a8e2670
@@ -538,8 +538,12 @@ struct TranscriptList: View {
}
prewarmProgress.count = current.count
guard !bodies.isEmpty else { return }
prewarmTask?.cancel()
prewarmTask = Task.detached(priority: .utility) {
// Chain batches instead of cancelling the in-flight one: each batch covers *new* rows
// only, so cancelling a predecessor (say, the big open batch, superseded by the first
// streamed row) would permanently drop its coverage. `onDisappear` cancels the head of
// the chain; a predecessor mid-parse just finishes its bounded batch into shared caches.
prewarmTask = Task.detached(priority: .utility) { [previous = prewarmTask] in
await previous?.value
for body in bodies {
if Task.isCancelled { return }
MarkdownText.prewarm(body)