Archilyzer · Source

archilyzer

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

commit 250d748575d7b9d2de454cc52aa8d2c00028e16c
parent bbaafd2751da60d69aba73ab5c5a456c48b15aa6
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 16 Oct 2026 23:40:58 -0400

umtool: the Inbox's rows wrap under sm — the title and why take the first row, the count and action the second (at ~380 px the fixed columns left the title no room); e2e stored-url.spec for the stored media URL option

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

Diffstat:
Mumtool/components/inbox/InboxList.tsx | 18+++++++++++-------
Mumtool/e2e/fixtures/make-fixture.mjs | 43+++++++++++++++++++++++++++++++++++++++++++
Aumtool/e2e/stored-url.spec.ts | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 112 insertions(+), 7 deletions(-)

diff --git a/umtool/components/inbox/InboxList.tsx b/umtool/components/inbox/InboxList.tsx @@ -115,18 +115,22 @@ function Card({ card: c }: { card: InboxCard }) { data-piece={c.piece ?? undefined} data-severity={c.severity} data-muted={c.muted ? "" : undefined} - className="grid grid-cols-[minmax(0,1fr)_56px_190px_112px] items-center gap-x-3.5" + // NARROW FIRST (release 32 R6): under `sm` the line wraps — the title and + // why take the whole first row (two lines each at most), and the count, + // the action and Park/Mute share the second. The four columns from `sm` + // up: at ~380 px their fixed 400 px left the title no room at all. + className="flex flex-wrap items-center gap-x-3.5 gap-y-1.5 sm:grid sm:grid-cols-[minmax(0,1fr)_56px_190px_112px] sm:gap-y-0" > - <div className="min-w-0"> - <b className="block truncate font-medium text-inherit" data-card-title=""> + <div className="min-w-0 basis-full sm:basis-auto"> + <b className="line-clamp-2 font-medium text-inherit sm:block sm:truncate" data-card-title=""> {c.title} <span className="font-normal text-muted-2">·</span> {c.what} </b> - <small className="block truncate text-[12px] text-muted-2">{c.why}</small> + <small className="line-clamp-2 text-[12px] text-muted-2 sm:block sm:truncate">{c.why}</small> </div> - <span className="text-right font-mono text-[12.5px] font-medium text-meter" data-count={c.count}> + <span className="font-mono text-[12.5px] font-medium text-meter sm:text-right" data-count={c.count}> {c.count} </span> - <span className="justify-self-end"> + <span className="sm:justify-self-end"> {c.muted && c.piece ? ( <MuteButton piece={c.piece} kind={c.kind} title={c.title} muted variant="outline" size="md" className="lit-go" /> ) : parked && c.piece ? ( @@ -139,7 +143,7 @@ function Card({ card: c }: { card: InboxCard }) { </Link> )} </span> - <LitActions className="gap-0.5"> + <LitActions className="ml-auto gap-0.5 sm:ml-0"> {!parked && !c.muted && c.piece && ( <> <LifecycleButton piece={c.piece} title={c.title} from={c.lifecycle} to="parked" label="Park" /> diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs @@ -1035,6 +1035,49 @@ writeProject( ]), ); +// A RECORD THAT STORES ITS MEDIA URL (release 32 R6): an Odysee record whose +// metadata.info.json names its one CDN format, so "Cut from the stored media +// URL" is offered beside its fetch (lib/clips/stored.ts). Its own channel and a +// project of one clip on it; the stub records the `storedUrl` the fetch sent. +{ + const dir = path.join(CHANNELS, "testchan-odysee", "data", "odv1"); + mkdirSync(dir, { recursive: true }); + writeFileSync( + path.join(CHANNELS, "testchan-odysee", "config.json"), + JSON.stringify({ name: "Fixture Odysee", handling: "youtube", url: "https://odysee.com/@fixture", platform: "odysee" }) + "\n", + ); + writeFileSync( + path.join(dir, "metadata.info.json"), + JSON.stringify({ + id: "odv1", + title: "Fixture Odysee source", + webpage_url: "https://odysee.com/@fixture:1/odv1:1", + formats: [{ format_id: "original", url: "https://player.odycdn.com/v6/streams/odv1/f0.mp4", protocol: "https", ext: "mp4" }], + }) + "\n", + ); + writeFileSync( + path.join(dir, "transcript.cues.json"), + JSON.stringify({ + title: "Fixture Odysee source", + uploadDate: "20250101", + channel: "Fixture Odysee", + webpageUrl: "https://odysee.com/@fixture:1/odv1:1", + duration: 9, + cues: [ + { start: 0, end: 3, text: "The stored fixture begins." }, + { start: 3, end: 6, text: "Its file address is on record." }, + { start: 6, end: 9, text: "That is all it says." }, + ], + }) + "\n", + ); +} +writeProject( + "stored-url-fixture", + manifest("stored-url-fixture", "The Stored URL Fixture", { siteOrigin: "https://archive.example", channelSlug: "testchan-odysee" }, [ + { type: "clip", id: "s01", video: "odv1", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "its file address is on record" }, + ]), +); + // -- THE TAG FIXTURE ---------------------------------------------------------- // // Cited videos over TWO SECTIONS, for "tag cited videos as …". Nothing here is diff --git a/umtool/e2e/stored-url.spec.ts b/umtool/e2e/stored-url.spec.ts @@ -0,0 +1,58 @@ +import { test, expect } from "@playwright/test"; +import { readFileSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import * as urls from "./urls"; + +// --------------------------------------------------------------------------- +// "Cut from the stored media URL" (release 32 R6) in umtool: offered beside a +// window fetch only when the record stores a media file address the editor can +// cut from (an Odysee record's CDN file: e2e/fixtures/make-fixture.mjs, +// stored-url-fixture on testchan-odysee/odv1), off by default, and ticked it +// rides to the editor as `storedUrl: "fallback"` (the editor stub records it). +// A project whose records store none offers nothing. +// --------------------------------------------------------------------------- + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const FIXTURE = path.join(HERE, "..", ".e2e-song"); +const STORED = "reports/stored-url-fixture"; +const PLAIN = "reports/editor-fetch-many-fixture"; +const STUB_LOG = path.join(FIXTURE, "editor-stub.requests.json"); +const asked = (): Record<string, unknown>[] => { + try { + return JSON.parse(readFileSync(STUB_LOG, "utf8")) as Record<string, unknown>[]; + } catch { + return []; + } +}; + +test("the stored-URL answer: a record that stores its CDN file, one that does not", async ({ request, baseURL }) => { + const yes = await request.get(`${baseURL}/api/cited/stored?channel=testchan-odysee&video=odv1`); + expect(await yes.json()).toEqual({ stored: true, host: "player.odycdn.com", platform: "odysee" }); + const clip = await request.get(`${baseURL}/api/cited/stored?project=${encodeURIComponent(STORED)}&clip=s01`); + expect((await clip.json()).stored).toBe(true); + const no = await request.get(`${baseURL}/api/cited/stored?channel=testchan&video=vid4`); + expect(await no.json()).toEqual({ stored: false }); +}); + +test("Fetch unfetched clips offers it only where a record stores one; ticked, the editor is asked with it", async ({ page }) => { + test.setTimeout(120_000); + // No stored URL among the clips: no option. + await page.goto(urls.section(PLAIN, "timeline")); + await expect(page.getByRole("button", { name: /unfetched clip/i })).toBeVisible(); + await expect(page.locator("[data-stored-url-option]")).toHaveCount(0); + + await page.goto(urls.section(STORED, "timeline")); + const option = page.locator("[data-stored-url-option]"); + await expect(option).toBeVisible(); + await expect(option).toContainText("Cut from the stored media URL"); + await expect(option).toContainText("Odysee only"); + const box = option.getByRole("checkbox"); + await expect(box).not.toBeChecked(); + await box.check(); + const before = asked().length; + await page.getByRole("button", { name: /fetch 1 unfetched clip/i }).click(); + await expect(page.locator("[data-fetch-unfetched-msg]")).toContainText(/fetched 1 clip/, { timeout: 90_000 }); + const ask = asked().slice(before).find((a) => a.manifest === "stored-url-fixture"); + expect(ask).toMatchObject({ channelSlug: "testchan-odysee", videoId: "odv1", storedUrl: "fallback", requestedBy: "umtool" }); +});