commit 551612ddad997e8a93036d0519261e516e13fcb2
parent e9ae127bf33b0bf12e2bce4f1f097301204c1396
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 4 Nov 2026 17:37:16 -0500
umtool: the carried post after a THREADED card draws its head at that card's words box size (headSize, measured in the build, cardWordsSize in Play's route), not this card's -- its words opened 13-17 px off where the item before's sat on mid-7's thread joins (measured on 11 of them: now equal, a plain card's within 2 px)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
5 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/umtool/app/api/report/post-item/route.ts b/umtool/app/api/report/post-item/route.ts
@@ -65,14 +65,16 @@ async function itemOf(project: { dir: string }, manifest: Record<string, unknown
/**
* How the item before draws its post: its words' size (post-item.mjs cardWordsSize; threaded when its plan is) and
- * whether its card is PLAIN (no thread: its head the card's, the carried post drawn with it -- the build's measure).
+ * whether its card is PLAIN (no thread: its head the card's, the carried post drawn with it -- the build's measure),
+ * else the size its head is drawn at (its words box's).
*/
function joinCarry(prev: Entry, prevCtx: Record<string, unknown> | null, render: Record<string, unknown>, box: { width: number; height: number }) {
const pe = panelEntry(prev, render) as Entry;
const follow = followKnobs(pe, render).on;
const plan = postItemPlan(pe, render, (prevCtx ?? {}) as never) as { follow?: { thread?: unknown } };
const threaded = follow && !!plan.follow?.thread;
- return { size: cardWordsSize(pe, box, { follow, threaded }), plain: !threaded };
+ // A threaded card's head is at its words box's size (cardWordsSize unthreaded: the box, not the post's tile).
+ return { size: cardWordsSize(pe, box, { follow, threaded }), plain: !threaded, headSize: threaded ? cardWordsSize(pe, box, { follow }) : null };
}
/** A project file under posts-media/, never outside it (its real path checked). */
diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md
@@ -1042,7 +1042,7 @@ item's card -- shot at its last frame in the build, its page in a second frame i
and dissolves into this one's, which is whole under it before it starts to go (`joinOpacities`: what both draw never
dims; the same content at the same width -- a carried post drawn alike -- is this card's from the first frame), the
post it ended on (carried in, or the scene's) is drawn as that item drew its post (its head -- a plain card's head at
-the card's size, not the words' -- its words at their size and gap) and framed where it sat (the anchor measured on
+the card's size, a threaded card's at its words box's, never this card's -- its words at their size and gap) and framed where it sat (the anchor measured on
both pages), the slot's well fades in or out, and the attachment it ended on (its last frame) cross-fades into this
one's -- the same one (a media scene) is held. The read starts AFTER the join (`narrationSchedule`'s `pre`): an item
in a run is the join longer. `render.posts.join = { on, seconds }`; an item's `join: false` cuts. The build shoots the
diff --git a/umtool/report-to-video/post-item.mjs b/umtool/report-to-video/post-item.mjs
@@ -970,7 +970,7 @@ export function nameHtml(who, { redact, cls = "" }) {
* highlight?: { scope: string, from: number, to: number, color: string } | null,
* redaction?: { terms: Array<{term: string, wholeWord?: boolean}>, markup?: Record<string, any> } | null, follow?: boolean,
* thread?: { tiles?: Array<{ scope: string, mode: string }> } | null,
- * join?: { A?: { x: number, y: number, width: number, height: number }, slotA?: Record<string, number> | null, fromUrl?: string | null, size?: number | null, same?: boolean, plain?: boolean } | null }} o
+ * join?: { A?: { x: number, y: number, width: number, height: number }, slotA?: Record<string, number> | null, fromUrl?: string | null, size?: number | null, same?: boolean, plain?: boolean, headSize?: number | null } | null }} o
*/
export function postCardHtml(entry, { width, height, palette = {}, fonts = {}, phase = "read", parentShotUrl = null, transparent = false, avatars = {}, highlight = null, redaction = null, follow = false, thread = null, join = null }) {
const hlOf = (scope) => (highlight && highlight.scope === scope ? highlight : null);
@@ -1072,11 +1072,12 @@ export function postCardHtml(entry, { width, height, palette = {}, fonts = {}, p
// THE JOIN (post-join.mjs): the post the item before ended on -- carried in, or the scene's -- drawn as that item
// drew its post (its head, its words at their size), so the item opens on it exactly as it ended.
const asPost = (scope, p, r, attr, mode, slotAttr = "") => {
- // A PLAIN card before (no thread): its head is the card's (not the words' size) and its words a card's gap below.
+ // A PLAIN card before (no thread): its head is the card's (not the words' size) and its words a card's gap below;
+ // a THREADED one: its head at ITS words' box size (`headSize`), not this card's.
const sz = fin(join?.size) ? join.size : sizeFor(contextText(p) || " ", innerW, innerH - 170 * k);
const own2 = { author: p.author, handle: p.handle };
const headP = `<div class="head"${r ? ' data-redacted=""' : ""}>${avatarHtml(own2, { redact: r, size: Math.round(64 * k), accent: r ? undefined : pal.accent, img: r ? null : pic(p) })}<div class="hwho">${nameHtml(own2, { redact: r, cls: "big" })}<div class="date">${esc(cardDate(p.date))}</div></div><div class="mark">${esc(PLATFORM_NAME[entry.platform] ?? "")}</div></div>`;
- tileHtml.push(`<div class="tslot" data-thread-slot="${esc(scope)}"${slotAttr}><div class="tile tpost tcarry${join?.plain ? " tplain" : ""}" data-thread-tile="${esc(scope)}" data-thread-mode="${mode}" ${attr} data-join-anchor="">${relationHtml(t0(scope))}${headP}<div class="twords" style="font-size:${sz}px">${wordsHtml(contextText(p), r && p.handle ? [...blurred, p.handle] : blurred)}</div></div></div>`);
+ tileHtml.push(`<div class="tslot" data-thread-slot="${esc(scope)}"${slotAttr}><div class="tile tpost tcarry${join?.plain ? " tplain" : ""}" data-thread-tile="${esc(scope)}" data-thread-mode="${mode}" ${attr} data-join-anchor="">${relationHtml(t0(scope))}${!join?.plain && fin(join?.headSize) ? headP.replace('<div class="head"', `<div class="head" style="font-size:${join.headSize}px"`) : headP}<div class="twords" style="font-size:${sz}px">${wordsHtml(contextText(p), r && p.handle ? [...blurred, p.handle] : blurred)}</div></div></div>`);
};
const refTile = (scope, p, where, attr) => {
const mode = tmode(scope);
diff --git a/umtool/report-to-video/post-join-continuity.test.mjs b/umtool/report-to-video/post-join-continuity.test.mjs
@@ -62,16 +62,19 @@ test("THE SEGMENT's CLOCK over a join: moved from the item before's place (an ex
assert.match(faded, /overlay=x=900:y=20:/);
});
-test("THE CARRIED POST drawn as a PLAIN card drew it: its head at the card's size (not the words'), its words a card's gap below -- a threaded card before keeps the tile's", () => {
+test("THE CARRIED POST drawn as a PLAIN card drew it: its head at the card's size (not the words'), its words a card's gap below; after a threaded card, its head at that card's words box size", () => {
const before = post("10", "I'm only giving mercy because I'm concerned for my moms.", 7);
const reply = narrate(post("11", "notice how thats the exact character limit", 8, { parents: [ref("10", before.text, 7)], thread: { group: "limit" } }), [["notice how thats the exact character limit"]]);
const tl = [narrate(before, [[before.text]]), reply];
const ctx = planContext(tl, 1);
const plan = postItemPlan(reply, undefined, ctx);
- const html = (plain) => postCardHtml(reply, { width: 1574, height: 886, follow: true, thread: plan.follow.thread, join: { A: { x: 10, y: 10, width: 800, height: 500 }, size: 38, plain } });
+ const html = (plain, headSize = null) => postCardHtml(reply, { width: 1574, height: 886, follow: true, thread: plan.follow.thread, join: { A: { x: 10, y: 10, width: 800, height: 500 }, size: 38, plain, headSize } });
assert.match(html(true), /class="tile tpost tcarry tplain"/);
assert.match(html(true), /\.tplain > \.head \{ font-size: 16px; line-height: normal; \}/);
assert.match(html(false), /class="tile tpost tcarry" /);
+ // A threaded card before: its head at its own words box's size, not this card's.
+ assert.match(html(false, 41), /data-join-anchor=""><div class="head" style="font-size:41px">/);
+ assert.doesNotMatch(html(true, 41), /font-size:41px/);
});
test("THE KEY: a joined item's key carries the join's drawing and the clock the item before ran -- its key changes; an item with no join keeps the key it had", () => {
diff --git a/umtool/report-to-video/post-render.mjs b/umtool/report-to-video/post-render.mjs
@@ -442,7 +442,7 @@ export async function renderPostCards(entry, { box, render, dir, manifestDir, la
const post = document.querySelector('[data-thread-slot="post"] .head') ?? card.querySelector(".head");
const words = document.querySelector('[data-thread-slot="post"] .twords') ?? document.querySelector("[data-post-words]");
const pr = post ? post.getBoundingClientRect() : null;
- return { A: { x: c.left, y: c.top, width: c.width, height: c.height }, anchor: pr ? pr.top - c.top : null, size: words ? parseFloat(getComputedStyle(words).fontSize) : null, plain: !document.querySelector('[data-thread-slot="post"]') };
+ return { A: { x: c.left, y: c.top, width: c.width, height: c.height }, anchor: pr ? pr.top - c.top : null, size: words ? parseFloat(getComputedStyle(words).fontSize) : null, plain: !document.querySelector('[data-thread-slot="post"]'), headSize: post ? parseFloat(getComputedStyle(post).fontSize) : null };
});
if (m) {
const png = path.join(dir, "join-from.png");
@@ -460,7 +460,7 @@ export async function renderPostCards(entry, { box, render, dir, manifestDir, la
}
const pl = postLayout(pe, box);
const same = Math.abs(m.A.width - layout.card.width) < 2 && !!(follow.thread?.tiles ?? []).some((t) => t.mode === "carry" || (t.mode === "scene" && t.wasPost));
- join = { A: { x, y, width: Math.ceil(m.A.width), height: Math.ceil(m.A.height) }, slotA: pl.slot && pl.mode === "side" ? pl.slot : null, fromUrl: pathToFileURL(png).href, size: m.size, same, anchor: m.anchor, plain: m.plain };
+ join = { A: { x, y, width: Math.ceil(m.A.width), height: Math.ceil(m.A.height) }, slotA: pl.slot && pl.mode === "side" ? pl.slot : null, fromUrl: pathToFileURL(png).href, size: m.size, same, anchor: m.anchor, plain: m.plain, headSize: m.headSize };
out.joinFrom = { A: join.A, layout: pl, clock: clockFrom ? { x: clockFrom.x, y: clockFrom.y } : null, pngClock };
}
}