Resume cached timelines without replaying their tail (#3329)

* perf(timeline): resume cached history from its exact range

Warm launches were repainting cached history and then downloading the same bounded tail to rediscover that nothing changed. Persist synchronization authority only when the complete current canonical window can be encoded losslessly; otherwise retain the existing display-only fallback.

* test(timeline): hide replica setup behind E2E helper

* fix(timeline): bound persisted resume overflow

* test(timeline): cover workspace eviction catch-up order

* test(timeline): read persisted range from IndexedDB
This commit is contained in:
Mohamed Boudra
2026-08-14 12:57:44 +02:00
committed by GitHub
parent 30195d3bd1
commit f0bd2c8483
18 changed files with 707 additions and 75 deletions
@@ -51,6 +51,14 @@ export function planTimelineTailFetch() {
} as const;
}
export function planTimelineResumeFetch(
range: { epoch: string; endSeq: number } | null | undefined,
): ProjectedTimelineForwardFetchPlan {
return range
? planTimelineCatchUpAfter({ epoch: range.epoch, seq: range.endSeq })
: planTimelineTailFetch();
}
export function planTimelineOlderFetch(cursor: TimelineSyncCursor) {
return {
direction: "before",