commit 2195c5f590086a5c81eab2246749d1f36415f776
parent d114b976f321d5eebc3d217191259c374236e67a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 20 Nov 2026 13:58:17 -0500
deck: no rail of one or two items
The operator, after watching a one-clip window take: "the fact there's a
one item timeline looks bad. Don't do that."
- deck.mjs RAIL_MIN_PIPS (3), railDrawn and railOffStyle. Under three pips
these are not drawn:
- the deck's pip track (its line, fuse, pips, marker, markers' flags and
claim marks on it);
- the stacked deck's rail (section name, bars, "1 / 2") and a twocrop
strip's bars;
- the finale's large rail (track, fuse, spans, marks, pips, leaders,
labels).
Their markup stays, hidden with display:none, so no cue loses its element
and nothing reflows into the room.
- A window take lays out only the clips it covers (windowManifest). Its
build has no whole-cut schedule to light, so a window over one or two
clips draws no rail, and one over three or more draws a rail of those.
- No setting draws a rail under three: there is no rail on/off knob, and
the rail module's docs row says so.
- At three pips or more, every page is byte for byte what it was. This was
checked against the pages before the change, for 1 to 4 clips, on the
deck, the stacked deck and the finale. rail-min.test.mjs covers 1 and 2
hidden and 3 unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
8 files changed, 100 insertions(+), 10 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -14,6 +14,11 @@
minimum length and the corner. A gap may also record `why` (`dead-air` or `other`). Nothing draws it yet.
- It is off by default, and a cut that sets nothing renders byte for byte as before. Turning it on re-renders
only the segments of clips that have a marked gap. Montages, basic mode and Export one clip draw no mark.
+- **umtool: no rail of one or two items.** A rail with fewer than three pips is no longer drawn. That covers a cut
+ of one or two clips, and a window take over one or two (a window take lays out only the clips it covers, so it
+ cannot light the whole cut's rail). It applies to the deck's pip track (its fuse, marker and flags with it), the
+ stacked deck's rail and count, and the finale's large rail. Nothing moves into the room they leave. With three
+ pips or more, the pages are the markup they always were.
- **umtool: `take --at` lands on the right clip after a clip with gaps.** When the window was timed by the
manifest's estimates, a clip counted at its whole cut span, gaps included. A window aimed at the clip after it
then landed earlier by the gaps' total and rendered the gapped clip instead. The estimate now counts the seconds
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -3007,6 +3007,7 @@ The pip track along the top of the deck; the markers' flags stand over it ([mark
| `deck.pip.sectionColor0` | the section before the first marker, with `color: "section"`: a `#hex` or a palette key (`fg`, `muted`, `accent`, `amber`, `dim`) · default the accent | `umtool look <p> deck.pip='{"color":"section","sectionColor0":"#5fa8d3"}'` |
| `deck.markers[].label` | optional: a marker with none (or `""`) draws a tick at its boundary, no words, and takes no band over the track | `umtool look <p> deck.markers='[{"after":"c04","color":"#e07a9a"}]'` |
| `deck.markers[].level` | `1` (a section, the default) · `2` (a subsection of the section before it: a shorter flag or a half-height tick, its label smaller and quieter, and in sections no colour of its own -- its pips, fuse and ring keep its section's; to every edit a section like any other; the cut's first marker must be a section) · at most 32 markers in all; past a dozen labelled, a label too crowded to say anything is drawn as a tick | `umtool look <p> deck.markers='[{"after":"c04","label":"Early days","level":2}]'` |
+| a rail of one or two pips | never drawn (deck.mjs `RAIL_MIN_PIPS`, 3): a cut -- or a window take, which lays only the clips it covers -- of one or two clips draws no pip track, no fuse, no marker and no flags; the stacked deck no rail and no count; the finale no large rail. Nothing moves into the room. No setting draws one under three | — |
| `deck.rail.labels` | `false` draws every marker as a tick, no words, and no band over the track (the current section's name can stand under the rail instead: [Section title](#section-title)) · default `true` | `umtool look <p> deck.rail='{"labels":false}'` |
### Counter
diff --git a/umtool/report-to-video/chrome-deck.mjs b/umtool/report-to-video/chrome-deck.mjs
@@ -38,7 +38,7 @@
import { fileURLToPath } from "node:url";
import {
- claimsLayout, cueTime, cueTimeAfter, PIP_PITCH_DEFAULT, stampsOnFrames, deckChoreography, deckLayout, deckMarkers, MARKER_DEFAULT_COLOR, MARKER_LABEL_SIZE, MARKER_ROW, MARKER_SUB_LABEL_SIZE, pageDuration, pipSegments, pipXs, railSections, resolveDeck,
+ claimsLayout, cueTime, cueTimeAfter, PIP_PITCH_DEFAULT, stampsOnFrames, deckChoreography, deckLayout, deckMarkers, MARKER_DEFAULT_COLOR, MARKER_LABEL_SIZE, MARKER_ROW, MARKER_SUB_LABEL_SIZE, pageDuration, pipSegments, pipXs, railOffStyle, railSections, resolveDeck,
resolveSectionTitle,
} from "./deck.mjs";
import { contrast } from "./chrome-intro.mjs";
@@ -1097,7 +1097,7 @@ export function deckHtml(schedule, render, opts = {}) {
<div class="ground"></div>
${panel && qr ? `<div class="plate"></div>` : ""}
${panel ? `<div class="edge"></div><div class="sheen"></div>` : ""}
- <div class="track">
+ <div class="track"${railOffStyle(pips.length)}>
<div class="rail"></div>
${secColors && sections.fuses.length
? sections.fuses.map((f) => `<div class="fuse fz" data-k="${f.k}" style="left:${f.x0}px; width:${r4(f.x1 - f.x0)}px; background:${secColors[f.section]}"></div>`).join("")
diff --git a/umtool/report-to-video/chrome-finale.mjs b/umtool/report-to-video/chrome-finale.mjs
@@ -22,7 +22,7 @@
// in place. Either way the page fades out through the dissolve after the run.
//
// The timeline is cues, each stating its from (chrome-deck.mjs says why).
-import { cueTime, cueTimeAfter, finaleRail, pageDuration, resolveDeck } from "./deck.mjs";
+import { cueTime, cueTimeAfter, finaleRail, pageDuration, railDrawn, railOffStyle, resolveDeck } from "./deck.mjs";
import { finaleClaimsMarkup } from "./chrome-claims.mjs";
import { mix, rgba, shapeCss, subtitleMarkup, subtitlePartsCss, subtitleTokens } from "./chrome-deck.mjs";
import { resolveFactcheck, tallyCells, tallyFinals, tallyOf } from "./factcheck.mjs";
@@ -359,6 +359,9 @@ export function finaleHtml(schedule, render, window, opts = {}) {
`<div class="vframe" data-k="frame" style="left:${L.box.x}px; top:${L.box.y}px; width:${L.box.width}px; height:${L.box.height}px"></div>`
: `<div class="ground" data-k="ground"></div>`;
+ // Under RAIL_MIN_PIPS (deck.mjs): the large rail -- its track, fuse, spans, marks, pips, leaders and labels -- is
+ // there but not drawn; at or over it, the markup it always was.
+ const railOnly = (html) => (railDrawn(L.pips.length) || !html ? html : `<div style="display:none">${html}</div>`);
const pipHtml = L.pips
.map((p, k) => {
const half = p.size / 2;
@@ -603,10 +606,10 @@ export function finaleHtml(schedule, render, window, opts = {}) {
${hole}
${deckCopy}
<div class="panel" data-k="panel"></div>
- <div class="track" data-k="track"></div>
- ${L.pips.length > 1 ? `<div class="fuse" data-k="fuse"></div>` : ""}
- ${spans}${markHtml}${pipHtml}${fq ? fq.html : ""}
- ${leaderHtml}${labelHtml}
+ <div class="track" data-k="track"${railOffStyle(L.pips.length)}></div>
+ ${L.pips.length > 1 ? `<div class="fuse" data-k="fuse"${railOffStyle(L.pips.length)}></div>` : ""}
+ ${railOnly(`${spans}${markHtml}${pipHtml}`)}${fq ? fq.html : ""}
+ ${railOnly(`${leaderHtml}${labelHtml}`)}
${totalsHtml}
${statsHtml}
${captionHtml}
diff --git a/umtool/report-to-video/chrome-vdeck.mjs b/umtool/report-to-video/chrome-vdeck.mjs
@@ -18,7 +18,7 @@
// shown over exactly its span, so a frame whose words did not move keys as the
// frame before it).
-import { deckChoreography, pipSegments, resolveDeck, resolveSectionTitle, stackedCounterOn } from "./deck.mjs";
+import { deckChoreography, pipSegments, railOffStyle, resolveDeck, resolveSectionTitle, stackedCounterOn } from "./deck.mjs";
import { mix, rgba } from "./chrome-deck.mjs";
import { resolveCounter } from "./counter.mjs";
import { tallyLabelOf, tallyOf, tallySteps } from "./factcheck.mjs";
@@ -341,8 +341,8 @@ export function stackedDeckHtml(schedule, render, opts = {}) {
.mark { position: absolute; left: ${g.wordmark.x}px; top: ${g.wordmark.y}px; font-family: ${display}; font-size: ${g.wordmark.size}px;
letter-spacing: 0.12em; color: ${mix(pal.bg, pal.fg, 0.24)}; white-space: nowrap; }`;
const body = `<div id="rt" data-k="rt">
- <div class="rail" data-k="rail">${railLabels("r", "rlab")}${counts}<div class="bars">${railBars("r")}</div></div>
- <div class="top2" data-k="top2">${tops.join("")}<div class="bars">${railBars("t")}</div>${railLabels("t", "tlab2")}</div>
+ <div class="rail" data-k="rail"${railOffStyle(pipped.length)}>${railLabels("r", "rlab")}${counts}<div class="bars">${railBars("r")}</div></div>
+ <div class="top2" data-k="top2">${tops.join("")}<div class="bars"${railOffStyle(pipped.length)}>${railBars("t")}</div>${railLabels("t", "tlab2")}</div>
${blocks.join("")}
${strips.join("")}
${smallQrs.join("")}
diff --git a/umtool/report-to-video/deck.mjs b/umtool/report-to-video/deck.mjs
@@ -2343,6 +2343,19 @@ export function pipSegments(schedule) {
return schedule.segments.filter((s) => !s.hideDeck && !s.noPip);
}
+/**
+ * The fewest pips a rail is drawn with (operator, 20 Nov: "the fact there's a one item timeline looks bad. Don't do
+ * that." -- his standing rule: never a rail of one or two items). Under it -- a cut of one or two clips, or a window
+ * take over one or two -- the deck's pip track (its line, fuse, pips, marker and markers' flags), the stacked deck's
+ * rail and the finale's large rail are not drawn; everything else stands where it did (nothing reflows into the
+ * room). No setting draws a rail under it.
+ */
+export const RAIL_MIN_PIPS = 3;
+/** Is a rail of `n` pips drawn (RAIL_MIN_PIPS)? */
+export const railDrawn = (n) => n >= RAIL_MIN_PIPS;
+/** The style a rail's element takes when it is not drawn: hidden, its place kept; nothing at all when it is. */
+export const railOffStyle = (n) => (railDrawn(n) ? "" : ' style="display:none"');
+
// ---------------------------------------------------------------------------
// Posts: written statements (a Bluesky or X post) drawn as cards over the
// footage. A post is not a segment -- it has no footage of its own -- so it
diff --git a/umtool/report-to-video/modules/rail.mjs b/umtool/report-to-video/modules/rail.mjs
@@ -74,6 +74,7 @@ export default defineModule({
["`deck.pip.sectionColor0`", "the section before the first marker, with `color: \"section\"`: a `#hex` or a palette key (`fg`, `muted`, `accent`, `amber`, `dim`) · default the accent", "`umtool look <p> deck.pip='{\"color\":\"section\",\"sectionColor0\":\"#5fa8d3\"}'`"],
["`deck.markers[].label`", "optional: a marker with none (or `\"\"`) draws a tick at its boundary, no words, and takes no band over the track", "`umtool look <p> deck.markers='[{\"after\":\"c04\",\"color\":\"#e07a9a\"}]'`"],
["`deck.markers[].level`", "`1` (a section, the default) · `2` (a subsection of the section before it: a shorter flag or a half-height tick, its label smaller and quieter, and in sections no colour of its own -- its pips, fuse and ring keep its section's; to every edit a section like any other; the cut's first marker must be a section) · at most 32 markers in all; past a dozen labelled, a label too crowded to say anything is drawn as a tick", "`umtool look <p> deck.markers='[{\"after\":\"c04\",\"label\":\"Early days\",\"level\":2}]'`"],
+ ["a rail of one or two pips", "never drawn (deck.mjs `RAIL_MIN_PIPS`, 3): a cut -- or a window take, which lays only the clips it covers -- of one or two clips draws no pip track, no fuse, no marker and no flags; the stacked deck no rail and no count; the finale no large rail. Nothing moves into the room. No setting draws one under three", "—"],
["`deck.rail.labels`", "`false` draws every marker as a tick, no words, and no band over the track (the current section's name can stand under the rail instead: [Section title](#section-title)) · default `true`","`umtool look <p> deck.rail='{\"labels\":false}'`"],
],
},
diff --git a/umtool/report-to-video/rail-min.test.mjs b/umtool/report-to-video/rail-min.test.mjs
@@ -0,0 +1,67 @@
+// No rail of one or two items (operator, 20 Nov: "the fact there's a one item timeline looks bad. Don't do that."):
+// the deck's pip track, the stacked deck's rail and the finale's large rail are not drawn under RAIL_MIN_PIPS --
+// their markup there, hidden, nothing else moved -- and at or over it the page is the one it always was.
+//
+// Run with: pnpm test:scripts
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import { finaleRegions } from "./build-video.mjs";
+import { deckHtml } from "./chrome-deck.mjs";
+import { finaleHtml } from "./chrome-finale.mjs";
+import { stackedDeckHtml } from "./chrome-vdeck.mjs";
+import { deckSchedule, RAIL_MIN_PIPS, railDrawn, railOffStyle } from "./deck.mjs";
+import { verticalRender } from "./vertical.mjs";
+
+const PALETTE = { bg: "#101219", fg: "#f2f0ea", muted: "#979caa", accent: "#e5534b", amber: "#ffc860" };
+const render = (deck = {}) => ({ width: 1920, height: 1080, fps: 30, transition: 0.5, palette: PALETTE, chrome: { engine: "hyperframes", layout: "deck", deck } });
+const clips = (n, extra = {}) => Array.from({ length: n }, (_, i) => ({ id: `c${i}`, type: "clip", video: `v${i}`, start: 100, end: 130, title: `T${i}`, ...(extra[i] ?? {}) }));
+const sched = (n, r) => deckSchedule({ entries: clips(n), durs: Array(n).fill(30), D: 0.5, render: r, provenance: {}, metas: Array(n).fill(null) });
+
+test("the rule: three pips or more draw a rail; one or two none", () => {
+ assert.equal(RAIL_MIN_PIPS, 3);
+ assert.deepEqual([1, 2, 3, 4].map(railDrawn), [false, false, true, true]);
+ assert.equal(railOffStyle(3), "", "drawn: no attribute at all, the markup as it was");
+ assert.equal(railOffStyle(2), ' style="display:none"');
+});
+
+test("the deck: 1 and 2 pips, its track hidden (pips, marker, fuse, flags with it); 3, the track as it always was", () => {
+ const r = render();
+ for (const n of [1, 2]) assert.match(deckHtml(sched(n, r), r), /<div class="track" style="display:none">\s*<div class="rail"><\/div>/, `${n} pip(s)`);
+ const three = deckHtml(sched(3, r), r);
+ assert.match(three, /<div class="track">\s*<div class="rail"><\/div>/);
+ assert.ok(!three.includes('style="display:none"'), "nothing hidden at three");
+ // Nothing else moves: the 2-pip page with its track shown is the markup a drawn rail would have.
+ const two = deckHtml(sched(2, r), r);
+ assert.equal(two.replace('<div class="track" style="display:none">', '<div class="track">').includes('<div class="track">'), true);
+ assert.equal(two.split('style="display:none"').length - 1, 1, "only the track");
+});
+
+test("the stacked deck: its rail and a twocrop strip's bars hidden under three; at three as it was", () => {
+ const v = verticalRender({ ...render(), format: "vertical" });
+ for (const n of [1, 2]) {
+ const html = stackedDeckHtml(sched(n, v), v, {});
+ assert.match(html, /<div class="rail" data-k="rail" style="display:none">/, `${n}`);
+ assert.match(html, /<div class="top2" data-k="top2">(?:(?!<div class="bars).)*<div class="bars" style="display:none">/s);
+ }
+ const three = stackedDeckHtml(sched(3, v), v, {});
+ assert.match(three, /<div class="rail" data-k="rail">/);
+ assert.ok(!three.includes('style="display:none"'));
+});
+
+test("the finale's large rail: hidden whole under three pips; at three as it was", () => {
+ const fr = render({ finale: {} });
+ const page = (n) => {
+ const s = deckSchedule({ entries: clips(n + 1, { [n]: { layout: "finale" } }), durs: Array(n + 1).fill(30), D: 0.5, render: fr, provenance: {} });
+ return finaleHtml(s, fr, finaleRegions(fr, "/tmp/x", s)[0].window, {});
+ };
+ const one = page(1);
+ assert.match(one, /<div class="track" data-k="track" style="display:none"><\/div>/);
+ // Its spans, marks and pips in one hidden wrapper, its leaders and labels in another.
+ const wraps = one.split('<div style="display:none">');
+ assert.equal(wraps.length - 1, 2);
+ assert.ok(wraps[1].includes('data-k="p0"'), "the pips are inside the hidden rail");
+ const three = page(3);
+ assert.match(three, /<div class="track" data-k="track"><\/div>/);
+ assert.ok(!three.includes('style="display:none"'));
+});