Serve replay playback from a cached analysis result

Replay re-ran the SDK chain on every seek; Part A's pass stores the flow
samples once. Opening a recording now reuses a compatible result or runs the
pass behind a progress/cancel surface, and one cursor with two modes
(recorded CSV, analysed) feeds the charts, the 2D canvas and the 3D pane by
frame id. A threshold, colour or idle-dot change redraws from the stored
frames and writes nothing; a cancelled pass is reported and never played.

Verified: apps/studio/tests 440 items / 0 failed / 18 skipped (15 new, no
existing assertion changed); shared 417 / 0 / 1; autocal 358.
This commit is contained in:
ykcheungab
2026-10-04 13:38:03 +08:00
parent b6f6a06851
commit cf49b0836e
11 changed files with 2731 additions and 29 deletions
@@ -55,6 +55,11 @@ SOURCE_LIVE = "live"
SOURCE_RECOMPUTE = "recompute"
SOURCE_REPLAY = "replay"
SOURCE_PREVIEW = "preview"
#: A frame read from a stored analysis result: the vision chain is *not* running, and
#: the fields are the ones a finished pass recorded. Derived like ``live``, because a
#: stored frame does carry flow — but never conflated with it, because "the pipeline is
#: computing this now" and "this was computed once and read back" are different claims.
SOURCE_ANALYSIS = "analysis"
#: Shown when the only thing a frame can be is a raw picture.
RAW_NOTE_KEY = "panels.replay_raw_note"
@@ -64,7 +69,7 @@ RAW_NOTE_KEY = "panels.replay_raw_note"
MISSING_NOTE_KEY = "panels.frame_missing_note"
#: Sources whose frames carry derived fields.
DERIVED_SOURCES = (SOURCE_LIVE, SOURCE_RECOMPUTE)
DERIVED_SOURCES = (SOURCE_LIVE, SOURCE_RECOMPUTE, SOURCE_ANALYSIS)
#: How much a frame's domain mask must overlap the latched one before the latched one
#: is kept. Measured on the shipped finger island (32937 px, 39.2% of the 300x280