AI media harness for planning, generating, and editing locally
TypeScript
Report skipped references, unreadable projects, and dead controls
Bitti923986f7a2d9
diff --git a/src/App.test.tsx b/src/App.test.tsxindex a3e02f5..d7f0bb7 100644--- a/src/App.test.tsx+++ b/src/App.test.tsx@@ -3,6 +3,7 @@import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";import { afterEach, beforeEach, describe, expect, it } from "vitest";import App from "./App";+import { createProjectConfig } from "./lib/project";describe("project library controls", () => {beforeEach(() => localStorage.clear());@@ -36,4 +37,20 @@ describe("project library controls", () => {expect(screen.getByRole("heading", { name: "First scene" })).not.toBeNull();expect(screen.getByText("You can still write and save shot drafts.")).not.toBeNull();});++ it("reports a project it can’t read instead of dropping it from the library", async () => {+ const readable = createProjectConfig({ name: "Readable film", prompt: "A calm kitchen scene", aspectRatio: "16:9", resolution: "1080p", targetDurationSeconds: 30 });+ localStorage.setItem("polstudio.web-projects.v1", JSON.stringify([+ { folderPath: "~/Pol Studio/Readable", config: readable },+ // Written by a looser validator than the zod schema, so it fails to parse.+ { folderPath: "~/Pol Studio/Broken", config: { ...readable, schemaVersion: 99 } },+ ]));+ render(<App />);+ // The good row still loads…+ expect(await screen.findByText("Readable film")).not.toBeNull();+ // …and the bad one is named rather than silently vanishing.+ const alert = await screen.findByRole("alert");+ expect(alert.textContent).toContain("couldn’t be read");+ expect(alert.textContent).toContain("~/Pol Studio/Broken");+ });});diff --git a/src/App.tsx b/src/App.tsxindex 2a5eece..b2385b3 100644--- a/src/App.tsx+++ b/src/App.tsx@@ -38,7 +38,17 @@ function App() {useEffect(() => {void listRecentProjects()- .then(setProjects)+ .then(({ projects: loaded, unreadable }) => {+ // Keep everything that loaded: one unreadable project must not hide the+ // rest. But it must not disappear in silence either — it used to be+ // dropped from this list with no message at all.+ setProjects(loaded);+ if (unreadable.length === 0) return;+ setError({+ title: unreadable.length === 1 ? "This project file couldn’t be read" : `${unreadable.length} project files couldn’t be read`,+ detail: unreadable.map((item) => `${item.folderPath} — ${item.detail}`).join(" · "),+ });+ }).catch((reason: unknown) => setError({ title: "Couldn’t load your projects", detail: describe(reason) })).finally(() => setLoading(false));}, []);diff --git a/src/components/ProjectWorkspace.test.ts b/src/components/ProjectWorkspace.test.tsindex 8e63ea8..072d18b 100644--- a/src/components/ProjectWorkspace.test.ts+++ b/src/components/ProjectWorkspace.test.ts@@ -85,6 +85,53 @@ describe("project workspace timecode", () => {expect(onOpenTimeline).toHaveBeenCalledOnce();});+ it("counts only the references that actually reach the compiled prompt", () => {+ const fresh = createProjectConfig({ name: "Ceramic lamp", prompt: "A quiet product film", aspectRatio: "16:9", resolution: "1080p", targetDurationSeconds: 30 });+ const createdAt = fresh.createdAt;+ const references = [+ { id: "ref-lamp", kind: "text", name: "Lamp silhouette", description: "Matte cream ceramic, tapered neck.", content: "Matte cream ceramic, tapered neck.", intendedUse: ["product"], createdAt },+ // Described, then cleared to be rewritten — compileMiniMaxH3Prompt skips it.+ { id: "ref-blank", kind: "text", name: "Lead character", description: "", content: null, intendedUse: ["character"], createdAt },+ // Audio-only, so isVisualReference skips it too.+ { id: "ref-score", kind: "text", name: "Score idea", description: "Sparse piano.", content: "Sparse piano.", intendedUse: ["audio"], createdAt },+ ];+ const config = parseProjectConfig({ ...fresh, references, generationJobs: [{ ...fresh.generationJobs[0], referenceIds: ["ref-lamp", "ref-blank", "ref-score"] }] });+ render(createElement(GeneratorView, { config, folderPath: "C:\\Ceramic Lamp", onChange: () => undefined, onOpenTimeline: () => undefined, selectedJobId: config.generationJobs[0].id }));+ expect(screen.getByText("1 reference guides this shot")).not.toBeNull();+ expect(screen.queryByText("3 references guide this shot")).toBeNull();+ // Skipped references stay visible, each with its reason.+ expect(screen.getByText("Lead character")).not.toBeNull();+ expect(screen.getByText("Not described yet — not used by this shot")).not.toBeNull();+ expect(screen.getByText(/sound note/)).not.toBeNull();+ });++ it("tells the user the engine only follows the words when every bound reference is skipped", () => {+ const fresh = createProjectConfig({ name: "Ceramic lamp", prompt: "A quiet product film", aspectRatio: "16:9", resolution: "1080p", targetDurationSeconds: 30 });+ const references = [{ id: "ref-blank", kind: "text", name: "Lead character", description: "", content: null, intendedUse: ["character"], createdAt: fresh.createdAt }];+ const config = parseProjectConfig({ ...fresh, references, generationJobs: [{ ...fresh.generationJobs[0], referenceIds: ["ref-blank"] }] });+ render(createElement(GeneratorView, { config, folderPath: "C:\\Ceramic Lamp", onChange: () => undefined, onOpenTimeline: () => undefined, selectedJobId: config.generationJobs[0].id }));+ expect(screen.queryByText("1 reference guides this shot")).toBeNull();+ expect(screen.getByText("No references used by this shot")).not.toBeNull();+ expect(screen.getByText("The video engine only follows the words above.")).not.toBeNull();+ // The claim that a text definition is written into the prompt must not+ // appear when nothing is written into it.+ expect(screen.queryByText(/text definitions are written into this shot/)).toBeNull();+ });++ it("disables Split while the playhead sits outside the selected clip", () => {+ const config = parseProjectConfig(completeFixture);+ const { container } = render(createElement(TimelineView, { config, onChange: () => undefined, onOpenGenerator: () => undefined }));+ const split = () => screen.getByRole("button", { name: "Split" }) as HTMLButtonElement;+ // The playhead starts at the head of the first clip, where splitSelected+ // returns early — so the button must not look live.+ expect(split().disabled).toBe(true);+ expect(split().title).toBe("Move the playhead inside the selected clip to split it");+ // Choosing a scene puts the playhead inside it, which is a real split.+ fireEvent.click(container.querySelector(".scene-card")!);+ expect(split().disabled).toBe(false);+ expect(split().title).toBe("Split at playhead");+ });+it("labels a cancelled preview as cancelled instead of queued", () => {const fresh = createProjectConfig({ name: "Ceramic lamp", prompt: "A quiet product film", aspectRatio: "16:9", resolution: "1080p", targetDurationSeconds: 30 });const config = parseProjectConfig({ ...fresh, generationJobs: [{ ...fresh.generationJobs[0], status: "cancelled", stage: "failed" }] });diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex f7e2cce..426b1f5 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -2,7 +2,7 @@ import { listen } from "@tauri-apps/api/event";import { AlertCircle, Ban, Check, ChevronRight, Clock3, Film, Info, LoaderCircle, Play, RefreshCw, Sparkles, Square, WandSparkles, X } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { isTauri } from "../../lib/persistence";-import { compileMiniMaxH3Prompt, createDraftGenerationJob, isReferenceUsable, projectFilePath, usableImageReferences, type GenerationJob, type ProjectAsset, type ProjectConfig, type TimelineClip, type TimelineTrack } from "../../lib/project";+import { compileMiniMaxH3Prompt, createDraftGenerationJob, isReferenceUsable, isVisualReference, projectFilePath, usableImageReferences, type GenerationJob, type ProjectAsset, type ProjectConfig, type ProjectReference, type TimelineClip, type TimelineTrack } from "../../lib/project";import { cancelVidfabGeneration, enqueueVidfabGeneration, resolveVidfabPlan, type VidfabGenerationRequest, type VidfabStatus } from "../../lib/runtime";interface GeneratorViewProps {@@ -30,6 +30,11 @@ export function GeneratorView({ config, folderPath, runtime = null, onChange, onconst drafts = jobs.filter((job) => job.status === "draft");const completed = jobs.filter((job) => ["ready", "completed", "failed", "cancelled"].includes(job.status));const boundRefs = useMemo(() => config.references.filter((ref) => selected?.referenceIds.includes(ref.id)), [config.references, selected]);+ // Bound is not the same as used. compileMiniMaxH3Prompt drops a reference that+ // isn't described yet, and isVisualReference drops an audio-only one, so a+ // count taken from the IDs alone told the user a definition was steering the+ // shot when the compiled prompt never mentioned it.+ const promptRefs = useMemo(() => boundRefs.filter((ref) => isReferenceUsable(ref) && isVisualReference(ref)), [boundRefs]);const usableReferences = useMemo(() => config.references.filter(isReferenceUsable), [config.references]);const runtimeReady = runtime?.state === "ready";const submitLabel = runtimeReady ? "Generate this shot" : "Save as a draft";@@ -244,15 +249,22 @@ export function GeneratorView({ config, folderPath, runtime = null, onChange, on</dl><div className="job-refs">- <span>{boundRefs.length === 0 ? "No references used by this shot" : boundRefs.length === 1 ? "1 reference guides this shot" : `${boundRefs.length} references guide this shot`}</span>- {boundRefs.length === 0- ? <p className="job-refs__empty">The video engine only follows the words above.</p>- : boundRefs.map((ref, index) => <div key={ref.id}>+ <span>{promptRefs.length === 0 ? "No references used by this shot" : promptRefs.length === 1 ? "1 reference guides this shot" : `${promptRefs.length} references guide this shot`}</span>+ {/* A bound reference the prompt skips is still listed — hiding it+ would leave the user wondering where their reference went. */}+ {boundRefs.map((ref, index) => {+ const skipped = skipReason(ref);+ return <div key={ref.id}><i className={`ref-mini ref-mini--${index}`} /><b>{ref.name}</b>- <small>{ref.intendedUse.join(", ")}</small>- </div>)}- {boundRefs.length > 0 && <p className="job-refs__empty">Images are sent to the video engine as reference assets; text definitions are written into this shot’s prompt.</p>}+ {skipped+ ? <p className="job-refs__reason">{skipped}</p>+ : ref.intendedUse.length > 0 && <small>Your tags: {ref.intendedUse.join(", ")}</small>}+ </div>;+ })}+ {promptRefs.length === 0+ ? <p className="job-refs__empty">The video engine only follows the words above.</p>+ : <p className="job-refs__empty">Images are sent to the video engine as reference assets; text definitions are written into this shot’s prompt. The tags are your own notes and don’t change what is sent.</p>}</div><div className="job-actions">@@ -377,6 +389,15 @@ function QueueGroup({ title, jobs, selectedId, onSelect }: { title: string; jobs</section>;}+/* Why a reference that is bound to this shot never reaches its prompt, or null+ when it does. The wording mirrors the References card so the two screens+ describe the same state in the same words. */+const skipReason = (reference: ProjectReference): string | null => {+ if (!isReferenceUsable(reference)) return "Not described yet — not used by this shot";+ if (!isVisualReference(reference)) return "Tagged as a sound note, so it isn’t sent to the video engine.";+ return null;+};+const STAGES: Array<{ label: string; at: number }> = [{ label: "Prepare", at: 0.01 },{ label: "Render", at: 0.5 },diff --git a/src/components/workspace/ReferencesView.tsx b/src/components/workspace/ReferencesView.tsxindex d6e0758..2de0868 100644--- a/src/components/workspace/ReferencesView.tsx+++ b/src/components/workspace/ReferencesView.tsx@@ -4,7 +4,14 @@ import { useMemo, useState } from "react";import { isReferenceUsable, type ProjectConfig, type ProjectReference } from "../../lib/project";import { isTauri } from "../../lib/persistence";-const uses = ["character", "product", "location", "style", "audio"] as const;+type ReferenceUse = ProjectReference["intendedUse"][number];++/* No "audio" here on purpose: references in this app are visual only. Images are+ the only assets sent to the video engine, and the H3 prompt's two audio fields+ (overall_soundscape, non_diegetic_music) are not reference-driven — so an+ audio tag promised a route that never existed. It stays in the zod enum so+ projects saved with it still load. */+const uses: readonly ReferenceUse[] = ["character", "product", "location", "style"];export function ReferencesView({ config, folderPath, onChange }: { config: ProjectConfig; folderPath: string; onChange: (next: ProjectConfig) => void }) {const [selectedId, setSelectedId] = useState<string | undefined>(config.references[0]?.id);@@ -13,6 +20,10 @@ export function ReferencesView({ config, folderPath, onChange }: { config: Projeconst [definitionDescription, setDefinitionDescription] = useState("");const [importError, setImportError] = useState<string | null>(null);const selected = config.references.find((ref) => ref.id === selectedId);+ // A reference saved before the audio tag was withdrawn still carries it, so+ // keep the chip on that one reference — it can be seen and cleared, never+ // added fresh.+ const useOptions: readonly ReferenceUse[] = selected?.intendedUse.includes("audio") ? [...uses, "audio"] : uses;const jobs = useMemo(() => config.generationJobs.filter((job) => job.referenceIds.includes(selectedId ?? "")), [config.generationJobs, selectedId]);const update = (id: string, patch: Partial<ProjectReference>) => onChange({ ...config, references: config.references.map((ref) => ref.id === id ? { ...ref, ...patch } : ref) });// Starts empty on purpose. Seeding it with the instruction text meant an@@ -52,7 +63,7 @@ export function ReferencesView({ config, folderPath, onChange }: { config: Proje<div><span className="eyebrow">Consistency library</span><h1>References</h1>- <p>Keep the people, places, products, and visual rules for this project in one place. Each new shot uses the first two.</p>+ <p>Keep the people, places, products, and visual rules for this project in one place. Each new shot uses the first two you’ve described.</p></div><div><button className="secondary-button" onClick={() => addTextReference()}><FileText size={16} /> New definition</button>@@ -71,7 +82,7 @@ export function ReferencesView({ config, folderPath, onChange }: { config: Proje</button>)}<button className="reference-add-card" onClick={() => void addImage()}><span><Plus size={22} /></span><b>Add a reference</b><small>Import an image or write a definition</small></button></div>- <div className="reference-explainer"><Sparkles size={18} /><div><b>References guide new shots, not your timeline</b><p>Each new shot uses the first two references in this list. Image files are copied into the project’s <code>references/</code> folder and sent to the video engine; text definitions are written into the shot’s prompt. Newest additions go to the top.</p></div></div>+ <div className="reference-explainer"><Sparkles size={18} /><div><b>References guide new shots, not your timeline</b><p>Each new shot uses the first two references in this list that you’ve described — an empty one is skipped until you write its definition. Image files are copied into the project’s <code>references/</code> folder and sent to the video engine; text definitions are written into the shot’s prompt. Newest additions go to the top.</p></div></div></section><aside className="reference-inspector">@@ -84,12 +95,12 @@ export function ReferencesView({ config, folderPath, onChange }: { config: Proje</div><section className="intended-use"><h3>Intended use</h3>- <p>Note what this reference is for. Select any that apply.</p>- <div>{uses.map((use) => <button key={use} className={selected.intendedUse.includes(use) ? "active" : ""} aria-pressed={selected.intendedUse.includes(use)} onClick={() => update(selected.id, { intendedUse: selected.intendedUse.includes(use) ? selected.intendedUse.filter((item) => item !== use) : [...selected.intendedUse, use] })}>{selected.intendedUse.includes(use) && <Check size={14} />}{use}</button>)}</div>+ <p>These tags are your own notes for keeping the library tidy. They don’t change what is sent to the video engine. Select any that apply.</p>+ <div>{useOptions.map((use) => <button key={use} className={selected.intendedUse.includes(use) ? "active" : ""} aria-pressed={selected.intendedUse.includes(use)} onClick={() => update(selected.id, { intendedUse: selected.intendedUse.includes(use) ? selected.intendedUse.filter((item) => item !== use) : [...selected.intendedUse, use] })}>{selected.intendedUse.includes(use) && <Check size={14} />}{use}</button>)}</div></section><section className="reference-used-by"><h3>Used by <span>{jobs.length}</span></h3>- {jobs.length ? jobs.map((job) => <div key={job.id}><span className={`job-link-dot job-link-dot--${job.status}`} /><div><b>{job.title}</b><small>{job.status} · {job.stage}</small></div><Link2 size={16} /></div>) : <p>No shots use this reference yet. Each new shot picks up the first two in this list, so it will be used once it reaches the top two.</p>}+ {jobs.length ? jobs.map((job) => <div key={job.id}><span className={`job-link-dot job-link-dot--${job.status}`} /><div><b>{job.title}</b><small>{job.status} · {job.stage}</small></div><Link2 size={16} /></div>) : <p>No shots use this reference yet. Each new shot picks up the first two described references in this list, so it will be used once it reaches the top two of those.</p>}</section><section className="portable-path"><BookOpen size={16} /><div><b>Where this lives</b><code>{selected.relativePath ?? "Stored in polstudio.project.json"}</code></div></section></> : <div className="reference-empty"><BookOpen size={26} /><b>Select a reference</b><p>Pick one from the library, or add a new one, to edit its definition and see which generations use it.</p></div>}diff --git a/src/components/workspace/TimelineView.tsx b/src/components/workspace/TimelineView.tsxindex 0b1e019..66ba15a 100644--- a/src/components/workspace/TimelineView.tsx+++ b/src/components/workspace/TimelineView.tsx@@ -82,6 +82,16 @@ export function TimelineView({ config, onChange, onOpenGenerator }: { config: PrupdateTracks(tracks.map((track) => track.id === selected.trackId ? { ...track, clips: track.clips.flatMap((clip) => clip.id === selected.id ? [{ ...clip, durationMs: leftDuration, label: `${clip.label} · A` }, right] : [clip]) } : track));setSelectedId(right.id);};+ /* Mirrors splitSelected's own guard, one condition for one condition. The+ button used to stay live with the playhead outside the clip, so pressing it+ silently did nothing. Null means Split will actually cut. */+ const splitBlockedBy = !selected+ ? "Select a clip to split it"+ : !selectedTrack || selectedTrack.locked+ ? "This clip’s track is locked"+ : playhead <= selected.startMs || playhead >= selected.startMs + selected.durationMs+ ? "Move the playhead inside the selected clip to split it"+ : null;const addScene = () => {// A new project already carries an unstarted draft made from the user's own// words, so open that rather than stacking a near-identical second shot.@@ -158,6 +168,10 @@ export function TimelineView({ config, onChange, onOpenGenerator }: { config: Pr</div><span>{config.settings.resolution.toUpperCase()} · {config.settings.frameRate} fps</span></div>+ {/* Browsers don't reliably fire hover on a disabled control, so the+ title attributes above may never render. The reason the transport+ is dead has to be readable without hovering anything. */}+ {clipCount === 0 && <p className="transport-note">Nothing can be played yet — add or generate a scene and it will land on the timeline below.</p>}</main><aside className="clip-inspector">@@ -199,7 +213,7 @@ export function TimelineView({ config, onChange, onOpenGenerator }: { config: Pr<div><h2>Timeline</h2><span>{timecode(playhead)}</span></div><div className="timeline-tools"><button onClick={addScene} title="Draft a new scene"><Plus size={16} /> Add</button>- <button onClick={splitSelected} disabled={!selected || selectedTrack?.locked} title="Split at playhead"><Scissors size={16} /> Split</button>+ <button onClick={splitSelected} disabled={splitBlockedBy !== null} title={splitBlockedBy ?? "Split at playhead"}><Scissors size={16} /> Split</button><button onClick={duplicateSelected} disabled={!selected || selectedTrack?.locked} title="Duplicate clip"><Copy size={16} /> Duplicate</button><button onClick={removeSelected} disabled={!selected || selectedTrack?.locked} title="Delete selected clip"><Trash2 size={16} /> Delete</button></div>diff --git a/src/lib/persistence.ts b/src/lib/persistence.tsindex 247161e..349f016 100644--- a/src/lib/persistence.ts+++ b/src/lib/persistence.ts@@ -14,6 +14,24 @@ const WEB_PROJECTS_KEY = "polstudio.web-projects.v1";export const isTauri = () => "__TAURI_INTERNALS__" in window;+/** A project the library knows about but could not read back. */+export interface UnreadableProject {+ folderPath: string;+ /** The underlying message, kept verbatim so it stays diagnosable. */+ detail: string;+}++/** Everything the library loaded, plus everything it failed to load. One bad+ * project must never hide the good ones, and it must never vanish silently:+ * the Rust validator is looser than the zod schema here, so a config the+ * backend happily wrote can still fail to parse on the next launch. */+export interface RecentProjects {+ projects: ProjectRecord[];+ unreadable: UnreadableProject[];+}++const describeReason = (reason: unknown) => (reason instanceof Error ? reason.message : String(reason));+function readJson<T>(key: string, fallback: T): T {try {const value = localStorage.getItem(key);@@ -71,42 +89,51 @@ function webSeedProjects(): ProjectRecord[] {});}-function getWebProjects(): ProjectRecord[] {+function getWebProjects(): RecentProjects {const stored = readJson<ProjectRecord[] | null>(WEB_PROJECTS_KEY, null);if (stored) {- return stored.flatMap((record) => {+ const projects: ProjectRecord[] = [];+ const unreadable: UnreadableProject[] = [];+ for (const record of stored) {try {const parsed = parseProjectConfig(record.config);const sampleIndex = /^sample-(\d+)$/.exec(parsed.id);- return [{ ...record, config: sampleIndex ? seedProjectWorkspace(parsed, Number(sampleIndex[1]) - 1) : parsed }];- } catch {- return [];+ projects.push({ ...record, config: sampleIndex ? seedProjectWorkspace(parsed, Number(sampleIndex[1]) - 1) : parsed });+ } catch (reason) {+ unreadable.push({ folderPath: record.folderPath || "(unknown folder)", detail: describeReason(reason) });}- });+ }+ return { projects, unreadable };}const seeded = webSeedProjects();localStorage.setItem(WEB_PROJECTS_KEY, JSON.stringify(seeded));- return seeded;+ return { projects: seeded, unreadable: [] };}-export async function listRecentProjects(): Promise<ProjectRecord[]> {+export async function listRecentProjects(): Promise<RecentProjects> {if (!isTauri()) return getWebProjects();const paths = readJson<string[]>(RECENTS_KEY, []);- const records = await Promise.all(+ const rows = await Promise.all(paths.map(async (folderPath) => {try {const value = await invoke<ProjectRecord>("open_project", { folderPath });- return { ...value, config: parseProjectConfig(value.config) };- } catch {- return null;+ return { ok: true as const, record: { ...value, config: parseProjectConfig(value.config) } };+ } catch (reason) {+ // Swallowing this made the project disappear from the library with no+ // message at all — the worst failure mode in the app. Report it and+ // keep every row that did load.+ return { ok: false as const, failure: { folderPath, detail: describeReason(reason) } };}}),);- return records.filter((record): record is ProjectRecord => record !== null);+ return {+ projects: rows.flatMap((row) => (row.ok ? [row.record] : [])),+ unreadable: rows.flatMap((row) => (row.ok ? [] : [row.failure])),+ };}export async function chooseAndOpenProject(): Promise<ProjectRecord | null> {- if (!isTauri()) return getWebProjects()[0] ?? null;+ if (!isTauri()) return getWebProjects().projects[0] ?? null;const value = await invoke<ProjectRecord | null>("choose_project_folder");if (!value) return null;const record = { ...value, config: parseProjectConfig(value.config) };@@ -134,7 +161,7 @@ export async function createProject(input: CreateProjectInput): Promise<ProjectR}const slug = input.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");const record = { folderPath: `~/Pol Studio/${slug || config.id}`, config };- const projects = [record, ...getWebProjects()];+ const projects = [record, ...getWebProjects().projects];localStorage.setItem(WEB_PROJECTS_KEY, JSON.stringify(projects));return record;}@@ -147,7 +174,7 @@ export async function saveProject(record: ProjectRecord): Promise<ProjectRecord>if (isTauri()) {await invoke("save_project", { folderPath: next.folderPath, config: next.config });} else {- const projects = getWebProjects().filter((project) => project.config.id !== next.config.id);+ const projects = getWebProjects().projects.filter((project) => project.config.id !== next.config.id);localStorage.setItem(WEB_PROJECTS_KEY, JSON.stringify([next, ...projects]));}rememberPath(next.folderPath);diff --git a/src/styles/controls.css b/src/styles/controls.cssindex 984407a..8cff181 100644--- a/src/styles/controls.css+++ b/src/styles/controls.css@@ -314,8 +314,13 @@line-height: var(--leading-snug);}+/* An unreadable project reports the validator's message verbatim, which can run+ long. Bound it here so the toast can never grow past the viewport. */.toast span {grid-column: 1;+ max-height: 40vh;+ overflow-y: auto;+ overflow-wrap: anywhere;color: #c0a4ab;font-size: var(--text-sm);line-height: var(--leading-normal);diff --git a/src/styles/generator.css b/src/styles/generator.cssindex dbbc710..c40557b 100644--- a/src/styles/generator.css+++ b/src/styles/generator.css@@ -860,6 +860,16 @@line-height: var(--leading-snug);}+/* The reason a bound reference is skipped has to read in full — it sits in the+ same slot as the tag line, which truncates to one line. */+.job-refs__reason {+ margin: var(--space-1) 0 0;+ overflow-wrap: anywhere;+ color: var(--text-muted);+ font-size: var(--text-xs);+ line-height: var(--leading-snug);+}+/* --- Actions: the one obvious next step ------------------------------------ */.job-actions {diff --git a/src/styles/timeline.css b/src/styles/timeline.cssindex de773a4..9670621 100644--- a/src/styles/timeline.css+++ b/src/styles/timeline.css@@ -483,6 +483,18 @@font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);}+/* Sits under the transport rather than inside it, so the 1fr/auto/1fr row keeps+ its layout. Disabled buttons swallow hover, so this is the only explanation+ an empty transport reliably shows. */+.transport-note {+ margin: 0;+ padding: 0 var(--space-4) var(--space-3);+ color: var(--text-muted);+ font-size: var(--text-xs);+ line-height: var(--leading-snug);+ background: var(--panel);+}+/* --- Clip inspector -------------------------------------------------------- */.inspector-summary {