// CLIPS NOT WALKED (umtool redesign L4, "What needs you"): the working draft's // clips with no walk verdict (lib/projects/report.mjs reviewOf: "unreviewed") // are a call in the Review group -- one row per clip, one card per piece // ("12 clips not walked"), its action the clip bench on the first of them in // walk order (by source, then start: report.mjs walkOrder), the one that is // fetched first when any is. // // Only a draft that is GOING somewhere is waiting on a walk: one whose walk has // begun (a clip has a verdict), or that has a rendered take or a saved version. // A cut still being assembled, never walked and never rendered, is not yet a // call -- 78 of the 91 real report projects have unwalked clips (9 Nov), and an // Inbox that lists every cut in the making is one nobody reads. And a draft // nobody has edited for RECENT_DAYS is not waiting either: its rows are `info` // (the Quiet group, folded), 43 projects down to 12 on the real tree. // // Pure: lib/inbox/projectCalls.ts reads the manifest and the takes and hands // the walk's rows here. export const CLIPS_UNWALKED = "clips-unwalked"; /** A draft not edited for this long is no longer waiting on its walk: `info` (Quiet, folded) -- versions.mjs's rule. */ export { RECENT_DAYS } from "./versions.mjs"; import { RECENT_DAYS } from "./versions.mjs"; /** The card's title. */ export function walkWhat(n) { return `${n} clip${n === 1 ? "" : "s"} not walked`; } /** * The `clips-unwalked` rows of one project. * * `clips` in WALK order (reviewOf's rows, walkOrder); `rendered`: the project * has a rendered take or a saved version. * * @param {{ * project: string, projectTitle: string, projectKind?: string, * clips: Array<{ id: string, verdict: string, fetched?: boolean }>, * rendered: boolean, * at: number, * benchHref: (clip: string) => string, * now?: number, * }} o */ export function walkDecisions({ project, projectTitle, projectKind, clips, rendered, at, benchHref, now = Date.now() }) { const rows = (Array.isArray(clips) ? clips : []).filter((c) => c && typeof c.id === "string"); const waiting = rows.filter((c) => c.verdict === "unreviewed"); if (!waiting.length) return []; const walked = rows.length - waiting.length; if (!walked && !rendered) return []; const first = waiting.find((c) => c.fetched) ?? waiting[0]; const what = walkWhat(waiting.length); const ids = waiting.map((c) => c.id); const why = `${what} · ${walked} of ${rows.length} walked · next ${first.id}` + `${first.fetched === false && !waiting.some((c) => c.fetched) ? " (not fetched yet)" : ""}` + ` — ${ids.slice(0, 6).join(", ")}${ids.length > 6 ? ` and ${ids.length - 6} more` : ""}`; const href = benchHref(first.id); return waiting.map((c) => ({ project, projectTitle, ...(projectKind ? { projectKind } : {}), kind: CLIPS_UNWALKED, target: c.id, what, why, href, severity: now - at > RECENT_DAYS * 864e5 ? "info" : "open", at, })); }