commit 5d18296f838f424a52bab4b672a11bb10fa6abc2
parent 964c06d2b7172368b9f3f8e534b8ab9d0e847e68
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 21 Oct 2026 22:37:57 -0400
umtool: stamp effect, verdict pip colour and post QR switches; a deck save keeps markers and the other regions
The fact-check form gains "stamp effect" (factcheck.stamp.show); the On-screen
settings gain timeline "colour" (deck.pip.color) and posts "qr codes"
(deck.posts.qr). A settings save carries deck.markers through, and every
render.chrome key it does not edit (threads, flips, stats, fx), not only factcheck.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
4 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/umtool/components/projects/OnscreenSection.tsx b/umtool/components/projects/OnscreenSection.tsx
@@ -521,7 +521,7 @@ type DeckSettings = {
height: number;
footageScale: number;
background: string;
- pip: { spacing: string; size: number; activeSize: number };
+ pip: { spacing: string; size: number; activeSize: number; color: string };
title: { size: number; maxChars: number };
subtitle: { parts: "auto" | string[]; dateFormat: string };
qr: { show: boolean; size: number; links: string };
@@ -538,7 +538,10 @@ type DeckSettings = {
maxLines: number;
inset: number;
shift: false | { scale: number; seconds: number };
+ qr: boolean;
};
+ /** Flags on the pip track (`deck.markers`): written in the manifest, carried through every save here. */
+ markers?: { after: string; label: string; color?: string }[];
};
/** `when`: the bool field that must be on for this one to apply (and be shown). */
@@ -580,6 +583,7 @@ const GROUPS: { name: string; fields: Field[] }[] = [
{ key: "pip.spacing", label: "spacing", kind: "select", options: ["even", "time"], hint: "even, or by each clip's length" },
{ key: "pip.size", label: "pip", kind: "num", hint: "px, 2–24" },
{ key: "pip.activeSize", label: "active", kind: "num", hint: "px, 2–40, at least the pip" },
+ { key: "pip.color", label: "colour", kind: "select", options: ["accent", "verdict"], hint: "accent; or verdict: a clip that carries a claim lights its pip in the claim's verdict colour, with a shape per verdict (the tally's cells carry the same shape)" },
],
},
{
@@ -599,6 +603,7 @@ const GROUPS: { name: string; fields: Field[] }[] = [
{ key: "posts.hold", label: "hold", kind: "num", step: 0.5, hint: "s, 0–10: the clip that carries posts is held on its last frame, silent, so the last post can be read; part of the cut's length" },
{ key: "posts.position", label: "side", kind: "select", options: ["top-right", "top-left"], hint: "the side the column hangs from: the frame's edge when making room, else the footage's" },
{ key: "posts.width", label: "width", kind: "int", hint: "px, 320–900" },
+ { key: "posts.qr", label: "qr codes", kind: "bool", hint: "off: no QR on any post card (popup or feed) and the words take its width; each clip's own QR in the panel stays" },
{ key: "posts.qrSize", label: "qr", kind: "num", hint: "px, 80–200, at most half the card" },
{ key: "posts.links", label: "qr links", kind: "select", options: ["archive", "original"], hint: "archive: each post's QR opens its page on the archive the manifest names (which links on to the original), when the build finds the post there; original: the bsky.app / x.com link itself" },
{ key: "posts.maxLines", label: "lines", kind: "int", hint: "2–14: longer posts end in an ellipsis" },
@@ -1082,13 +1087,17 @@ export default function OnscreenSection({
const saveSettings = useCallback(async () => {
if (!doc) return;
+ // Everything this form does not edit is the manifest's, carried through
+ // as saved, never dropped by a deck save: the fact-check settings and the
+ // other regions (threads, flips, stats, fx) beside the deck, and the
+ // deck's markers (`deck.markers`, written in the manifest).
+ const { engine: _e, layout: _l, deck: savedDeck, ...others } = doc.chrome ?? {};
+ const markers = (savedDeck as { markers?: unknown } | undefined)?.markers;
const chrome = {
engine: (doc.chrome?.engine as string) ?? "hyperframes",
layout: (doc.chrome?.layout as string) ?? "deck",
- deck: deckOf(form, doc.defaults),
- // The fact-check settings are the manifest's (this form does not edit
- // them): carried through as saved, never dropped by a deck save.
- ...(doc.chrome?.factcheck !== undefined ? { factcheck: doc.chrome.factcheck } : {}),
+ deck: { ...deckOf(form, doc.defaults), ...(markers !== undefined ? { markers } : {}) },
+ ...others,
};
const ok = await putChrome(chrome);
if (!ok) return;
diff --git a/umtool/components/projects/StructureEditors.tsx b/umtool/components/projects/StructureEditors.tsx
@@ -21,7 +21,7 @@ type Doc = {
posts: Post[];
deckOn: boolean;
factcheck: { verdicts?: Record<string, Partial<Verdict>>; stamp?: Record<string, unknown>; tally?: Record<string, unknown> } | null;
- factcheckResolved: { verdicts: Record<string, Verdict>; stamp: { seconds: number; position: string }; tally: { show: boolean; position: string } };
+ factcheckResolved: { verdicts: Record<string, Verdict>; stamp: { show: boolean; seconds: number; position: string }; tally: { show: boolean; position: string } };
verdicts: string[];
token: string | null;
};
@@ -262,6 +262,8 @@ function FactcheckEditor({ doc, busy, save }: { doc: Doc; busy: boolean; save: (
Object.fromEntries(doc.verdicts.map((k) => [k, { label: String(given.verdicts?.[k]?.label ?? ""), color: String(given.verdicts?.[k]?.color ?? "") }])),
);
const [seconds, setSeconds] = useState(given.stamp?.seconds == null ? "" : String(given.stamp.seconds));
+ // `stamp.show`: off draws no stamp over the footage; the tally still counts.
+ const [stampOn, setStampOn] = useState(given.stamp?.show !== false);
const submit = () => {
const verdicts: Record<string, Record<string, string>> = {};
for (const [k, o] of Object.entries(v)) {
@@ -277,6 +279,8 @@ function FactcheckEditor({ doc, busy, save }: { doc: Doc; busy: boolean; save: (
const stamp = { ...(given.stamp ?? {}) } as Record<string, unknown>;
if (seconds.trim()) stamp.seconds = Number(seconds);
else delete stamp.seconds;
+ if (stampOn) delete stamp.show;
+ else stamp.show = false;
if (Object.keys(stamp).length) out.stamp = stamp;
else delete out.stamp;
void save(Object.keys(out).length ? out : null);
@@ -300,7 +304,10 @@ function FactcheckEditor({ doc, busy, save }: { doc: Doc; busy: boolean; save: (
})}
</div>
<div className="flex items-center gap-2 text-[var(--color-dim)]">
- <label>stamp seconds <input value={seconds} placeholder={String(doc.factcheckResolved.stamp.seconds)} onChange={(e) => setSeconds(e.target.value)} className={`${input} w-14`} /></label>
+ <label title="off: no verdict stamp over the footage; the tally in the panel still counts each claim when its stamp would have landed">
+ <input type="checkbox" data-testid="fc-stamp-show" checked={stampOn} onChange={(e) => setStampOn(e.target.checked)} /> stamp effect
+ </label>
+ <label>stamp seconds <input value={seconds} placeholder={String(doc.factcheckResolved.stamp.seconds)} disabled={!stampOn} onChange={(e) => setSeconds(e.target.value)} className={`${input} w-14`} /></label>
<button type="button" data-testid="fc-save" disabled={busy} onClick={submit} className={buttonVariants({ variant: "outline", size: "sm" })}>
Save labels
</button>
diff --git a/umtool/e2e/onscreen.spec.ts b/umtool/e2e/onscreen.spec.ts
@@ -172,6 +172,30 @@ test("settings save only what differs from the defaults; a refused value shows t
await putChrome(request, PROJECT, DECK_ON);
});
+test("verdict pips and no QR on posts are settings; a save keeps the manifest's markers and fact-check block", async ({
+ page,
+ request,
+}) => {
+ const markers = [{ after: "c01", label: "3 to 5 weeks pass" }];
+ const factcheck = { stamp: { show: false } };
+ await putChrome(request, PROJECT, { ...DECK_ON, deck: { markers }, factcheck });
+ await openSection(page);
+
+ const qr = page.getByTestId("onscreen-setting-posts.qr");
+ await expect(qr).toBeChecked();
+ await qr.uncheck();
+ await page.getByTestId("onscreen-setting-pip.color").selectOption("verdict");
+ await page.getByTestId("onscreen-settings-save").click();
+
+ await expect.poll(() => readManifest().render.chrome).toEqual({
+ ...DECK_ON,
+ deck: { pip: { color: "verdict" }, posts: { qr: false }, markers },
+ factcheck,
+ });
+
+ await putChrome(request, PROJECT, DECK_ON);
+});
+
test("a table edit saves onscreen; an emptied row deletes the key", async ({ page, request }) => {
await putChrome(request, PROJECT, DECK_ON);
await putOnscreen(request, PROJECT, { c01: null, c02: null, k01: null });
diff --git a/umtool/e2e/timeline-edit.spec.ts b/umtool/e2e/timeline-edit.spec.ts
@@ -136,4 +136,12 @@ test("a post added, then removed; the fact-check's labels once the deck is on",
await expect
.poll(() => (manifest().render.chrome as { factcheck?: unknown }).factcheck)
.toEqual({ verdicts: { CONTRADICTED: { label: "NOPE", color: "#ff0000" } } });
+
+ // The stamp effect off: no stamp over the footage, the tally still counts.
+ await expect(page.getByTestId("fc-stamp-show")).toBeChecked();
+ await page.getByTestId("fc-stamp-show").uncheck();
+ await page.getByTestId("fc-save").click();
+ await expect
+ .poll(() => (manifest().render.chrome as { factcheck?: unknown }).factcheck)
+ .toEqual({ verdicts: { CONTRADICTED: { label: "NOPE", color: "#ff0000" } }, stamp: { show: false } });
});