commit c06a08f4db6d938594f92ab9bccbf2cebd665c7c
parent d211915b3cd7758fa6f4764747fcaee827a6757c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 02:09:59 -0500
report-to-video: the trail skips an event with no number -- a null or empty value was read as 0 and drawn as a 0 lb point
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## [Unreleased]
+- **umtool: the trail no longer draws a 0 lb point for a row with no number.** A measure event whose value was empty was read as 0 and plotted at the foot of the trail. Such a row is now left off; a real 0 is still drawn.
- **umtool: `posts attach` finds captures in the archive too.** On a project with its own channels tree (a `.shadow-channels`), `umtool posts attach` and `posts repeats` looked for a post's capture only there, so media captured into the real archive's `channels/<slug>/posts-media/<id>/` was not seen. They now look in the project's tree first and then the archive's, as the other readers do. The archive is only read: the files are copied into the project as before. `--dry-run` prints which tree each file would come from.
- **umtool: an entry's chapter name is set from a terminal.** An entry's `chapter` names it in the chapter list (the YouTube text, `umtool export --format chapters`) in place of its on-screen title, and it could only be written by editing the manifest by hand. `umtool set <p> <entry> chapter='The weigh-in'` writes it for any entry (a clip, a post item, a still), `chapter=` clears it, and `--take <t>` writes it on that take alone. One line, at most 100 characters.
- **umtool: a windowed take preview no longer fails on an effect that names a clip outside the window.** `umtool take <p> --id <t> --preview --at S --dur S` on a cut with `render.chrome.fx.glitch.clips` or `fx.thenNow.pairs` was refused with "names k06, which is not a clip of the cut". The window's manifest now keeps only the named clips inside it (a glitch's only when a clip stands right before it in the window, a then/now pair only with both ends), as it already did for markers and claim checks; an effect left naming no clip is off in that window. The same for `fx.kineticQuote.clips` and `fx.redact.clips`.
diff --git a/umtool/report-to-video/trail-plan.mjs b/umtool/report-to-video/trail-plan.mjs
@@ -37,7 +37,8 @@ const r2 = (v) => Math.round(v * 100) / 100;
export function trailPoints(measure, { remembered = true } = {}) {
const out = [];
for (const e of measure?.events ?? []) {
- if (!Number.isFinite(e.t) || !Number.isFinite(Number(e.value))) continue;
+ // A row with no number is no point: `Number(null)` and `Number("")` are 0, which drew a 0 lb point (12 Nov).
+ if (!Number.isFinite(e.t) || e.value === null || e.value === undefined || e.value === "" || typeof e.value === "boolean" || !Number.isFinite(Number(e.value))) continue;
if (e.kind !== "stated" && !(remembered && e.kind === "remembered")) continue;
const day = dayNumber(e.asOf ?? e.date);
if (!Number.isFinite(day)) continue;
diff --git a/umtool/report-to-video/trail-plan.test.mjs b/umtool/report-to-video/trail-plan.test.mjs
@@ -116,3 +116,21 @@ test("the page: points pop in where their moment puts them and move with every r
assert.match(validateTrail({ gap: 10 }).join(), /gap must be "auto", 0 \(no breaks\) or 30 to 3650 days/);
assert.match(validateTrail({ bounds: "loose" }).join(), /bounds must be "fit" or "fixed"/);
});
+
+test("a row with no number is no point: a null, missing, empty or non-numeric value never becomes a 0 lb point", () => {
+ const ev = (o) => ({ t: 10, kind: "stated", date: "2026-01-01", row: "w", ...o });
+ const pts = trailPoints({ events: [
+ ev({ t: 1, row: "a", value: 300 }),
+ ev({ t: 2, row: "null", value: null }),
+ ev({ t: 3, row: "missing" }),
+ ev({ t: 4, row: "empty", value: "" }),
+ ev({ t: 5, row: "words", value: "about three hundred" }),
+ ev({ t: 6, row: "bool", value: false }),
+ ev({ t: 7, row: "zero", value: 0 }),
+ ev({ t: 8, row: "text", value: "291.5" }),
+ ev({ t: 9, row: "nan", value: NaN }),
+ ] });
+ // A real 0 and a number written as text are still points.
+ assert.deepEqual(pts.map((p) => [p.row, p.value]), [["a", 300], ["zero", 0], ["text", 291.5]]);
+ assert.deepEqual(pts.map((p) => p.n), [0, 1, 2]);
+});