Transcript review UI: keep one persistent <video> outside re-rendered panels, sync word highlights via requestAnimationFrame
Symptom: in a tabbed/polling dashboard, a video placed inside a stage panel stops playing when the user switches to the transcript tab, because the panel's innerHTML is replaced (the <video> element is destroyed). Fix: render the player once per selected item in a sticky side column that tab switches never touch, and only re-render the stage body when its data signature (status + output mtime) changes, not on every poll. For verification: emit each transcript word as <span data-seek=start data-s=start data-e=end>, cache [el,s,e] tuples after each body render, and run a requestAnimationFrame loop that, only when video.currentTime changed, toggles a .now class where s <= t < e (works generically for words, frames and shot rows). One delegated click handler seeks to data-seek and calls play().catch(()=>{}). Auto-scroll the transcript box only while playing, and only when the active word leaves the visible area. Gotcha: a CSS rule like .lines span:nth-child(odd) meant for a 2-column timestamp grid also matches the nested word spans; use the child combinator .lines > span:nth-child(odd).