commit 4c4ba4837567852888d8ff19fcea77cce74a1a4a
parent fa8ce0c25bef3f33f003dccaa0bd28164969134b
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 11 Nov 2026 13:29:24 -0500
report-to-video: the posts' page embeds settleFirstFrame with postsCues
The posts' page runs postsCues in the browser (embedFn), so the first-frame
fold it now calls must travel with it: settleFirstFrame is self-contained and
embedded beside it. Without it the page threw, and posts-persist's pixel test
found no card at 17 s.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/umtool/report-to-video/chrome-posts.mjs b/umtool/report-to-video/chrome-posts.mjs
@@ -429,6 +429,7 @@ export function postsHtml(schedule, render, window, opts = {}) {
const P = JSON.parse(document.getElementById("posts-data").textContent);
const byK = {};
for (const el of document.querySelectorAll("[data-k]")) byK[el.dataset.k] = el;
+ ${embedFn("settleFirstFrame", settleFirstFrame)}
${embedFn("postsCues", postsCues)}
const params = new URLSearchParams(location.search);
diff --git a/umtool/report-to-video/cue-start.mjs b/umtool/report-to-video/cue-start.mjs
@@ -9,10 +9,9 @@
// chrome-instruments.mjs withDeck) showed for one frame over a cut that opens on
// the intro: their root is up in init and hidden by an instant cue at 0.
//
-// LEAF: no imports, so every cue compiler can call it.
-
-/** At or before this, a time is the cut's first instant. */
-const START_EPS = 1e-4;
+// LEAF: no imports, so every cue compiler can call it -- and SELF-CONTAINED
+// (no module constant): the posts' page embeds postsCues, and this with it, in
+// the browser (chrome-posts.mjs embedFn).
/**
* Fold every cue that has finished before frame 1 and starts at the cut's
@@ -32,6 +31,8 @@ const START_EPS = 1e-4;
* @returns {C[]}
*/
export function settleFirstFrame(init, cues, fps = 30) {
+ // At or before this, a time is the cut's first instant.
+ const START_EPS = 1e-4;
const frame = 1 / (Number(fps) > 0 ? Number(fps) : 30);
/** element -> where its folded cues end; absent once a cue on it stays. */
const foldEnd = new Map();