Files
SivanCola 572ba05442 fix(history): discover legacy sessions progressively and yield background reads
Problem: Sidebar discovery waited for full foreign transcript replay while
history indexing competed with interactive session restoration.

Root cause: Complete-list reads owned metadata replay, identity replacement
scanned growing message slices, and derived-data producers lacked shared admission.

Fix: Return explicit progressive coverage, share single-flight summaries and
validated caches, fold replay identities linearly, and retain cancellable scan
generations. Admit background work through one foreground-aware scheduler.
Apply foreground admission at the history route group so independent readers
inherit it without coupling their implementation to background work.

Verification: Storage/scheduler/catalog suites, real Boot/resume and tree/HTTP
effects, sidebar interactions, production frontend build, race checks and lint.
Keep benchmark cleanup registered even when its bounded deadline fails.

Split from PR #14077; no startup fixes or transcript pagination are included.
2026-10-21 15:31:17 +08:00
..