commit 5d04480e69f66c3f6c31206c5ae070d02b98df3d
parent d3f3b0cb10ede782d8762aab426e25419920dfcf
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sat, 7 Nov 2026 13:08:10 -0500
Merge lane/thread-excerpt: an excerpted post drawn as a thread read dims what it does not read (operator, 7 Nov: "narrate the leaflit video" -- the 6 Oct card's excerpt showed whole)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/umtool/report-to-video/post-item.mjs b/umtool/report-to-video/post-item.mjs
@@ -1373,7 +1373,7 @@ export function postCardHtml(entry, { width, height, palette = {}, fonts = {}, p
const psize = own.trim() ? Math.max(followMin, pfit.size, pfit.fits ? 0 : longReadSize(L, { width, height }, true, false) ?? 0) : size;
const lead = !parents.length && (parentShotUrl || entry.replyingTo) ? ctx.join("") : "";
tileHtml.push(
- `<div class="tslot" data-thread-slot="post"><div class="tile tpost" data-thread-tile="post">${repost}${lead}${relationHtml(t0("post"))}${head}<div class="twords${picOwn ? " pmen" : ""}" style="font-size:${picOwn ? menSize : psize}px">${wordsHtml(own, blurred, "post", hlOf("post"), blk("post"))}</div>${picOwn ? picIn("post", entry, innerW, Math.round(innerH * 0.62)) : ""}${quotedTile}${counts ? `<div class="counts" data-post-counts="">${counts}</div>` : ""}</div></div>`,
+ `<div class="tslot" data-thread-slot="post"><div class="tile tpost" data-thread-tile="post">${repost}${lead}${relationHtml(t0("post"))}${head}<div class="twords${picOwn ? " pmen" : ""}" style="font-size:${picOwn ? menSize : psize}px">${wordsHtml(own, blurred, "post", hlOf("post"), blk("post"), excerptCut)}</div>${picOwn ? picIn("post", entry, innerW, Math.round(innerH * 0.62)) : ""}${quotedTile}${counts ? `<div class="counts" data-post-counts="">${counts}</div>` : ""}</div></div>`,
);
// THE SCENE (post-conversation.mjs): the posts the run left on screen, drawn as they were -- never read (no
// blocks, no word spans), their words redacted by the same terms, their authors blurred by their own item's rule.
diff --git a/umtool/report-to-video/post-thread.test.mjs b/umtool/report-to-video/post-thread.test.mjs
@@ -350,3 +350,13 @@ test("THE READ IN VIEW: a context quote inside his post only dims; a carried par
assert.equal(isDrawnState({ op: {}, offset: 0, fadeTop: 0, fadeBottom: 0, tiles: { post: [1, 1, 300] } }), true);
assert.equal(isDrawnState({ op: {}, offset: 0, fadeTop: 0, fadeBottom: 0, tiles: { "parent:0": [0.62, 0.5, 300] } }), false);
});
+
+test("the card page: his post's excerpt dims the words it does not read in a thread read too (a post that quotes another: 6 Oct Leaflit card, 7 Nov)", () => {
+ const read = "That is exactly what I was saying yesterday morning.";
+ const e = narrate(base({ quoted: { author: "Other", handle: "other", text: QUOTED }, excerpt: [read] }), [[QUOTED], [read]]);
+ const plan = postItemPlan(e, {});
+ const html = postCardHtml(e, { width: 1600, height: 900, follow: true, thread: plan.follow.thread });
+ assert.ok(html.includes('data-thread-slot="post"'), "drawn as a thread");
+ assert.match(html, /<span data-w="post:\d+" class="xcut" data-post-cut="">generator<\/span>/, "an unread word is dimmed");
+ assert.doesNotMatch(html, /<span data-w="post:\d+"[^>]*class="xcut"[^>]*>yesterday<\/span>/, "a read word is not");
+});