Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e752dc31a199dd37d5ec48c608dd6df02d326acd
parent eccdf82b4ae728bf70aa0cf8287b3763a7813ff5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu,  5 Nov 2026 23:44:29 -0500

umtool: a measure extra's hold 0 is "stays up"

`umtool look <p> deck.peak.hold=null` removes the key -- the default again (12
s after each telling) -- so "up from its first event on" could not be set
from a terminal. 0 is that now (null in a file still reads the same).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/docs/knobs.md | 10+++++-----
Mumtool/report-to-video/measure-extras.mjs | 4++--
Mumtool/report-to-video/measure-extras.test.mjs | 3++-
Mumtool/report-to-video/modules/diet.mjs | 2+-
Mumtool/report-to-video/modules/goals.mjs | 2+-
Mumtool/report-to-video/modules/measure-extras-module.mjs | 2+-
Mumtool/report-to-video/modules/measure-extras-settings.mjs | 6++++--
Mumtool/report-to-video/modules/peak.mjs | 2+-
Mumtool/report-to-video/modules/promise.mjs | 2+-
Mumtool/report-to-video/modules/streak.mjs | 2+-
10 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -1700,7 +1700,7 @@ A chain per run along a time axis by in-record date (`render.chrome.deck.streak` | `deck.streak` | `true` · `false` · `{show, position, x, y, scale, hold, finale, source, axis, title, color, colors, labels}` · default on with a measure slice | `umtool look <p> deck.streak=false` | | `deck.streak.source`, `.axis` | `diet` `lostRuns` `pledges` · `date` `runs` · default `diet`, `date` | `umtool look <p> deck.streak.source=lostRuns` | | `deck.streak.position`, `.x`/`.y`, `.scale` | an anchor in the footage box · design px · 0.5–2 · default `bottom-center`, unset, 1 | `umtool look <p> deck.streak.position=bottom-left` | -| `deck.streak.hold`, `.finale` | null (up from the first run on) or 2–600 s · `hide` `show` · default null, `hide` | `umtool look <p> deck.streak.hold=15` | +| `deck.streak.hold`, `.finale` | 0 (up from the first run on) or 2–600 s · `hide` `show` · default 0, `hide` | `umtool look <p> deck.streak.hold=15` | | `deck.streak.title`, `.color`, `.colors`, `.labels` | ≤40 · #hex · `{<regime>: #hex}` · `{<regime>: words}` · default the source's word, the accent, the regimes' inks and names | `umtool look <p> deck.streak.title='Every diet'` | ### Diet badge @@ -1711,7 +1711,7 @@ The diet he names as a rubber stamp in a corner of the footage box (`render.chro |---|---|---| | `deck.diet` | `true` · `false` · `{show, position, x, y, scale, hold, finale, colors, labels}` · default on with a measure slice | `umtool look <p> deck.diet=false` | | `deck.diet.position`, `.x`/`.y`, `.scale` | an anchor in the footage box · design px · 0.5–2 · default `bottom-left`, unset, 1 | `umtool look <p> deck.diet.position=top-right` | -| `deck.diet.hold`, `.finale` | null (up from the first diet on) or 2–600 s · `hide` `show` · default null, `hide` | `umtool look <p> deck.diet.hold=15` | +| `deck.diet.hold`, `.finale` | 0 (up from the first diet on) or 2–600 s · `hide` `show` · default 0, `hide` | `umtool look <p> deck.diet.hold=15` | | `deck.diet.colors`, `.labels` | `{<regime>: #hex}` · `{<regime>: words ≤40}` · default the regimes' inks and names | `umtool look <p> deck.diet.labels='{"glp1":"Ozempic"}'` | ### Moving start @@ -1722,7 +1722,7 @@ The weight he says he started at, as he retells it (`render.chrome.deck.peak`, m |---|---|---| | `deck.peak` | `true` · `false` · `{show, position, x, y, scale, hold, finale, title, values, color}` · default on with a measure slice | `umtool look <p> deck.peak=false` | | `deck.peak.position`, `.x`/`.y`, `.scale` | an anchor in the footage box · design px · 0.5–2 · default `top-right`, unset, 1 | `umtool look <p> deck.peak.scale=0.9` | -| `deck.peak.hold`, `.finale` | null (stays up) or 2–600 s · `hide` `show` · default 12, `hide` | `umtool look <p> deck.peak.hold=null` | +| `deck.peak.hold`, `.finale` | 0 (stays up) or 2–600 s · `hide` `show` · default 12, `hide` | `umtool look <p> deck.peak.hold=0` | | `deck.peak.title`, `.values`, `.color` | ≤40 · `drift` `all` · #hex · default "The start keeps moving", `drift`, #FF5A4E | `umtool look <p> deck.peak.values=all` | ### Goal stack @@ -1734,7 +1734,7 @@ A sticky note per goal on a pile in a corner of the footage box, read off the sc | `deck.goals` | `true` · `false` · `{show, position, x, y, scale, hold, finale, max, color, countdown}` · default on with a measure slice | `umtool look <p> deck.goals=false` | | `deck.goals.position`, `.x`/`.y`, `.scale` | `top-left` `top-right` `bottom-left` `bottom-right` `top-center` `bottom-center` · design px · 0.5–2 · default `bottom-right`, unset, 1 | `umtool look <p> deck.goals.position=bottom-left` | | `deck.goals.max`, `.color`, `.countdown` | 1–8 notes · #hex paper · bool · default 4, the palette's amber, `true` | `umtool look <p> deck.goals.max=6` | -| `deck.goals.hold`, `.finale` | null (up from the first goal on) or 2–600 s after each · `hide` `show` · default 20, `hide` | `umtool look <p> deck.goals.hold=null` | +| `deck.goals.hold`, `.finale` | 0 (up from the first goal on) or 2–600 s after each · `hide` `show` · default 20, `hide` | `umtool look <p> deck.goals.hold=0` | ### Thread rail @@ -1779,7 +1779,7 @@ A days-since counter for a promise (`render.chrome.deck.promise`, measure-extras |---|---|---| | `deck.promise` | `true` · `false` · `{show, position, x, y, scale, hold, finale, label, verb, kept, broken, checks}` · default on with a measure slice | `umtool look <p> deck.promise=false` | | `deck.promise.position`, `.x`/`.y`, `.scale` | an anchor in the footage box · design px · 0.5–2 · default `top-center`, unset, 1 | `umtool look <p> deck.promise.position=bottom-center` | -| `deck.promise.hold`, `.finale` | null (stays up) or 2–600 s · `hide` `show` · default null, `show` | `umtool look <p> deck.promise.finale=hide` | +| `deck.promise.hold`, `.finale` | 0 (stays up) or 2–600 s · `hide` `show` · default 0, `show` | `umtool look <p> deck.promise.finale=hide` | | `deck.promise.label`, `.verb`, `.kept`, `.broken`, `.checks` | ≤40 each · `label` `quote` · default the row's display, "offered", "Posted", "None posted", `label` | `umtool look <p> deck.promise.label='scale video'` | | `deck.promise.speakers`, `.claimVerb`, `.claimColor` | `{<speaker>: {handle, color}}` · ≤40 · #hex · default `{}` (the postAvatars handle), "paid", #E37AB8 | `umtool look <p> deck.promise.speakers='{"madamsavvy":{"handle":"MadamSavvy"}}'` | diff --git a/umtool/report-to-video/measure-extras.mjs b/umtool/report-to-video/measure-extras.mjs @@ -159,7 +159,7 @@ const finaleOf = (schedule) => (isObj(schedule?.finale) && Number.isFinite(sched /** * When a module is up: from each event to `hold` seconds after it (spans - * that touch joined), or -- `hold` null -- from its first event to the end; + * that touch joined), or -- `hold` 0 or null -- from its first event to the end; * never inside the finale's window unless `finale: "show"`. * * @returns {Array<{ in: number, out: number }>} @@ -170,7 +170,7 @@ export function upSpans(times, cfg, schedule) { const end = fin && cfg.finale !== "show" ? Math.min(total, fin.from) : total; const ts = times.filter((t) => Number.isFinite(t) && t < end).sort((a, b) => a - b); if (!ts.length) return []; - if (cfg.hold === null || cfg.hold === undefined) return [{ in: r4(ts[0]), out: r4(end) }]; + if (!cfg.hold) return [{ in: r4(ts[0]), out: r4(end) }]; const out = []; for (const t of ts) { const span = { in: t, out: Math.min(end, t + cfg.hold) }; diff --git a/umtool/report-to-video/measure-extras.test.mjs b/umtool/report-to-video/measure-extras.test.mjs @@ -192,6 +192,7 @@ test("streak: runs through a per-source adapter -- diet runs, lost runs, pledges test("up: from the first event to the end (or the finale), or `hold` seconds after each", () => { assert.deepEqual(upSpans([10, 20], { hold: null, finale: "hide" }, { total: 100 }), [{ in: 10, out: 100 }]); + assert.deepEqual(upSpans([10, 20], { hold: 0, finale: "hide" }, { total: 100 }), [{ in: 10, out: 100 }], "0 is stays up (look's null removes the key)"); assert.deepEqual(upSpans([10, 20], { hold: null, finale: "hide" }, { total: 100, finale: { from: 90, to: 100 } }), [{ in: 10, out: 90 }]); assert.deepEqual(upSpans([10, 20], { hold: null, finale: "show" }, { total: 100, finale: { from: 90, to: 100 } }), [{ in: 10, out: 100 }]); assert.deepEqual(upSpans([10, 15, 40], { hold: 8, finale: "hide" }, { total: 100 }), [{ in: 10, out: 23 }, { in: 40, out: 48 }]); @@ -252,7 +253,7 @@ test("settings: true/false or an object of the module's own keys, refused by nam assert.deepEqual(validateChrome(withDeck({ goals: { max: 3 }, peak: true, promise: { finale: "hide" }, diet: false }).chrome, RENDER), []); assert.match(validateChrome(withDeck({ goals: { max: 30 } }).chrome, RENDER).join(), /goals\.max must be a whole number from 1 to 8/); assert.match(validateChrome(withDeck({ gaols: {} }).chrome, RENDER).join(), /gaols is not a deck setting/); - assert.match(moduleProblems({ render: withDeck({ diet: { hold: 1 } }), timeline: [] }).diet[0], /diet\.hold must be null/); + assert.match(moduleProblems({ render: withDeck({ diet: { hold: 1 } }), timeline: [] }).diet[0], /diet\.hold must be 0/); }); test("the modules: drawn only with a measure slice and something of their own to draw, live in Play, by z", () => { diff --git a/umtool/report-to-video/modules/diet.mjs b/umtool/report-to-video/modules/diet.mjs @@ -26,7 +26,7 @@ export default measureExtraModule({ rows: [ ["`deck.diet`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, colors, labels}` · default on with a measure slice", "`umtool look <p> deck.diet=false`"], ["`deck.diet.position`, `.x`/`.y`, `.scale`", "an anchor in the footage box · design px · 0.5–2 · default `bottom-left`, unset, 1", "`umtool look <p> deck.diet.position=top-right`"], - ["`deck.diet.hold`, `.finale`", "null (up from the first diet on) or 2–600 s · `hide` `show` · default null, `hide`", "`umtool look <p> deck.diet.hold=15`"], + ["`deck.diet.hold`, `.finale`", "0 (up from the first diet on) or 2–600 s · `hide` `show` · default 0, `hide`", "`umtool look <p> deck.diet.hold=15`"], ["`deck.diet.colors`, `.labels`", "`{<regime>: #hex}` · `{<regime>: words ≤40}` · default the regimes' inks and names", "`umtool look <p> deck.diet.labels='{\"glp1\":\"Ozempic\"}'`"], ], }, diff --git a/umtool/report-to-video/modules/goals.mjs b/umtool/report-to-video/modules/goals.mjs @@ -29,7 +29,7 @@ export default measureExtraModule({ ["`deck.goals`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, max, color, countdown}` · default on with a measure slice", "`umtool look <p> deck.goals=false`"], ["`deck.goals.position`, `.x`/`.y`, `.scale`", "`top-left` `top-right` `bottom-left` `bottom-right` `top-center` `bottom-center` · design px · 0.5–2 · default `bottom-right`, unset, 1", "`umtool look <p> deck.goals.position=bottom-left`"], ["`deck.goals.max`, `.color`, `.countdown`", "1–8 notes · #hex paper · bool · default 4, the palette's amber, `true`", "`umtool look <p> deck.goals.max=6`"], - ["`deck.goals.hold`, `.finale`", "null (up from the first goal on) or 2–600 s after each · `hide` `show` · default 20, `hide`", "`umtool look <p> deck.goals.hold=null`"], + ["`deck.goals.hold`, `.finale`", "0 (up from the first goal on) or 2–600 s after each · `hide` `show` · default 20, `hide`", "`umtool look <p> deck.goals.hold=0`"], ], }, }); diff --git a/umtool/report-to-video/modules/measure-extras-module.mjs b/umtool/report-to-video/modules/measure-extras-module.mjs @@ -21,7 +21,7 @@ const commonUi = (id) => [ { key: "x", type: "number", min: MEASURE_LIMITS.x[0], max: MEASURE_LIMITS.x[1], label: "x (design px, with y: overrides the anchor)" }, { key: "y", type: "number", min: MEASURE_LIMITS.y[0], max: MEASURE_LIMITS.y[1], label: "y (design px)" }, { key: "scale", type: "number", min: MEASURE_LIMITS.scale[0], max: MEASURE_LIMITS.scale[1], step: 0.05, label: "Scale", default: 1 }, - { key: "hold", type: "number", min: MEASURE_LIMITS.hold[0], max: MEASURE_LIMITS.hold[1], label: "Seconds up after each event (empty: stays up)", ...(MEASURE_DEFAULTS[id].hold !== null ? { default: MEASURE_DEFAULTS[id].hold } : {}) }, + { key: "hold", type: "number", min: MEASURE_LIMITS.hold[0], max: MEASURE_LIMITS.hold[1], label: "Seconds up after each event (0: stays up)", ...(MEASURE_DEFAULTS[id].hold !== null ? { default: MEASURE_DEFAULTS[id].hold } : {}) }, { key: "finale", type: "enum", options: MEASURE_FINALE, label: "Over the finale", default: MEASURE_DEFAULTS[id].finale }, ]; diff --git a/umtool/report-to-video/modules/measure-extras-settings.mjs b/umtool/report-to-video/modules/measure-extras-settings.mjs @@ -160,8 +160,10 @@ export function validateMeasureExtra(id, v, where = `render.chrome.deck.${id}`) } if ((v.x === undefined || v.x === null) !== (v.y === undefined || v.y === null)) errors.push(`${where}.x and .y are set together (or neither)`); if (v.scale !== undefined && !numIn(v.scale, L.scale[0], L.scale[1])) errors.push(`${where}.scale must be from ${L.scale[0]} to ${L.scale[1]}`); - if (v.hold !== undefined && v.hold !== null && !numIn(v.hold, L.hold[0], L.hold[1])) { - errors.push(`${where}.hold must be null (up from its first event on) or from ${L.hold[0]} to ${L.hold[1]} seconds`); + // 0 (or null in the file) is "stays up from its first event on": 0 because + // `umtool look … hold=null` removes the key, which is the default again. + if (v.hold !== undefined && v.hold !== null && v.hold !== 0 && !numIn(v.hold, L.hold[0], L.hold[1])) { + errors.push(`${where}.hold must be 0 (up from its first event on) or from ${L.hold[0]} to ${L.hold[1]} seconds`); } if (v.finale !== undefined && !MEASURE_FINALE.includes(v.finale)) errors.push(`${where}.finale must be "hide" or "show"`); if (id === "goals") { diff --git a/umtool/report-to-video/modules/peak.mjs b/umtool/report-to-video/modules/peak.mjs @@ -27,7 +27,7 @@ export default measureExtraModule({ rows: [ ["`deck.peak`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, title, values, color}` · default on with a measure slice", "`umtool look <p> deck.peak=false`"], ["`deck.peak.position`, `.x`/`.y`, `.scale`", "an anchor in the footage box · design px · 0.5–2 · default `top-right`, unset, 1", "`umtool look <p> deck.peak.scale=0.9`"], - ["`deck.peak.hold`, `.finale`", "null (stays up) or 2–600 s · `hide` `show` · default 12, `hide`", "`umtool look <p> deck.peak.hold=null`"], + ["`deck.peak.hold`, `.finale`", "0 (stays up) or 2–600 s · `hide` `show` · default 12, `hide`", "`umtool look <p> deck.peak.hold=0`"], ["`deck.peak.title`, `.values`, `.color`", "≤40 · `drift` `all` · #hex · default \"The start keeps moving\", `drift`, #FF5A4E", "`umtool look <p> deck.peak.values=all`"], ], }, diff --git a/umtool/report-to-video/modules/promise.mjs b/umtool/report-to-video/modules/promise.mjs @@ -64,7 +64,7 @@ export default measureExtraModule({ rows: [ ["`deck.promise`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, label, verb, kept, broken, checks}` · default on with a measure slice", "`umtool look <p> deck.promise=false`"], ["`deck.promise.position`, `.x`/`.y`, `.scale`", "an anchor in the footage box · design px · 0.5–2 · default `top-center`, unset, 1", "`umtool look <p> deck.promise.position=bottom-center`"], - ["`deck.promise.hold`, `.finale`", "null (stays up) or 2–600 s · `hide` `show` · default null, `show`", "`umtool look <p> deck.promise.finale=hide`"], + ["`deck.promise.hold`, `.finale`", "0 (stays up) or 2–600 s · `hide` `show` · default 0, `show`", "`umtool look <p> deck.promise.finale=hide`"], ["`deck.promise.label`, `.verb`, `.kept`, `.broken`, `.checks`", "≤40 each · `label` `quote` · default the row's display, \"offered\", \"Posted\", \"None posted\", `label`", "`umtool look <p> deck.promise.label='scale video'`"], ["`deck.promise.speakers`, `.claimVerb`, `.claimColor`", "`{<speaker>: {handle, color}}` · ≤40 · #hex · default `{}` (the postAvatars handle), \"paid\", #E37AB8", "`umtool look <p> deck.promise.speakers='{\"madamsavvy\":{\"handle\":\"MadamSavvy\"}}'`"], ], diff --git a/umtool/report-to-video/modules/streak.mjs b/umtool/report-to-video/modules/streak.mjs @@ -34,7 +34,7 @@ export default measureExtraModule({ ["`deck.streak`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, source, axis, title, color, colors, labels}` · default on with a measure slice", "`umtool look <p> deck.streak=false`"], ["`deck.streak.source`, `.axis`", "`diet` `lostRuns` `pledges` · `date` `runs` · default `diet`, `date`", "`umtool look <p> deck.streak.source=lostRuns`"], ["`deck.streak.position`, `.x`/`.y`, `.scale`", "an anchor in the footage box · design px · 0.5–2 · default `bottom-center`, unset, 1", "`umtool look <p> deck.streak.position=bottom-left`"], - ["`deck.streak.hold`, `.finale`", "null (up from the first run on) or 2–600 s · `hide` `show` · default null, `hide`", "`umtool look <p> deck.streak.hold=15`"], + ["`deck.streak.hold`, `.finale`", "0 (up from the first run on) or 2–600 s · `hide` `show` · default 0, `hide`", "`umtool look <p> deck.streak.hold=15`"], ["`deck.streak.title`, `.color`, `.colors`, `.labels`", "≤40 · #hex · `{<regime>: #hex}` · `{<regime>: words}` · default the source's word, the accent, the regimes' inks and names", "`umtool look <p> deck.streak.title='Every diet'`"], ], },