Archilyzer · Source

archilyzer

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

commit 2ec05ea0548ac46cd0d6adf6681893a5d3400859
parent d3f3b0cb10ede782d8762aab426e25419920dfcf
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat,  7 Nov 2026 13:08:10 -0500

umtool: a post drawn as a thread read dims its excerpt's unread words too

The thread layout (a post that quotes or answers another) drew his words without
excerptCutWords, so an excerpted post read in part showed every word lit (Leaflit's
6 Oct post in leaflit-side-tally, 7 Nov). Same cut as the plain card; a test.

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

Diffstat:
Mumtool/report-to-video/post-item.mjs | 2+-
Mumtool/report-to-video/post-thread.test.mjs | 10++++++++++
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"); +});