AI media harness for planning, generating, and editing locally
TypeScript
Rebuild Generator as command bar, scene groups and shot tiles
Bitti6135d1088a3d
diff --git a/src/components/workspace/DebugPromptDialog.tsx b/src/components/workspace/DebugPromptDialog.tsxindex b912dc5..247d7e5 100644--- a/src/components/workspace/DebugPromptDialog.tsx+++ b/src/components/workspace/DebugPromptDialog.tsx@@ -1,62 +1,38 @@-import { X } from "lucide-react";-import { useEffect, useRef } from "react";-import { createPortal } from "react-dom";+import { useRef } from "react";import type { PromptSegment } from "../../lib/project";+import { ContentDialog } from "../ui";-export function DebugPromptDialog({ sceneTitle, segments, onClose, title = "Debug Prompt", promptLabel = "The compiled MiniMax H3 prompt" }: {+/** The exact prompt the engine is sent, in a ContentDialog. Ctrl+A inside the+ * prompt selects the prompt alone (not the whole window), so it can be+ * copied in one go. */+export function DebugPromptDialog({ sceneTitle, segments, onClose, title = "Debug prompt", promptLabel = "The compiled MiniMax H3 prompt" }: {sceneTitle: string;segments: PromptSegment[];onClose: () => void;title?: string;promptLabel?: string;}) {- const closeButton = useRef<HTMLButtonElement>(null);const prompt = useRef<HTMLPreElement>(null);- useEffect(() => {- const opener = document.activeElement as HTMLElement | null;- closeButton.current?.focus();- return () => { if (opener?.isConnected) opener.focus(); };- }, []);-- useEffect(() => {- const keyDown = (event: KeyboardEvent) => {- if (event.key === "Escape") {- event.preventDefault();- event.stopPropagation();- onClose();- } else if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "a") {+ return <ContentDialog title={title} closeText="Close" onClose={onClose} width={880} className="debug-prompt-dialog" initialFocus={prompt}>+ <p className="debug-prompt-dialog__scene">{sceneTitle}</p>+ {/* Render compiler segments directly to preserve the exact engine prompt. */}+ <pre+ ref={prompt}+ tabIndex={0}+ className="compiled-prompt__text"+ aria-label={promptLabel}+ onKeyDown={(event) => {+ if (!(event.ctrlKey || event.metaKey) || event.key.toLowerCase() !== "a") return;event.preventDefault();- event.stopPropagation();- const element = prompt.current;const selection = window.getSelection();- if (element && selection) {- element.focus();- const range = document.createRange();- range.selectNodeContents(element);- selection.removeAllRanges();- selection.addRange(range);- }- } else if (event.key === "Tab") {- event.preventDefault();- (document.activeElement === closeButton.current ? prompt.current : closeButton.current)?.focus();- }- };- window.addEventListener("keydown", keyDown, true);- return () => window.removeEventListener("keydown", keyDown, true);- }, [onClose]);-- return createPortal(<div className="debug-prompt-backdrop" onMouseDown={(event) => {- if (event.target === event.currentTarget) onClose();- }}>- <section className="debug-prompt-dialog" role="dialog" aria-modal="true" aria-labelledby="debug-prompt-title" aria-describedby="debug-prompt-scene">- <header className="debug-prompt-dialog__header">- <div><h2 id="debug-prompt-title">{title}</h2><p id="debug-prompt-scene">{sceneTitle}</p></div>- <button ref={closeButton} type="button" className="icon-button icon-button--strong" aria-label={`Close ${title.toLowerCase()}`} onClick={onClose}><X size={18} /></button>- </header>- {/* Render compiler segments directly to preserve the exact engine prompt. */}- <pre ref={prompt} tabIndex={0} className="compiled-prompt__text" aria-label={promptLabel}>{segments.map((segment, index) =>- <span key={index} className={`prompt-part prompt-part--${segment.kind}`}>{segment.value}</span>)}</pre>- </section>- </div>, document.body);+ if (!selection) return;+ const range = document.createRange();+ range.selectNodeContents(event.currentTarget);+ selection.removeAllRanges();+ selection.addRange(range);+ }}+ >{segments.map((segment, index) =>+ <span key={index} className={`prompt-part prompt-part--${segment.kind}`}>{segment.value}</span>)}</pre>+ </ContentDialog>;}diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex fe70b64..f29f2b5 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -3,14 +3,17 @@ import { loadLoras, subscribeLoras } from "../../lib/loras";import { refreshDownloadedLoras } from "../../lib/weightDownloads";import { characterReplaceBlocker, poseBlocker, isVideoTransition, videoTransitionBlocker, usableVideoReferences, type SceneType } from "../../lib/project";import { referenceRefmodInputs } from "../../lib/project";-import { ChevronDown, Plus, Square, Trash2, WandSparkles } from "lucide-react";+import { LayoutGrid, List, Plus, Square, Trash2, WandSparkles } from "lucide-react";import { invoke } from "@tauri-apps/api/core";import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";+import { useShortcut } from "../../lib/commands";+import { askNative } from "../../lib/nativeShell";+import { CommandBar, CommandBarButton, CommandBarSeparator, ComboBox, Splitter, StatusBar, tooltipProps, usePaneSize } from "../ui";import { actionReferenceIds, compileGenerationJobPrompt, compileGenerationJobSegments, createDraftGenerationJob, danglingReferenceTokens, GENERATION_FRAME_RATE, RANDOM_GENERATION_SEED, sceneDurationSeconds, sceneFrameInputs, sceneGenerationReferences, sceneGenerationSeed, sceneGenerationSnapshot, sceneGenerationSteps, sceneShots, SCENE_MAX_SECONDS, SCENE_MIN_SECONDS, projectItemPath, usableReferenceImages, type GenerationJob, type ProjectConfig, type ProjectReference, type SceneShot } from "../../lib/project";import { generationDimensions } from "../../lib/export";import { isTauri } from "../../lib/persistence";import { getEngineStatus, type SlopfabGenerationRequest, type SlopfabStatus } from "../../lib/runtime";-import { SceneBoard, type GeneratorSelection } from "./SceneBoard";+import { SceneBoard, type BoardDensity, type GeneratorSelection } from "./SceneBoard";import { SceneInspector, ShotInspector, STEP_SECONDS, writeShots } from "./SceneEditor";import { statusIcon } from "./sceneStatus";import { forgetShotPosters } from "./ShotThumbnail";@@ -33,9 +36,10 @@ interface GeneratorViewProps {onRuntimeChange?: (runtime: SlopfabStatus) => void;}-type RemovalTarget =- | { kind: "scene"; job: GenerationJob }- | { kind: "shot"; job: GenerationJob; shotId: string; shotName: string };+const DENSITY_KEY = "slopus.generator.density";+const readDensity = (): BoardDensity => {+ try { return localStorage.getItem(DENSITY_KEY) === "list" ? "list" : "tiles"; } catch { return "tiles"; }+};/* The Generator is a BOARD and a PANEL.*@@ -67,7 +71,14 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCoOpening the Generator, or arriving from a clip in the timeline, opens theSCENE — the thing that has a state, a prompt and a Generate button. */const [selection, setSelection] = useState<GeneratorSelection>(() => ({ jobId: selectedJobId ?? jobs.find((job) => job.status === "generating")?.id ?? jobs[0]?.id ?? "", shotId: null }));- const [removalTarget, setRemovalTarget] = useState<RemovalTarget | null>(null);+ const [density, setDensity] = useState<BoardDensity>(readDensity);+ const chooseDensity = (next: BoardDensity) => {+ setDensity(next);+ try { localStorage.setItem(DENSITY_KEY, next); } catch { /* storage unavailable */ }+ };+ const inspectorPane = usePaneSize("generator.inspector", 380, { min: 280, max: 640 });+ const root = useRef<HTMLDivElement>(null);+ const titleInput = useRef<HTMLInputElement>(null);const [showDebugPrompt, setShowDebugPrompt] = useState(false);const debugEnabled = useSyncExternalStore(subscribeDebugOptions, loadDebugOptionsEnabled);const [startFrameError, setStartFrameError] = useState<string | null>(null);@@ -387,6 +398,22 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCo}};+ /* Deleting asks first, in a native Windows message box. */+ const confirmRemoveScene = async (job: GenerationJob) => {+ const confirmed = await askNative({ title: "Delete scene", message: `Delete “${job.title}” and all of its shots?`, kind: "warning", okLabel: "Delete", cancelLabel: "Cancel" });+ if (confirmed) removeScene(job);+ };+ const confirmRemoveShot = async (job: GenerationJob, shotId: string) => {+ const shots = sceneShots(job);+ const index = shots.findIndex((shot) => shot.id === shotId);+ if (index < 0 || shots.length <= 1) return;+ const name = shots[index].name ?? `Shot ${index + 1}`;+ const confirmed = await askNative({ title: "Delete shot", message: `Delete “${name}” from “${job.title}”?`, kind: "warning", okLabel: "Delete", cancelLabel: "Cancel" });+ if (!confirmed) return;+ const current = configRef.current.generationJobs.find((candidate) => candidate.id === job.id);+ if (current) removeShot(current, shotId);+ };+const cancelScenes = (scenes: GenerationJob[]) => onCancelGeneration?.(scenes.map((job) => job.id));const generateScene = (job: GenerationJob) => {if (job.status === "queued" || job.status === "generating") void cancelScenes([job]);@@ -428,100 +455,153 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCo.map((job) => job.id));const selectedIndicator = selected && changedJobIds.has(selected.id) ? "changed" : selected?.status;- return <div className={`generator-view ${selected ? "" : "generator-view--empty"}`}>+ /* --- Keyboard ------------------------------------------------------------+ Scoped to the Generator, so the same keys can mean something else on the+ timeline. F2 puts the caret in the open scene's or shot's name; Delete+ asks first, the way the inspector's delete button always has. Undo is the+ project's (bound once by the workspace), not this screen's. */+ const rename = (target: GeneratorSelection) => {+ setSelection(target);+ requestAnimationFrame(() => {+ const field = titleInput.current;+ if (!field) return;+ field.focus();+ field.select();+ });+ };+ useShortcut("F2", () => { if (!selected) return false; rename({ jobId: selected.id, shotId: openShot?.id ?? null }); }, { scope: root, enabled: Boolean(selected) });+ useShortcut("Delete", () => {+ if (!selected) return false;+ if (openShot) {+ if (selectedShots.length <= 1) return false;+ void confirmRemoveShot(selected, openShot.id);+ } else void confirmRemoveScene(selected);+ }, { scope: root, enabled: Boolean(selected) });++ const generateAllTooltip = cancellable.length > 0+ ? `Cancel ${cancellable.length} ${cancellable.length === 1 ? "generation" : "generations"}`+ : !runtimeReady+ ? runtimeError ?? generatorRuntime?.detail ?? "The video generator is not ready."+ : active.length > 0+ ? "Generation is still being saved."+ : batchScenesReady.length === 0+ ? "Every fixed-seed scene is already up to date."+ : `Generate ${batchScenesReady.length} ${batchScenesReady.length === 1 ? "scene" : "scenes"}`;+ const runtimeLabel = runtimeError ? "Video generator unavailable" : runtimeHeadline(generatorRuntime);+ const availableTemplates = templateSettings.templates.filter((template) => !templateNeedsDownload(template));++ return <div ref={root} className={`generator-view ${selected ? "" : "generator-view--empty"}`} style={inspectorPane.style}><main className="generator-main">- <header className="generator-heading">- <div className="generator-heading__title">- <h1>Generator</h1>- <p>{boardSummary(active.length, queued.length, jobs.length)}</p>- </div>- <div className="generator-heading__actions">- {/* One line: the headline already IS the status. */}- <div- className={`generator-runtime generator-runtime--${runtimeError ? "unavailable" : generatorRuntime?.state ?? "checking"}`}- title={runtimeError ?? generatorRuntime?.detail ?? runtimeHeadline(generatorRuntime)}- >- <i role="img" aria-label={runtimeError ? "Video generator unavailable" : runtimeHeadline(generatorRuntime)} />- <span className="generator-runtime__label">Generator:</span>- <GeneratorTemplateCombobox templates={templateSettings.templates.filter((template) => !templateNeedsDownload(template))} selected={selectedTemplate} onChange={chooseGeneratorTemplate} />- {(runtimeError || (generatorRuntime?.state !== "ready" && generatorRuntime?.state !== "modelsMissing")) && <span className="generator-runtime__status" aria-hidden="true">{runtimeError ? "Unavailable" : runtimeHeadline(generatorRuntime)}</span>}- </div>- <button- className={cancellable.length > 0 ? "danger-button generator-heading__cancel" : "primary-button"}- disabled={cancellable.length === 0 && active.length > 0}- title={cancellable.length > 0- ? `Cancel ${cancellable.length} ${cancellable.length === 1 ? "generation" : "generations"}`- : !runtimeReady- ? runtimeError ?? generatorRuntime?.detail ?? "The video generator is not ready."- : active.length > 0- ? "Generation is still being saved."- : batchScenesReady.length === 0- ? "Every fixed-seed scene is already up to date."- : `Generate ${batchScenesReady.length} ${batchScenesReady.length === 1 ? "scene" : "scenes"}`}- onClick={() => cancellable.length > 0 ? void cancelScenes(cancellable) : void generateAll()}- >- {cancellable.length > 0- ? <><Square size={15} aria-hidden="true" /> Cancel All</>- : <><WandSparkles size={16} aria-hidden="true" /> Generate All</>}- </button>- </div>- </header>-- {jobs.length > 0 && <SceneBoard- jobs={jobs}- folderPath={folderPath}- generationCompletionTimes={generationCompletionTimes}- references={config.references}- selection={{ jobId: selected?.id ?? "", shotId: openShot?.id ?? null }}- onSelect={setSelection}- onAddScene={newScene}- onAddShot={addShot}- onDuration={setDuration}- onGenerate={generateScene}- generationBlocker={generationBlocker}- changedJobIds={changedJobIds}- cancellingJobIds={cancellingJobIds}- onMoveScene={moveScene}- onMoveShot={moveShot}- />}-- {jobs.length === 0 && <button- type="button"- className="shot-card shot-card--add scene-card--add"- onClick={newScene}- title="Add an empty scene — you write the shots"+ <CommandBar+ aria-label="Generator"+ className="generator-command"+ end={<>+ <CommandBarButton icon={<LayoutGrid size={16} />} label="Tiles" pressed={density === "tiles"} onClick={() => chooseDensity("tiles")} />+ <CommandBarButton icon={<List size={16} />} label="List" pressed={density === "list"} onClick={() => chooseDensity("list")} />+ </>}>- <Plus size={18} aria-hidden="true" />- <span>Add a scene</span>- </button>}+ {/* The generator the next render uses, with its readiness as a glyph+ beside the name; the words for a state that needs attention are+ in the tooltip and the status bar. */}+ <span className={`generator-runtime generator-runtime--${runtimeError ? "unavailable" : generatorRuntime?.state ?? "checking"}`}>+ <i role="img" aria-label={runtimeLabel} data-tooltip={runtimeError ?? generatorRuntime?.detail ?? runtimeLabel} />+ <ComboBox+ className="generator-template"+ aria-label={`Video generator template: ${selectedTemplate.name}`}+ data-tooltip={selectedTemplate.name}+ value={selectedTemplate.id}+ disabled={availableTemplates.length === 0}+ options={availableTemplates.map((template) => ({ value: template.id, label: template.name }))}+ onChange={chooseGeneratorTemplate}+ />+ </span>+ <CommandBarSeparator />+ {cancellable.length > 0+ ? <CommandBarButton+ className="generator-command__cancel"+ icon={<Square size={14} />}+ label="Cancel all"+ showLabel+ tooltip={generateAllTooltip}+ onClick={() => void cancelScenes(cancellable)}+ />+ : <CommandBarButton+ className="generator-command__generate"+ icon={<WandSparkles size={16} />}+ label="Generate all"+ showLabel+ tooltip={generateAllTooltip}+ disabled={active.length > 0}+ onClick={() => void generateAll()}+ />}+ <CommandBarButton icon={<Plus size={16} />} label="Add scene" showLabel onClick={newScene} />+ </CommandBar>++ <div className="generator-board">+ {jobs.length > 0+ ? <SceneBoard+ jobs={jobs}+ folderPath={folderPath}+ generationCompletionTimes={generationCompletionTimes}+ references={config.references}+ selection={{ jobId: selected?.id ?? "", shotId: openShot?.id ?? null }}+ density={density}+ onSelect={setSelection}+ onAddShot={addShot}+ onDuration={setDuration}+ onGenerate={generateScene}+ generationBlocker={generationBlocker}+ changedJobIds={changedJobIds}+ cancellingJobIds={cancellingJobIds}+ onMoveScene={moveScene}+ onMoveShot={moveShot}+ onRename={rename}+ onRemoveScene={(job) => void confirmRemoveScene(job)}+ onRemoveShot={(job, shotId) => void confirmRemoveShot(job, shotId)}+ />+ : <p className="generator-board__empty">No scenes yet.</p>}+ </div>++ <StatusBar+ aria-label="Generator status"+ className="generator-status"+ end={runtimeError || (generatorRuntime && generatorRuntime.state !== "ready")+ ? <span className="generator-status__runtime">{runtimeError ? "Generator unavailable" : runtimeHeadline(generatorRuntime)}</span>+ : undefined}+ >+ <span role="status">{boardSummary(active.length, queued.length, jobs.length)}</span>+ </StatusBar></main>- {selected && <aside className="generator-panel" aria-label={openShot ? `${openShot.name ?? `Shot ${shotIndex + 1}`} of ${selected.title}` : `Scene: ${selected.title}`}>+ {selected && <Splitter {...inspectorPane.splitterProps} reverse aria-label="Resize inspector" aria-controls="generator-inspector" />}++ {selected && <aside id="generator-inspector" className="generator-panel" aria-label={openShot ? `${openShot.name ?? `Shot ${shotIndex + 1}`} of ${selected.title}` : `Scene: ${selected.title}`}>{openShot? <><header className="panel-head">{/* The way back up: the scene this shot belongs to, which is the- same thing its line on the board opens. */}- <button type="button" className="panel-head__up" onClick={() => setSelection({ jobId: selected.id, shotId: null })}>+ same thing its header on the board opens. */}+ <button type="button" className="panel-head__up" data-tooltip={`Back to ${selected.title}`} onClick={() => setSelection({ jobId: selected.id, shotId: null })}>{selected.title}</button>- <div className="panel-head__shot-title">- <h2><input- className="shot-title__name"- value={openShot.name ?? ""}- placeholder={`Shot ${shotIndex + 1}`}- aria-label={`Rename shot ${shotIndex + 1}`}- title="Rename this shot"- onChange={(event) => patchShot(selected, openShot.id, { name: event.target.value || null })}- /></h2>- {selectedShots.length > 1 && <button- type="button"- className="inspector-remove-button"- aria-label={`Remove shot ${shotIndex + 1}`}- title="Remove this shot"- onClick={() => setRemovalTarget({ kind: "shot", job: selected, shotId: openShot.id, shotName: openShot.name ?? `Shot ${shotIndex + 1}` })}- ><Trash2 size={16} aria-hidden="true" /></button>}- </div>+ <span className="panel-head__sep" aria-hidden="true">›</span>+ <h2 className="panel-head__title"><input+ ref={titleInput}+ className="panel-title__name shot-title__name"+ value={openShot.name ?? ""}+ placeholder={`Shot ${shotIndex + 1}`}+ aria-label={`Rename shot ${shotIndex + 1}`}+ aria-keyshortcuts="F2"+ onChange={(event) => patchShot(selected, openShot.id, { name: event.target.value || null })}+ /></h2>+ {selectedShots.length > 1 && <button+ type="button"+ className="icon-button panel-head__delete"+ aria-label={`Delete shot ${shotIndex + 1}`}+ aria-keyshortcuts="Delete"+ {...tooltipProps("Delete shot", "Delete")}+ onClick={() => void confirmRemoveShot(selected, openShot.id)}+ ><Trash2 size={16} aria-hidden="true" /></button>}</header><div className="panel-scroll"><ShotInspector@@ -540,34 +620,26 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCo</>: <><header className="panel-head">- <div className="panel-head__scene-title">- <div className="job-title">- {selected.status !== "draft" && selectedIndicator && <span className={`status-icon status-icon--${selectedIndicator}`}>{statusIcon(selectedIndicator)}</span>}- <div>- {/* The badge is on the scene's own line on the board, where the- eye compares one scene against the next. A second copy of it- an inch away from the first says nothing new. */}- {/* The title is the one part of a scene Slopus writes for the- user — taken from their first words — so it has to be theirs- to change. Blanking it falls back rather than saving a- nameless scene the schema would reject. */}- <h2><input- className="job-title__name"- value={selected.title}- aria-label={`Rename ${selected.title}`}- title="Rename this scene"- onChange={(event) => updateJob(selected.id, { title: event.target.value || "Untitled scene", updatedAt: new Date().toISOString() })}- /></h2>- </div>- </div>- <button- type="button"- className="inspector-remove-button"- aria-label={`Remove scene ${selected.title}`}- title="Remove this scene"- onClick={() => setRemovalTarget({ kind: "scene", job: selected })}- ><Trash2 size={16} aria-hidden="true" /></button>- </div>+ {selected.status !== "draft" && selectedIndicator && <span className={`status-icon status-icon--${selectedIndicator}`}>{statusIcon(selectedIndicator)}</span>}+ {/* The title is the one part of a scene Slopus writes for the+ user, so it has to be theirs to change. Blanking it falls back+ rather than saving a nameless scene the schema would reject. */}+ <h2 className="panel-head__title"><input+ ref={titleInput}+ className="panel-title__name job-title__name"+ value={selected.title}+ aria-label={`Rename ${selected.title}`}+ aria-keyshortcuts="F2"+ onChange={(event) => updateJob(selected.id, { title: event.target.value || "Untitled scene", updatedAt: new Date().toISOString() })}+ /></h2>+ <button+ type="button"+ className="icon-button panel-head__delete"+ aria-label={`Delete scene ${selected.title}`}+ aria-keyshortcuts="Delete"+ {...tooltipProps("Delete scene", "Delete")}+ onClick={() => void confirmRemoveScene(selected)}+ ><Trash2 size={16} aria-hidden="true" /></button></header><div className="panel-scroll">@@ -597,7 +669,7 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCoaria-expanded={showDebugPrompt}aria-haspopup="dialog"onClick={() => setShowDebugPrompt(true)}- >Debug Prompt</button>+ >Debug prompt</button></div>}</>}</aside>}@@ -607,23 +679,6 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCosegments={compileGenerationJobSegments(frameInputs?.job ?? selected, boundRefs, config.settings.defaultLook)}onClose={() => setShowDebugPrompt(false)}/>}-- {removalTarget && <div className="remove-dialog-backdrop">- <div className="remove-dialog" role="alertdialog" aria-modal="true" aria-labelledby="remove-dialog-title">- <h2 id="remove-dialog-title">Remove {removalTarget.kind}?</h2>- <p>{removalTarget.kind === "scene"- ? `Remove “${removalTarget.job.title}” and all of its shots?`- : `Remove “${removalTarget.shotName}” from “${removalTarget.job.title}”?`}</p>- <div>- <button type="button" className="secondary-button" onClick={() => setRemovalTarget(null)}>Cancel</button>- <button type="button" className="danger-button" onClick={() => {- if (removalTarget.kind === "scene") removeScene(removalTarget.job);- else removeShot(removalTarget.job, removalTarget.shotId);- setRemovalTarget(null);- }}>Remove {removalTarget.kind}</button>- </div>- </div>- </div>}</div>;}@@ -672,15 +727,17 @@ export function templateSceneBlocker(type: SceneType, template: GeneratorTemplatreturn null;}+/** The status bar's one line: "3 scenes · 1 rendering · 2 waiting". */const boardSummary = (active: number, waiting: number, total: number) => {- if (total === 0) return "Nothing here yet";- if (active > 0) return `${active} rendering · ${waiting} waiting`;- if (waiting > 0) return `${waiting} waiting to render`;- return total === 1 ? "1 scene" : `${total} scenes`;+ if (total === 0) return "No scenes";+ const parts = [total === 1 ? "1 scene" : `${total} scenes`];+ if (active > 0) parts.push(`${active} rendering`);+ if (waiting > 0) parts.push(`${waiting} waiting`);+ return parts.join(" · ");};const runtimeHeadline = (runtime: SlopfabStatus | null) => {- if (!runtime) return "Checking for the video engine…";+ if (!runtime) return "Checking video engine…";switch (runtime.state) {case "ready": return "Video generator ready";case "demo": return "Preview mode";@@ -689,111 +746,3 @@ const runtimeHeadline = (runtime: SlopfabStatus | null) => {case "incompatible": return "Video engine doesn’t match";}};--function GeneratorTemplateCombobox({ templates, selected, onChange }: {- templates: GeneratorTemplate[];- selected: GeneratorTemplate;- onChange: (id: string) => void;-}) {- const [open, setOpen] = useState(false);- const [scrollDistance, setScrollDistance] = useState(0);- const rootRef = useRef<HTMLDivElement>(null);- const triggerRef = useRef<HTMLButtonElement>(null);- const valueRef = useRef<HTMLSpanElement>(null);- const optionRefs = useRef<Array<HTMLButtonElement | null>>([]);-- useEffect(() => {- const measure = () => {- const value = valueRef.current;- setScrollDistance(value ? Math.max(0, value.scrollWidth - value.clientWidth) : 0);- };- measure();- window.addEventListener("resize", measure);- return () => window.removeEventListener("resize", measure);- }, [selected.id, selected.name]);-- useEffect(() => {- if (!open) return;- const close = (event: PointerEvent) => {- if (!rootRef.current?.contains(event.target as Node)) setOpen(false);- };- document.addEventListener("pointerdown", close);- optionRefs.current[templates.findIndex((template) => template.id === selected.id)]?.focus();- return () => document.removeEventListener("pointerdown", close);- }, [open, selected.id, templates]);-- const closeAndFocus = () => {- setOpen(false);- triggerRef.current?.focus();- };-- const pick = (id: string) => {- onChange(id);- closeAndFocus();- };-- const moveOptionFocus = (index: number, direction: number) => {- const next = (index + direction + templates.length) % templates.length;- optionRefs.current[next]?.focus();- };-- return <div className={`generator-runtime__select${open ? " generator-runtime__select--open" : ""}`} ref={rootRef}>- <button- ref={triggerRef}- type="button"- className="generator-runtime__trigger"- role="combobox"- disabled={templates.length === 0}- aria-label={`Video generator template: ${selected.name}`}- aria-expanded={open}- aria-haspopup="listbox"- aria-controls="generator-template-options"- onClick={() => setOpen((value) => !value)}- onKeyDown={(event) => {- if (event.key === "ArrowDown" || event.key === "ArrowUp") {- event.preventDefault();- setOpen(true);- } else if (event.key === "Escape" && open) {- event.preventDefault();- setOpen(false);- }- }}- >- <span- ref={valueRef}- className={`generator-runtime__value${scrollDistance > 0 ? " generator-runtime__value--overflow" : ""}`}- style={{ "--template-scroll-distance": `-${scrollDistance}px` } as React.CSSProperties}- title={selected.name}- ><span>{selected.name}</span></span>- <ChevronDown size={15} aria-hidden="true" />- </button>- {open && <div className="generator-runtime__options" id="generator-template-options" role="listbox" aria-label="Generator templates">- {templates.map((template, index) => <button- ref={(element) => { optionRefs.current[index] = element; }}- type="button"- role="option"- aria-selected={template.id === selected.id}- title={template.name}- key={template.id}- onClick={() => pick(template.id)}- onKeyDown={(event) => {- if (event.key === "ArrowDown") {- event.preventDefault();- moveOptionFocus(index, 1);- } else if (event.key === "ArrowUp") {- event.preventDefault();- moveOptionFocus(index, -1);- } else if (event.key === "Home" || event.key === "End") {- event.preventDefault();- optionRefs.current[event.key === "Home" ? 0 : templates.length - 1]?.focus();- } else if (event.key === "Escape") {- event.preventDefault();- closeAndFocus();- } else if (event.key === "Tab") {- setOpen(false);- }- }}- ><span>{template.name}</span>{template.id === selected.id && <i aria-hidden="true" />}</button>)}- </div>}- </div>;-}diff --git a/src/components/workspace/SceneBoard.tsx b/src/components/workspace/SceneBoard.tsxindex 2d71747..eed81b4 100644--- a/src/components/workspace/SceneBoard.tsx+++ b/src/components/workspace/SceneBoard.tsx@@ -1,4 +1,5 @@-import { GripVertical, Plus, Square, WandSparkles } from "lucide-react";+import { ArrowDown, ArrowUp, ChevronDown, ChevronRight, ExternalLink, FolderInput, GripVertical, Pencil, Plus, Square, Trash2, WandSparkles } from "lucide-react";+import { useState, type DragEvent, type KeyboardEvent, type ReactNode } from "react";import {SCENE_MAX_SECONDS,SCENE_MIN_SECONDS,@@ -10,6 +11,7 @@ import {type SceneShot,} from "../../lib/project";import { selectedShotTagOptions } from "../../lib/shot-tags";+import { useContextMenu, type MenuEntry } from "../ui";import { referenceOrder, STEP_SECONDS } from "./SceneEditor";import { statusIcon, STATUS_BADGE } from "./sceneStatus";import { ShotThumbnail } from "./ShotThumbnail";@@ -19,6 +21,9 @@ export interface GeneratorSelection {shotId: string | null;}+/** "tiles" shows each shot's frame; "list" is one dense row per shot. */+export type BoardDensity = "tiles" | "list";+export const SCENE_DRAG_TYPE = "application/x-slopus-scene";export const SHOT_DRAG_TYPE = "application/x-slopus-shot";@@ -41,16 +46,28 @@ const readShotDrag = (value: string): ShotDragData | null => {}};-/** The Generator board. Scene headers own scene-wide actions and timing; shot- * cards remain the entry point to a shot's editor and double as drop targets. */+type Dragging = { kind: "scene"; jobId: string } | { kind: "shot"; jobId: string; shotId: string };+/** Where a drop would land: a scene goes before `beforeJobId` (null = the end);+ * a shot goes into `jobId` before `beforeShotId` (null = after the last). */+type DropTarget = { kind: "scene"; beforeJobId: string | null } | { kind: "shot"; jobId: string; beforeShotId: string | null };++/** Shift+F10 and the Menu key open the same menu a right-click does. Handled+ * on keydown (and prevented) so WebView2 does not also raise contextmenu. */+export const isMenuKey = (event: KeyboardEvent): boolean =>+ event.key === "ContextMenu" || (event.shiftKey && event.key === "F10");++/** The Generator board: every scene as a 32px group header with its shots in+ * a tile grid underneath. Headers own the scene-wide actions and timing; a+ * tile opens its shot in the inspector. Both are drag sources and drop+ * targets, and both carry a right-click menu. */export function SceneBoard({jobs,folderPath,generationCompletionTimes,references,selection,+ density = "tiles",onSelect,- onAddScene,onAddShot,onDuration,onGenerate,@@ -59,14 +76,17 @@ export function SceneBoard({cancellingJobIds,onMoveScene,onMoveShot,+ onRename,+ onRemoveScene,+ onRemoveShot,}: {jobs: GenerationJob[];folderPath: string;generationCompletionTimes?: Readonly<Record<string, number>>;references: ProjectReference[];selection: GeneratorSelection;+ density?: BoardDensity;onSelect: (selection: GeneratorSelection) => void;- onAddScene: () => void;onAddShot: (job: GenerationJob) => void;onDuration: (job: GenerationJob, value: number) => void;onGenerate: (job: GenerationJob) => void;@@ -75,35 +95,198 @@ export function SceneBoard({cancellingJobIds: ReadonlySet<string>;onMoveScene: (jobId: string, beforeJobId: string | null) => void;onMoveShot: (sourceJobId: string, shotId: string, targetJobId: string, beforeShotId: string | null) => void;+ /** Select this scene or shot and put the caret in its name. */+ onRename?: (selection: GeneratorSelection) => void;+ onRemoveScene?: (job: GenerationJob) => void;+ onRemoveShot?: (job: GenerationJob, shotId: string) => void;}) {- return <div className="scene-board">+ const [collapsed, setCollapsed] = useState<ReadonlySet<string>>(new Set());+ const [dragging, setDragging] = useState<Dragging | null>(null);+ const [dropTarget, setDropTarget] = useState<DropTarget | null>(null);+ const menu = useContextMenu();+ const named = new Map(references.map((reference) => [reference.id, reference.name]));++ const endDrag = () => { setDragging(null); setDropTarget(null); };+ const toggle = (jobId: string) => setCollapsed((current) => {+ const next = new Set(current);+ if (next.has(jobId)) next.delete(jobId); else next.add(jobId);+ return next;+ });++ /** A scene dropped straight back where it came from changes nothing, so the+ * cursor says so instead of promising a move. */+ const sceneDropUseful = (draggedId: string, beforeJobId: string | null) => {+ const from = jobs.findIndex((job) => job.id === draggedId);+ const to = beforeJobId === null ? jobs.length : jobs.findIndex((job) => job.id === beforeJobId);+ return from >= 0 && to >= 0 && to !== from && to !== from + 1;+ };++ /** A shot can move anywhere except out of a scene it is the only shot of. */+ const shotDropAllowed = (targetJobId: string): boolean => {+ if (dragging?.kind !== "shot" || dragging.jobId === targetJobId) return true;+ const source = jobs.find((job) => job.id === dragging.jobId);+ return !source || sceneShots(source).length > 1;+ };++ const sceneMenu = (job: GenerationJob, jobIndex: number): MenuEntry[] => {+ const cancellable = job.status === "queued" || job.status === "generating";+ const blocker = generationBlocker(job);+ return [+ cancellable+ ? { id: "cancel", label: "Cancel generation", icon: <Square size={16} />, onSelect: () => onGenerate(job) }+ : { id: "generate", label: "Generate", icon: <WandSparkles size={16} />, disabled: Boolean(blocker), onSelect: () => onGenerate(job) },+ { id: "rename", label: "Rename", icon: <Pencil size={16} />, shortcut: "F2", disabled: !onRename, onSelect: () => onRename?.({ jobId: job.id, shotId: null }) },+ { id: "add-shot", label: "Add shot", icon: <Plus size={16} />, onSelect: () => onAddShot(job) },+ { separator: true },+ { id: "up", label: "Move up", icon: <ArrowUp size={16} />, disabled: jobIndex === 0, onSelect: () => onMoveScene(job.id, jobs[jobIndex - 1]?.id ?? null) },+ { id: "down", label: "Move down", icon: <ArrowDown size={16} />, disabled: jobIndex === jobs.length - 1, onSelect: () => onMoveScene(job.id, jobs[jobIndex + 2]?.id ?? null) },+ { separator: true },+ { id: "delete", label: "Delete", icon: <Trash2 size={16} />, shortcut: "Delete", danger: true, disabled: !onRemoveScene, onSelect: () => onRemoveScene?.(job) },+ ];+ };++ const shotMenu = (job: GenerationJob, shot: SceneShot): MenuEntry[] => {+ const alone = sceneShots(job).length <= 1;+ const others = jobs.filter((candidate) => candidate.id !== job.id);+ return [+ { id: "open", label: "Open", icon: <ExternalLink size={16} />, onSelect: () => onSelect({ jobId: job.id, shotId: shot.id }) },+ { id: "rename", label: "Rename", icon: <Pencil size={16} />, shortcut: "F2", disabled: !onRename, onSelect: () => onRename?.({ jobId: job.id, shotId: shot.id }) },+ ...(others.length ? [{ separator: true } as const] : []),+ ...others.map((target): MenuEntry => ({+ id: `move-${target.id}`,+ label: `Move to ${target.title}`,+ icon: <FolderInput size={16} />,+ disabled: alone,+ onSelect: () => onMoveShot(job.id, shot.id, target.id, null),+ })),+ { separator: true },+ { id: "delete", label: "Delete", icon: <Trash2 size={16} />, shortcut: "Delete", danger: true, disabled: alone || !onRemoveShot, onSelect: () => onRemoveShot?.(job, shot.id) },+ ];+ };++ /* Arrow keys move between the tiles of one scene (one Tab stop per grid,+ the roving tabindex a Windows grid view uses). Up and Down pick the tile+ in the next row whose centre is nearest, so it follows the wrap. */+ const gridKeys = (event: KeyboardEvent<HTMLOListElement>, job: GenerationJob) => {+ const keys = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"];+ if (!keys.includes(event.key) || event.altKey || event.ctrlKey) return;+ const buttons = [...event.currentTarget.querySelectorAll<HTMLButtonElement>(".shot-card__open-control")];+ const at = buttons.indexOf(event.target as HTMLButtonElement);+ if (at < 0) return;+ let next = at;+ if (event.key === "Home") next = 0;+ else if (event.key === "End") next = buttons.length - 1;+ else if (event.key === "ArrowLeft") next = Math.max(0, at - 1);+ else if (event.key === "ArrowRight") next = Math.min(buttons.length - 1, at + 1);+ else {+ const rect = (element: Element) => element.closest(".shot-card")!.getBoundingClientRect();+ const here = rect(buttons[at]);+ const down = event.key === "ArrowDown";+ const row = buttons+ .map((button, index) => ({ index, box: rect(button) }))+ .filter(({ box }) => (down ? box.top > here.top + 1 : box.top < here.top - 1));+ if (row.length) {+ const edge = down ? Math.min(...row.map(({ box }) => box.top)) : Math.max(...row.map(({ box }) => box.top));+ const centre = here.left + here.width / 2;+ next = row.filter(({ box }) => box.top === edge)+ .reduce((best, candidate) => Math.abs(candidate.box.left + candidate.box.width / 2 - centre) < Math.abs(best.box.left + best.box.width / 2 - centre) ? candidate : best).index;+ } else {+ // No layout (a single row, or no geometry at all): behave like a list.+ next = down ? Math.min(buttons.length - 1, at + 1) : Math.max(0, at - 1);+ }+ }+ event.preventDefault();+ if (next === at) return;+ buttons[next].focus();+ const shot = sceneShots(job)[next];+ if (shot) onSelect({ jobId: job.id, shotId: shot.id });+ };++ return <div className={`scene-board scene-board--${density}`}>{jobs.map((job, jobIndex) => {const shots = sceneShots(job);const duration = sceneDurationSeconds(job);const order = referenceOrder(job, shots, references);- const named = new Map(references.map((reference) => [reference.id, reference.name]));const sceneOpen = selection.jobId === job.id && selection.shotId === null;const cancellable = job.status === "queued" || job.status === "generating";const blocker = generationBlocker(job);const indicator = changedJobIds.has(job.id) ? "changed" : job.status;+ const isCollapsed = collapsed.has(job.id);+ const rovingShot = shots.find((shot) => selection.jobId === job.id && shot.id === selection.shotId)?.id ?? shots[0]?.id;+ const sceneDrop = dropTarget?.kind === "scene" ? dropTarget.beforeJobId : undefined;+ const shotDrop = dropTarget?.kind === "shot" && dropTarget.jobId === job.id ? dropTarget : null;- const dropScene = (event: React.DragEvent<HTMLElement>) => {+ const sceneBeforeFromEvent = (event: DragEvent<HTMLElement>): string | null => {+ const box = event.currentTarget.getBoundingClientRect();+ const after = box.height > 0 && event.clientY > box.top + box.height / 2;+ return after ? jobs[jobIndex + 1]?.id ?? null : job.id;+ };++ const dropScene = (event: DragEvent<HTMLElement>) => {if (!hasDragType(event.dataTransfer.types, SCENE_DRAG_TYPE)) return;event.preventDefault();event.stopPropagation();- const draggedId = event.dataTransfer.getData(SCENE_DRAG_TYPE);+ const draggedId = event.dataTransfer.getData(SCENE_DRAG_TYPE) || (dragging?.kind === "scene" ? dragging.jobId : "");+ endDrag();if (!draggedId) return;- const box = event.currentTarget.getBoundingClientRect();- const after = box.height > 0 && event.clientY > box.top + box.height / 2;- onMoveScene(draggedId, after ? jobs[jobIndex + 1]?.id ?? null : job.id);+ onMoveScene(draggedId, sceneBeforeFromEvent(event));+ };++ const dropShot = (event: DragEvent<HTMLElement>, beforeShotId: string | null) => {+ if (!hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) return;+ event.preventDefault();+ event.stopPropagation();+ const dragged = readShotDrag(event.dataTransfer.getData(SHOT_DRAG_TYPE))+ ?? (dragging?.kind === "shot" ? { jobId: dragging.jobId, shotId: dragging.shotId } : null);+ endDrag();+ if (dragged) onMoveShot(dragged.jobId, dragged.shotId, job.id, beforeShotId);+ };++ const overShots = (event: DragEvent<HTMLElement>, beforeShotId: string | null) => {+ if (!hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) return;+ event.stopPropagation();+ if (!shotDropAllowed(job.id)) {+ event.dataTransfer.dropEffect = "none";+ setDropTarget(null);+ return;+ }+ event.preventDefault();+ event.dataTransfer.dropEffect = "move";+ if (shotDrop?.beforeShotId !== beforeShotId || !shotDrop) setDropTarget({ kind: "shot", jobId: job.id, beforeShotId });+ };++ const openSceneMenu = (source: Parameters<typeof menu.open>[0]) => {+ onSelect({ jobId: job.id, shotId: null });+ menu.open(source, sceneMenu(job, jobIndex), { "aria-label": `${job.title} actions` });};return <sectionkey={job.id}- className={`scene-section ${selection.jobId === job.id ? "scene-section--current" : ""}`}+ className={[+ "scene-section",+ selection.jobId === job.id ? "scene-section--current" : "",+ dragging?.kind === "scene" && dragging.jobId === job.id ? "scene-section--dragging" : "",+ sceneDrop === job.id ? "scene-section--drop-before" : "",+ sceneDrop === null && jobIndex === jobs.length - 1 ? "scene-section--drop-after" : "",+ ].filter(Boolean).join(" ")}aria-label={job.title}onDragOver={(event) => {- if (hasDragType(event.dataTransfer.types, SCENE_DRAG_TYPE)) event.preventDefault();+ if (!hasDragType(event.dataTransfer.types, SCENE_DRAG_TYPE)) return;+ const before = sceneBeforeFromEvent(event);+ const draggedId = dragging?.kind === "scene" ? dragging.jobId : null;+ if (draggedId && !sceneDropUseful(draggedId, before)) {+ event.dataTransfer.dropEffect = "none";+ setDropTarget(null);+ return;+ }+ event.preventDefault();+ event.dataTransfer.dropEffect = "move";+ if (sceneDrop !== before) setDropTarget({ kind: "scene", beforeJobId: before });+ }}+ onDragLeave={(event) => {+ if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) {+ if (dropTarget?.kind === "scene" || shotDrop) setDropTarget(null);+ }}}onDrop={dropScene}>@@ -114,18 +297,36 @@ export function SceneBoard({if (target instanceof Element && target.closest("button, input, label, [role='button']")) return;onSelect({ jobId: job.id, shotId: null });}}+ onContextMenu={(event) => {+ if ((event.target as HTMLElement).closest("input")) return;+ openSceneMenu(event);+ }}>+ <button+ type="button"+ className="scene-rule__toggle"+ aria-expanded={!isCollapsed}+ aria-label={`${isCollapsed ? "Expand" : "Collapse"} ${job.title}`}+ onClick={() => toggle(job.id)}+ >{isCollapsed ? <ChevronRight size={16} aria-hidden="true" /> : <ChevronDown size={16} aria-hidden="true" />}</button>+<spanclassName="scene-rule__drag"role="button"tabIndex={0}draggablearia-label={`Drag ${job.title} to reorder scenes`}- title="Drag to reorder this scene"+ aria-keyshortcuts="ArrowUp ArrowDown"+ data-tooltip="Drag to reorder"+ data-tooltip-shortcut="Up, Down"onDragStart={(event) => {event.dataTransfer.setData(SCENE_DRAG_TYPE, job.id);event.dataTransfer.effectAllowed = "move";+ const header = event.currentTarget.closest(".scene-rule");+ if (header && typeof event.dataTransfer.setDragImage === "function") event.dataTransfer.setDragImage(header, 16, 16);+ setDragging({ kind: "scene", jobId: job.id });}}+ onDragEnd={endDrag}onKeyDown={(event) => {if (event.key === "ArrowUp" && jobIndex > 0) {event.preventDefault();@@ -133,26 +334,31 @@ export function SceneBoard({} else if (event.key === "ArrowDown" && jobIndex < jobs.length - 1) {event.preventDefault();onMoveScene(job.id, jobs[jobIndex + 2]?.id ?? null);+ } else if (isMenuKey(event)) {+ event.preventDefault();+ openSceneMenu(event);}}}- ><GripVertical size={17} aria-hidden="true" /></span>+ ><GripVertical size={16} aria-hidden="true" /></span><buttontype="button"className="scene-rule__summary"aria-label={`Select scene ${job.title}`}aria-pressed={sceneOpen}- onClick={() => onSelect({ jobId: job.id, shotId: null })}+ onKeyDown={(event) => {+ if (!isMenuKey(event)) return;+ event.preventDefault();+ openSceneMenu(event);+ }}>- {job.status !== "draft" && <span className={`scene-rule__status scene-rule__status--${indicator}`}>{statusIcon(indicator, 15)}</span>}- <span className="scene-rule__text">- <b>{job.title}</b>- </span>+ {job.status !== "draft" && <span className={`scene-rule__status scene-rule__status--${indicator}`}>{statusIcon(indicator, 16)}</span>}+ <b className="scene-rule__title" data-tooltip={job.title}>{job.title}</b>+ <span className="scene-rule__caption">{shots.length === 1 ? "1 shot" : `${shots.length} shots`} · {seconds(duration)}</span>{job.status !== "draft" && indicator !== "generating" && <span className="scene-rule__badge">{STATUS_BADGE[indicator]}</span>}</button>- <label className="scene-rule__length">- <span>Length</span>+ <label className="scene-rule__length" data-tooltip="Scene length"><inputtype="range"min={SCENE_MIN_SECONDS}@@ -162,97 +368,108 @@ export function SceneBoard({aria-label={`${job.title} length in seconds`}onChange={(event) => onDuration(job, Number(event.target.value))}/>- <b>{seconds(duration)}</b></label>- <button- type="button"- className={`${cancellable ? "danger-button" : "fill-button"} scene-rule__generate`}+ <HeaderButton label={`Add a shot to ${job.title}`} tooltip="Add shot" onClick={() => onAddShot(job)}><Plus size={16} /></HeaderButton>+ <HeaderButton+ label={cancellable ? "Cancel" : "Generate"}+ tooltip={cancellable ? `Cancel ${job.title}` : blocker ?? `Generate ${job.title}`}+ className={cancellable ? "scene-rule__cancel" : "scene-rule__generate"}disabled={!cancellable && Boolean(blocker)}- title={cancellable ? `Cancel ${job.title}` : blocker ?? `Generate ${job.title}`}onClick={() => onGenerate(job)}- >{cancellable- ? <><Square size={14} aria-hidden="true" /> Cancel</>- : <><WandSparkles size={15} aria-hidden="true" /> Generate</>}</button>+ >{cancellable ? <Square size={14} /> : <WandSparkles size={16} />}</HeaderButton></header>- <ol className="shot-grid">- {shots.map((shot, index) => <li- key={shot.id}- onDragOver={(event) => {- if (hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) {- event.preventDefault();- event.stopPropagation();- }- }}- onDrop={(event) => {- if (!hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) return;- event.preventDefault();- event.stopPropagation();- const dragged = readShotDrag(event.dataTransfer.getData(SHOT_DRAG_TYPE));- if (dragged) onMoveShot(dragged.jobId, dragged.shotId, job.id, shot.id);- }}- >- <ShotCard- job={job}- shot={shot}- index={index}- endsAt={index + 1 < shots.length ? shots[index + 1].startSeconds : duration}- folderPath={folderPath}- estimatedCompletionAt={generationCompletionTimes?.[job.id] ?? null}- order={order}- named={named}- cancelling={cancellingJobIds.has(job.id) && cancellable}- open={selection.jobId === job.id && selection.shotId === shot.id}- draggable- onOpen={() => onSelect({ jobId: job.id, shotId: shot.id })}- onDragStart={(event) => {- event.dataTransfer.setData(SHOT_DRAG_TYPE, JSON.stringify({ jobId: job.id, shotId: shot.id }));- event.dataTransfer.effectAllowed = "move";+ {!isCollapsed && <ol+ className={`shot-grid${shotDrop?.beforeShotId === null ? " shot-grid--drop-end" : ""}`}+ aria-label={`Shots in ${job.title}`}+ onKeyDown={(event) => gridKeys(event, job)}+ onDragOver={(event) => overShots(event, null)}+ onDrop={(event) => dropShot(event, null)}+ >+ {shots.map((shot, index) => {+ const isSource = dragging?.kind === "shot" && dragging.shotId === shot.id;+ return <li+ key={shot.id}+ className={[+ "shot-slot",+ shotDrop?.beforeShotId === shot.id ? "shot-slot--drop-before" : "",+ shotDrop?.beforeShotId === null && index === shots.length - 1 ? "shot-slot--drop-after" : "",+ ].filter(Boolean).join(" ")}+ onDragOver={(event) => {+ const box = event.currentTarget.getBoundingClientRect();+ const after = density === "list"+ ? box.height > 0 && event.clientY > box.top + box.height / 2+ : box.width > 0 && event.clientX > box.left + box.width / 2;+ overShots(event, after ? shots[index + 1]?.id ?? null : shot.id);+ }}+ onDrop={(event) => {+ const box = event.currentTarget.getBoundingClientRect();+ const after = density === "list"+ ? box.height > 0 && event.clientY > box.top + box.height / 2+ : box.width > 0 && event.clientX > box.left + box.width / 2;+ dropShot(event, after ? shots[index + 1]?.id ?? null : shot.id);}}- />- </li>)}- <li- onDragOver={(event) => {- if (hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) {- event.preventDefault();- event.stopPropagation();- }- }}- onDrop={(event) => {- if (!hasDragType(event.dataTransfer.types, SHOT_DRAG_TYPE)) return;- event.preventDefault();- event.stopPropagation();- const dragged = readShotDrag(event.dataTransfer.getData(SHOT_DRAG_TYPE));- if (dragged) onMoveShot(dragged.jobId, dragged.shotId, job.id, null);- }}- >- <button- type="button"- className="shot-card shot-card--add"- aria-label={`Add a shot to ${job.title}`}- onClick={() => onAddShot(job)}>- <Plus size={18} aria-hidden="true" />- <span>Add a shot</span>- </button>- </li>- </ol>+ <ShotCard+ job={job}+ shot={shot}+ index={index}+ endsAt={index + 1 < shots.length ? shots[index + 1].startSeconds : duration}+ folderPath={folderPath}+ estimatedCompletionAt={generationCompletionTimes?.[job.id] ?? null}+ order={order}+ named={named}+ density={density}+ cancelling={cancellingJobIds.has(job.id) && cancellable}+ open={selection.jobId === job.id && selection.shotId === shot.id}+ dragSource={isSource}+ tabbable={shot.id === rovingShot}+ onOpen={() => onSelect({ jobId: job.id, shotId: shot.id })}+ onMenu={(source) => {+ onSelect({ jobId: job.id, shotId: shot.id });+ menu.open(source, shotMenu(job, shot), { "aria-label": `${shot.name ?? `Shot ${index + 1}`} actions` });+ }}+ onDragStart={(event) => {+ event.dataTransfer.setData(SHOT_DRAG_TYPE, JSON.stringify({ jobId: job.id, shotId: shot.id }));+ event.dataTransfer.effectAllowed = "move";+ // The frame, not the whole tile, follows the pointer.+ const thumb = event.currentTarget.querySelector<HTMLElement>(".shot-thumb");+ if (thumb && typeof event.dataTransfer.setDragImage === "function") {+ event.dataTransfer.setDragImage(thumb, thumb.offsetWidth / 2, thumb.offsetHeight / 2);+ }+ setDragging({ kind: "shot", jobId: job.id, shotId: shot.id });+ }}+ onDragEnd={endDrag}+ />+ </li>;+ })}+ </ol>}</section>;})}- <button- type="button"- className="shot-card shot-card--add scene-card--add"- onClick={onAddScene}- title="Add an empty scene — you write the shots"- >- <Plus size={18} aria-hidden="true" />- <span>Add a scene</span>- </button>+ {menu.element}</div>;}-function ShotCard({ job, shot, index, endsAt, folderPath, estimatedCompletionAt, order, named, cancelling, open, draggable, onOpen, onDragStart }: {+function HeaderButton({ label, tooltip, className = "", disabled, onClick, children }: {+ label: string;+ tooltip: string;+ className?: string;+ disabled?: boolean;+ onClick: () => void;+ children: ReactNode;+}) {+ return <button+ type="button"+ className={`scene-rule__action ${className}`.trim()}+ aria-label={label}+ data-tooltip={tooltip}+ disabled={disabled}+ onClick={onClick}+ ><span aria-hidden="true">{children}</span></button>;+}++function ShotCard({ job, shot, index, endsAt, folderPath, estimatedCompletionAt, order, named, density, cancelling, open, dragSource, tabbable, onOpen, onMenu, onDragStart, onDragEnd }: {job: GenerationJob;shot: SceneShot;index: number;@@ -261,49 +478,66 @@ function ShotCard({ job, shot, index, endsAt, folderPath, estimatedCompletionAt,estimatedCompletionAt: number | null;order: string[];named: Map<string, string>;+ density: BoardDensity;cancelling: boolean;open: boolean;- draggable: boolean;+ dragSource: boolean;+ tabbable: boolean;onOpen: () => void;- onDragStart: (event: React.DragEvent<HTMLDivElement>) => void;+ onMenu: (source: React.MouseEvent | React.KeyboardEvent) => void;+ onDragStart: (event: DragEvent<HTMLDivElement>) => void;+ onDragEnd: () => void;}) {const parts = splitActionText(shot.action);const characterReplace = job.sceneType === "character-replace";const written = characterReplace ? Boolean(shot.videoReferenceId && shot.characterReferenceId) : shot.action.trim().length > 0;const chosen = characterReplace ? [] : selectedShotTagOptions(shot.settings ?? {});+ const name = shot.name ?? `Shot ${index + 1}`;+ const plainLine = characterReplace+ ? written ? `${named.get(shot.videoReferenceId!) ?? "Unavailable video"} → ${named.get(shot.characterReferenceId!) ?? "Unavailable character"}` : "No video or character"+ : written+ ? parts.map((part) => part.kind === "text" ? part.value : named.get(part.value) ?? `Reference ${order.indexOf(part.value) + 1}`).join("")+ : "No description";return <div- className={`shot-card ${open ? "shot-card--open" : ""}`}- aria-label={`${shot.name ?? `Shot ${index + 1}`} of ${job.title}`}- title={draggable ? "Drag to reorder this shot or move it to another scene" : "This shot cannot be moved while its scene is rendering"}- draggable={draggable}+ className={`shot-card${open ? " shot-card--open" : ""}${dragSource ? " shot-card--dragging" : ""}`}+ aria-label={`${name} of ${job.title}`}+ draggableonDragStart={onDragStart}+ onDragEnd={onDragEnd}+ onContextMenu={onMenu}>- <ShotThumbnail folderPath={folderPath} job={job} seconds={shot.startSeconds} endSeconds={endsAt} shotNumber={index + 1} estimatedCompletionAt={estimatedCompletionAt} cancelling={cancelling} onPlay={onOpen} />+ {density === "tiles" && <ShotThumbnail folderPath={folderPath} job={job} seconds={shot.startSeconds} endSeconds={endsAt} shotNumber={index + 1} estimatedCompletionAt={estimatedCompletionAt} cancelling={cancelling} onPlay={onOpen} />}<buttontype="button"className="shot-card__open-control"+ tabIndex={tabbable ? 0 : -1}aria-pressed={open}- aria-label={`${shot.name ?? `Shot ${index + 1}`} of ${job.title}`}+ aria-label={`${name} of ${job.title}`}+ aria-keyshortcuts="Shift+F10"onClick={onOpen}+ onKeyDown={(event) => {+ if (!isMenuKey(event)) return;+ event.preventDefault();+ onMenu(event);+ }}>- <span className="shot-card__head">- <b>{shot.name ?? `Shot ${index + 1}`}</b>- <em>{seconds(shot.startSeconds)} – {seconds(endsAt)}</em>- </span>- <span className={`shot-card__line ${written ? "" : "shot-card__line--empty"}`}>- {characterReplace- ? written ? `${named.get(shot.videoReferenceId!) ?? "Unavailable video"} → ${named.get(shot.characterReferenceId!) ?? "Unavailable character"}` : "Choose a video and replacement character for this shot."- : written- ? parts.map((part, at) => part.kind === "text"- ? <span key={at}>{part.value}</span>- : <em key={at} className="shot-card__ref">{named.get(part.value) ?? `Reference ${order.indexOf(part.value) + 1}`}</em>)- : "No words yet — choose this shot and write what happens."}- </span>- <span className="shot-card__tags">- {chosen.map(({ group, option }) => <em key={`${group.id}-${option.id}`} className="shot-card__tag">{option.label}</em>)}- {chosen.length === 0 && <em className="shot-card__tag shot-card__tag--none">{characterReplace ? "Character Replace" : "No settings"}</em>}- </span>+ <span className="shot-card__head">+ <b>{name}</b>+ <em>{seconds(shot.startSeconds)} – {seconds(endsAt)}</em>+ </span>+ {/* One line, ellipsised; the whole line is in the tooltip and one click+ away in the inspector. */}+ <span className={`shot-card__line ${written ? "" : "shot-card__line--empty"}`} data-tooltip={written ? plainLine : undefined}>+ {characterReplace || !written+ ? plainLine+ : parts.map((part, at) => part.kind === "text"+ ? <span key={at}>{part.value}</span>+ : <em key={at} className="shot-card__ref">{named.get(part.value) ?? `Reference ${order.indexOf(part.value) + 1}`}</em>)}+ </span>+ {density === "tiles" && chosen.length > 0 && <span className="shot-card__tags">+ {chosen.map(({ group, option }) => <em key={`${group.id}-${option.id}`} className="shot-card__tag">{option.label}</em>)}+ </span>}</button></div>;}diff --git a/src/components/workspace/SceneEditor.tsx b/src/components/workspace/SceneEditor.tsxindex 60a8df7..12505fc 100644--- a/src/components/workspace/SceneEditor.tsx+++ b/src/components/workspace/SceneEditor.tsx@@ -1,5 +1,6 @@import { ImagePlus, X } from "lucide-react";-import { useMemo, useRef, useState } from "react";+import { useId, useMemo, useRef, useState } from "react";+import { ComboBox, InfoBar, PropRow, PropSection } from "../ui";import {actionReferenceIds,danglingReferenceTokens,@@ -167,27 +168,26 @@ export function ShotInspector({ job, shots, shot, index, endsAt, duration, refer};return <section className="shot-inspector" aria-label={`Shot ${shotNumber}`}>- {!promptOnly && <div className="shot-inspector__timing">- <label className="shot-card__start">- <span>Starts at</span>- <input- type="number"- min={SCENE_MIN_SECONDS}- max={duration}- step={STEP_SECONDS}- value={shot.startSeconds}- disabled={disabled || index === 0}- aria-label={`Shot ${shotNumber} starts at, in seconds`}- title={index === 0 ? "The first shot always opens the scene." : undefined}- onChange={(event) => onChange({ startSeconds: Math.min(duration, Math.max(0, Number(event.target.value) || 0)) })}- />- <em>to {seconds(endsAt)}</em>- </label>- </div>}+ {!promptOnly && <PropRow label="Starts at" htmlFor={`shot-start-${shot.id}`} className="shot-inspector__timing">+ <input+ id={`shot-start-${shot.id}`}+ className="text-field"+ type="number"+ min={SCENE_MIN_SECONDS}+ max={duration}+ step={STEP_SECONDS}+ value={shot.startSeconds}+ disabled={disabled || index === 0}+ aria-label={`Shot ${shotNumber} starts at, in seconds`}+ data-tooltip={index === 0 ? "The first shot always opens the scene." : undefined}+ onChange={(event) => onChange({ startSeconds: Math.min(duration, Math.max(0, Number(event.target.value) || 0)) })}+ />+ <span className="prop-unit">to {seconds(endsAt)}</span>+ </PropRow>}{job.sceneType === "character-replace" ? <CharacterReplaceInputs shot={shot} references={references} disabled={disabled} onChange={onChange} /> : <><div className="shot-card__action">- <label className="shot-card__sublabel" htmlFor={`shot-action-${shot.id}`}>{job.sceneType === "pose" ? "Describe where the pose should be used" : "Describe the shot"}</label>+ <label className="shot-card__sublabel" htmlFor={`shot-action-${shot.id}`}>{job.sceneType === "pose" ? "Where the pose is used" : "Description"}</label><div className="shot-action-editor"><textareaid={`shot-action-${shot.id}`}@@ -225,29 +225,27 @@ export function ShotInspector({ job, shots, shot, index, endsAt, duration, refer</div>{!promptOnly && <div className="shot-speech">- <div className="shot-speech__heading">- <label className="shot-card__sublabel" htmlFor={`shot-speech-${shot.id}`}>Speech</label>- <label className="shot-speech__language">- <span>Language</span>- <select- value={speechLanguage}- disabled={disabled}- aria-label={`Speech language for shot ${shotNumber}`}- onChange={(event) => onChange({ speechLanguage: event.target.value })}- >- {speechLanguages.map((language) => <option key={language} value={language}>{language}</option>)}- </select>- </label>- </div>+ <label className="shot-card__sublabel" htmlFor={`shot-speech-${shot.id}`}>Speech</label><textareaid={`shot-speech-${shot.id}`}+ className="text-field"value={shot.speech ?? ""}disabled={disabled}aria-label={`Speech for shot ${shotNumber}`}- placeholder="Enter the words spoken in this shot."+ placeholder="Words spoken in this shot"+ data-tooltip="Added to the prompt as MiniMax dialogue"onChange={(event) => onChange({ speech: event.target.value || null })}/>- <p className="shot-speech__hint">Added to the final prompt as MiniMax dialogue.</p>+ <PropRow label="Language" htmlFor={`shot-language-${shot.id}`}>+ <ComboBox+ id={`shot-language-${shot.id}`}+ value={speechLanguage}+ disabled={disabled}+ aria-label={`Speech language for shot ${shotNumber}`}+ options={speechLanguages.map((language) => ({ value: language, label: language }))}+ onChange={(language) => onChange({ speechLanguage: language })}+ />+ </PropRow></div>}<ReferencePalette@@ -269,6 +267,14 @@ export function ShotInspector({ job, shots, shot, index, endsAt, duration, refer</section>;}+/** A reference picker's options: an "unavailable" entry for an id the list no+ * longer has, so the control can still show what is stored. */+const referenceOptions = (list: readonly ProjectReference[], current: string | null | undefined, empty: string, unavailable: string) => [+ { value: "", label: empty },+ ...(current && !list.some((reference) => reference.id === current) ? [{ value: current, label: unavailable }] : []),+ ...list.map((reference) => ({ value: reference.id, label: reference.name })),+];+function CharacterReplaceInputs({ shot, references, disabled, onChange }: {shot: SceneShot; references: ProjectReference[]; disabled: boolean;onChange: (updates: Partial<SceneShot>) => void;@@ -277,40 +283,40 @@ function CharacterReplaceInputs({ shot, references, disabled, onChange }: {const characters = references.filter((reference) => reference.kind !== "video" && isVisualReference(reference)&& isReferenceUsable(reference) && referenceImages(reference).length > 0);return <div className="scene-settings">- <label className="scene-settings__field">- <span>Video reference</span>- <select aria-label="Video reference for this shot" value={shot.videoReferenceId ?? ""} disabled={disabled}- onChange={(event) => onChange({ videoReferenceId: event.target.value || null })}>- <option value="">Select a video</option>- {shot.videoReferenceId && !videos.some((reference) => reference.id === shot.videoReferenceId) && <option value={shot.videoReferenceId}>Unavailable video reference</option>}- {videos.map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- <small>Uses the clip range and soundtrack setting saved under References.</small>- </label>- <label className="scene-settings__field">- <span>New character reference</span>- <select aria-label="New character reference for this shot" value={shot.characterReferenceId ?? ""} disabled={disabled}- onChange={(event) => onChange({ characterReferenceId: event.target.value || null })}>- <option value="">Select a character</option>- {shot.characterReferenceId && !characters.some((reference) => reference.id === shot.characterReferenceId) && <option value={shot.characterReferenceId}>Unavailable character reference</option>}- {characters.map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- </label>- <label className="scene-settings__field">- <span>Character to replace</span>- <input aria-label="Character to replace in this shot" value={shot.characterTarget ?? ""} disabled={disabled}+ <PropRow label="Video" htmlFor={`replace-video-${shot.id}`}>+ <ComboBox id={`replace-video-${shot.id}`} aria-label="Video reference for this shot" value={shot.videoReferenceId ?? ""} disabled={disabled}+ options={referenceOptions(videos, shot.videoReferenceId, "None", "Unavailable video reference")}+ onChange={(value) => onChange({ videoReferenceId: value || null })} />+ </PropRow>+ <p className="prop-caption">Uses the clip range and soundtrack setting saved under References.</p>+ <PropRow label="New character" htmlFor={`replace-character-${shot.id}`}>+ <ComboBox id={`replace-character-${shot.id}`} aria-label="New character reference for this shot" value={shot.characterReferenceId ?? ""} disabled={disabled}+ options={referenceOptions(characters, shot.characterReferenceId, "None", "Unavailable character reference")}+ onChange={(value) => onChange({ characterReferenceId: value || null })} />+ </PropRow>+ <PropRow label="Replace" htmlFor={`replace-target-${shot.id}`}>+ <input id={`replace-target-${shot.id}`} className="text-field" aria-label="Character to replace in this shot" value={shot.characterTarget ?? ""} disabled={disabled}placeholder="The main character" onChange={(event) => onChange({ characterTarget: event.target.value || null })} />- <small>If several characters appear, identify one, for example “the person in the red jacket”.</small>- </label>- <p>The replacement follows the original performance. Camera movement, background, lighting and other characters are preserved.</p>+ </PropRow>+ <p className="prop-caption">With several characters, name one, for example “the person in the red jacket”. Camera, background, lighting and other characters are kept.</p></div>;}-/* --- The scene, opened from its own line ---------------------------------- */+/* --- The scene, opened from its own header -------------------------------- */++const SCENE_TYPES: { value: SceneType; label: string }[] = [+ { value: "first-last-frame", label: "First & last frame" },+ { value: "animate", label: "Animate" },+ { value: "pose", label: "Pose" },+ { value: "character-replace", label: "Character replace" },+ { value: "extend", label: "Extend" },+ { value: "bridge", label: "Bridge" },+];/** Scene-wide render controls, the look the description opens with (base guide* §4.1), and the two sound fields defined per prompt (§4.6, §4.7). Length- * lives in the scene header where it stays visible. */+ * lives in the scene header where it stays visible. Simple label + control+ * pairs are inspector rows; the free-text fields stay full width. */export function SceneInspector({ job, shots, references, previousScene, defaultSteps, defaultLook, disabled, importAvailable, importError, onAddStartFrame, onAddEndFrame, onChange, onShots, sceneType = job.sceneType ?? "first-last-frame" }: {sceneType?: SceneType;defaultLook?: string | null;@@ -332,6 +338,7 @@ export function SceneInspector({ job, shots, references, previousScene, defaultSconst characterReplace = sceneType === "character-replace";const transition = isVideoTransition({ sceneType });const look = SHOT_TAG_GROUPS.find((group) => group.id === "visualStyle")!;+ const id = useId();// The style is read off the first shot that carries one, so that is where it// is written. One place, never a second field that could disagree with it.const chosen = shots.map((shot) => shot.settings?.[look.id]?.[0]).find(Boolean) ?? "";@@ -339,174 +346,147 @@ export function SceneInspector({ job, shots, references, previousScene, defaultS() => references.filter((reference) => referenceImages(reference).length > 0 && isReferenceUsable(reference)),[references],);+ const videos = usableVideoReferences(references);+ const addImageButton = (label: string, onClick: () => void) => <button+ type="button"+ className="icon-button prop-row__button"+ aria-label={label}+ disabled={disabled || !importAvailable}+ data-tooltip={importAvailable ? label : "Image import is available in the desktop app"}+ onClick={onClick}+ ><ImagePlus size={16} aria-hidden="true" /></button>;return <section className="scene-inspector" aria-label="This scene">- <section className="scene-settings" aria-labelledby={`${job.id}-scene-settings`}>- <h3 id={`${job.id}-scene-settings`}>Scene</h3>- <label className="scene-settings__field">- <span>Scene type</span>- <select aria-label="Scene type" value={sceneType} disabled={disabled}- onChange={(event) => onChange({ sceneType: event.target.value as SceneType, usePreviousSceneLastFrame: undefined,- ...(event.target.value === "animate" ? { endFrameReferenceId: undefined } : {}) })}>- <option value="first-last-frame">First & Last Frame</option>- <option value="animate">Animate</option>- <option value="pose">Pose</option>- <option value="character-replace">Character Replace</option>- <option value="extend">Extend</option>- <option value="bridge">Bridge</option>- </select>- </label>- {pose && <>- <label className="scene-settings__field">- <span>Pose video reference</span>- <select aria-label="Pose video reference for this scene" value={job.poseVideoReferenceId ?? ""} disabled={disabled}- onChange={(event) => onChange({ poseVideoReferenceId: event.target.value || null })}>- <option value="">Select a video</option>- {job.poseVideoReferenceId && !usableVideoReferences(references).some((reference) => reference.id === job.poseVideoReferenceId) && <option value={job.poseVideoReferenceId}>Unavailable video reference</option>}- {usableVideoReferences(references).map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- <small>Uses the saved clip range for pose and motion. Describe the subject and setting below, with optional references.</small>- </label>- {shots.map((shot, index) => <ShotInspector key={shot.id} job={job} shots={shots} shot={shot} index={index}- endsAt={shots[index + 1]?.startSeconds ?? sceneDurationSeconds(job)} duration={sceneDurationSeconds(job)}- references={references} disabled={disabled} promptOnly- onChange={(updates) => onShots(shots.map((item) => item.id === shot.id ? { ...item, ...updates } : item))} />)}- </>}- {characterReplace && <p>Open a shot to select its source video and new character reference.</p>}- {transition && <>- <label className="scene-settings__field">- <span>{sceneType === "bridge" ? "Start video reference" : "Video reference"}</span>- <select aria-label="Start video reference for this scene" value={job.startVideoReferenceId ?? ""} disabled={disabled}- onChange={(event) => onChange({ startVideoReferenceId: event.target.value || null })}>- <option value="">Select a video</option>- {job.startVideoReferenceId && !usableVideoReferences(references).some((reference) => reference.id === job.startVideoReferenceId) && <option value={job.startVideoReferenceId}>Unavailable video reference</option>}- {usableVideoReferences(references).map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- </label>- {sceneType === "bridge" && <label className="scene-settings__field">- <span>End video reference</span>- <select aria-label="End video reference for this scene" value={job.endVideoReferenceId ?? ""} disabled={disabled}- onChange={(event) => onChange({ endVideoReferenceId: event.target.value || null })}>- <option value="">Select a video</option>- {job.endVideoReferenceId && !usableVideoReferences(references).some((reference) => reference.id === job.endVideoReferenceId) && <option value={job.endVideoReferenceId}>Unavailable video reference</option>}- {usableVideoReferences(references).map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- </label>}- <p>{sceneType === "bridge" ? "Connect the end of the start video to the beginning of the end video." : "Continue from the end of the selected video."} Open a shot to describe the new action. Scene length controls only the new segment.</p>- </>}- {!characterReplace && <>- {animate && <label className="scene-settings__field">- <span>Reference video</span>- <select aria-label="Reference video for this scene" disabled={disabled}- value={usableVideoReferences(references).find((reference) => job.referenceIds.includes(reference.id))?.id ?? ""}- onChange={(event) => onChange({ referenceIds: [- ...job.referenceIds.filter((id) => !references.some((reference) => reference.id === id && reference.kind === "video")),- ...(event.target.value ? [event.target.value] : []),- ] })}>- <option value="">Select a video</option>- {usableVideoReferences(references).map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- <small>Choose one driving video and one repainted frame of its scene. Enable the video's soundtrack under References to preserve it. No text prompt is needed.</small>- </label>}- {!animate && <label className="scene-settings__field">- <span>Look</span>- <select- value={chosen}- disabled={disabled}- aria-label="The look of this scene"- onChange={(event) => {- const value = event.target.value;- onShots(shots.map((shot, index) => {- const settings = { ...(shot.settings ?? {}) };- if (index === 0 && value) settings[look.id] = [value];- else delete settings[look.id];- return { ...shot, settings: normalizeShotTagSelection(settings) };- }));- }}- >- <option value="">None</option>- {look.options.map((option) => <option key={option.id} value={option.id}>{option.label}</option>)}- </select>- {!chosen && defaultLook && <small>Using project Look: {look.options.find((option) => option.id === defaultLook)?.label ?? defaultLook}.</small>}- </label>}- {!transition && !pose && <div className="scene-settings__field">- <span>{animate ? "Repainted scene frame" : "Start frame"}</span>- <div className="scene-settings__start-frame">- <select- value={animate- ? job.startFrameReferenceId ?? imageReferences.find((reference) => job.referenceIds.includes(reference.id))?.id ?? ""- : job.usePreviousSceneLastFrame ? "previous-scene" : job.startFrameReferenceId ?? ""}- disabled={disabled}- aria-label="Start frame for this scene"- onChange={(event) => onChange({- usePreviousSceneLastFrame: event.target.value === "previous-scene" || undefined,- startFrameReferenceId: event.target.value === "previous-scene" ? undefined : event.target.value || undefined,- ...(animate ? {- endFrameReferenceId: undefined,- referenceIds: job.referenceIds.filter((id) => !imageReferences.some((reference) => reference.id === id)),- } : {}),- })}- >- <option value="">None</option>- {!animate && <option value="previous-scene" disabled={!previousScene}>Previous scene</option>}- {imageReferences.map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- <button- type="button"- className="secondary-button"- disabled={disabled || !importAvailable}- title={importAvailable ? "Import an image and use it as this scene's first frame" : "Image import is available in the desktop app"}- onClick={onAddStartFrame}- ><ImagePlus size={15} /> Add image</button>- </div>- <small>{animate ? "Use a frame of the driving video with the character repainted. Keep its pose, framing, background and lighting." : job.usePreviousSceneLastFrame- ? previousScene ? `Continues “${previousScene.title}” using its saved latents with 22 overlapping frames. Generate that scene first, or use Generate All.` : "Move this scene after another scene to continue it."- : "The selected image anchors the opening frame."}</small>- </div>}- {!animate && !transition && !pose && <div className="scene-settings__field">- <span>Last frame</span>- <div className="scene-settings__start-frame">- <select value={job.endFrameReferenceId ?? ""} disabled={disabled} aria-label="Last frame for this scene"- onChange={(event) => onChange({ endFrameReferenceId: event.target.value || undefined })}>- <option value="">None</option>- {imageReferences.map((reference) => <option key={reference.id} value={reference.id}>{reference.name}</option>)}- </select>- <button type="button" className="secondary-button" disabled={disabled || !importAvailable}- title={importAvailable ? "Import an image and use it as this scene's last frame" : "Image import is available in the desktop app"}- onClick={onAddEndFrame}><ImagePlus size={15} /> Add image</button>- </div>- <small>The selected image anchors the closing frame.</small>- </div>}- {importError && <small className="scene-settings__error" role="alert">{importError}</small>}- {!animate && <><label className="scene-settings__field">- <span>Sound</span>- <textarea- value={job.soundscape ?? ""}- disabled={disabled}- aria-label="The sound of this scene"- placeholder="Ambience, and the sounds the action itself makes."- onChange={(event) => onChange({ soundscape: event.target.value })}- />- </label>- <label className="scene-settings__field">- <span>Music</span>- <textarea- value={job.music ?? ""}- disabled={disabled}- aria-label="The music of this scene"- placeholder="Instrumentation, tempo and dynamics — not a mood."- onChange={(event) => onChange({ music: event.target.value })}- />- </label></>}- </>}- </section>- <section className="scene-settings" aria-labelledby={`${job.id}-generation-settings`}>- <h3 id={`${job.id}-generation-settings`}>Generation</h3>- {animate && <p>Animate output is limited to 14.375 seconds. Longer scene lengths are shortened to fit.</p>}- <div className="scene-settings__numbers">- <label className="scene-settings__field">- <span>Steps</span>+ <div role="region" aria-label="Scene" className="scene-settings">+ <PropSection title="Scene" persistKey="generator.scene">+ <PropRow label="Scene type" htmlFor={`${id}-type`}>+ <ComboBox id={`${id}-type`} aria-label="Scene type" value={sceneType} disabled={disabled} options={SCENE_TYPES}+ onChange={(value) => onChange({ sceneType: value as SceneType, usePreviousSceneLastFrame: undefined,+ ...(value === "animate" ? { endFrameReferenceId: undefined } : {}) })} />+ </PropRow>+ {pose && <>+ <PropRow label="Pose video" htmlFor={`${id}-pose`}>+ <ComboBox id={`${id}-pose`} aria-label="Pose video reference for this scene" value={job.poseVideoReferenceId ?? ""} disabled={disabled}+ options={referenceOptions(videos, job.poseVideoReferenceId, "None", "Unavailable video reference")}+ onChange={(value) => onChange({ poseVideoReferenceId: value || null })} />+ </PropRow>+ <p className="prop-caption">Uses the saved clip range for pose and motion. Describe the subject and setting below.</p>+ </>}+ {characterReplace && <p className="prop-caption">Open a shot to choose its source video and new character.</p>}+ {transition && <>+ <PropRow label={sceneType === "bridge" ? "Start video" : "Video"} htmlFor={`${id}-start-video`}>+ <ComboBox id={`${id}-start-video`} aria-label="Start video reference for this scene" value={job.startVideoReferenceId ?? ""} disabled={disabled}+ options={referenceOptions(videos, job.startVideoReferenceId, "None", "Unavailable video reference")}+ onChange={(value) => onChange({ startVideoReferenceId: value || null })} />+ </PropRow>+ {sceneType === "bridge" && <PropRow label="End video" htmlFor={`${id}-end-video`}>+ <ComboBox id={`${id}-end-video`} aria-label="End video reference for this scene" value={job.endVideoReferenceId ?? ""} disabled={disabled}+ options={referenceOptions(videos, job.endVideoReferenceId, "None", "Unavailable video reference")}+ onChange={(value) => onChange({ endVideoReferenceId: value || null })} />+ </PropRow>}+ <p className="prop-caption">{sceneType === "bridge" ? "Connects the end of the start video to the beginning of the end video." : "Continues from the end of the selected video."} Open a shot to describe the new action; the scene length sets only the new segment.</p>+ </>}+ {!characterReplace && <>+ {animate && <>+ <PropRow label="Video" htmlFor={`${id}-animate-video`}>+ <ComboBox id={`${id}-animate-video`} aria-label="Reference video for this scene" disabled={disabled}+ value={videos.find((reference) => job.referenceIds.includes(reference.id))?.id ?? ""}+ options={referenceOptions(videos, null, "None", "")}+ onChange={(value) => onChange({ referenceIds: [+ ...job.referenceIds.filter((referenceId) => !references.some((reference) => reference.id === referenceId && reference.kind === "video")),+ ...(value ? [value] : []),+ ] })} />+ </PropRow>+ <p className="prop-caption">One driving video and one repainted frame of its scene. Turn on the video’s soundtrack under References to keep it.</p>+ </>}+ {!animate && <PropRow label="Look" htmlFor={`${id}-look`}>+ <ComboBox+ id={`${id}-look`}+ value={chosen}+ disabled={disabled}+ aria-label="The look of this scene"+ options={[{ value: "", label: "None" }, ...look.options.map((option) => ({ value: option.id, label: option.label }))]}+ onChange={(value) => {+ onShots(shots.map((shot, index) => {+ const settings = { ...(shot.settings ?? {}) };+ if (index === 0 && value) settings[look.id] = [value];+ else delete settings[look.id];+ return { ...shot, settings: normalizeShotTagSelection(settings) };+ }));+ }}+ />+ </PropRow>}+ {!animate && !chosen && defaultLook && <p className="prop-caption">Using project Look: {look.options.find((option) => option.id === defaultLook)?.label ?? defaultLook}.</p>}+ {!transition && !pose && <>+ <PropRow label={animate ? "Repainted frame" : "Start frame"} htmlFor={`${id}-start`}>+ <ComboBox+ id={`${id}-start`}+ value={animate+ ? job.startFrameReferenceId ?? imageReferences.find((reference) => job.referenceIds.includes(reference.id))?.id ?? ""+ : job.usePreviousSceneLastFrame ? "previous-scene" : job.startFrameReferenceId ?? ""}+ disabled={disabled}+ aria-label="Start frame for this scene"+ options={[+ { value: "", label: "None" },+ ...(!animate ? [{ value: "previous-scene", label: "Previous scene", disabled: !previousScene }] : []),+ ...imageReferences.map((reference) => ({ value: reference.id, label: reference.name })),+ ]}+ onChange={(value) => onChange({+ usePreviousSceneLastFrame: value === "previous-scene" || undefined,+ startFrameReferenceId: value === "previous-scene" ? undefined : value || undefined,+ ...(animate ? {+ endFrameReferenceId: undefined,+ referenceIds: job.referenceIds.filter((referenceId) => !imageReferences.some((reference) => reference.id === referenceId)),+ } : {}),+ })}+ />+ {addImageButton(animate ? "Add repainted frame" : "Add start frame", onAddStartFrame)}+ </PropRow>+ <p className="prop-caption">{animate ? "A frame of the driving video with the character repainted. Keep its pose, framing, background and lighting." : job.usePreviousSceneLastFrame+ ? previousScene ? `Continues “${previousScene.title}” from its saved latents with 22 overlapping frames. Generate that scene first, or use Generate all.` : "Move this scene after another scene to continue it."+ : "Anchors the opening frame."}</p>+ </>}+ {!animate && !transition && !pose && <PropRow label="Last frame" htmlFor={`${id}-end`}>+ <ComboBox id={`${id}-end`} value={job.endFrameReferenceId ?? ""} disabled={disabled} aria-label="Last frame for this scene"+ options={[{ value: "", label: "None" }, ...imageReferences.map((reference) => ({ value: reference.id, label: reference.name }))]}+ onChange={(value) => onChange({ endFrameReferenceId: value || undefined })} />+ {addImageButton("Add last frame", onAddEndFrame)}+ </PropRow>}+ {importError && <InfoBar severity="error" title="Couldn’t add image" message={importError} />}+ {!animate && <>+ <label className="scene-settings__field">+ <span>Sound</span>+ <textarea+ className="text-field"+ value={job.soundscape ?? ""}+ disabled={disabled}+ aria-label="The sound of this scene"+ placeholder="Ambience, and the sounds the action itself makes."+ onChange={(event) => onChange({ soundscape: event.target.value })}+ />+ </label>+ <label className="scene-settings__field">+ <span>Music</span>+ <textarea+ className="text-field"+ value={job.music ?? ""}+ disabled={disabled}+ aria-label="The music of this scene"+ placeholder="Instrumentation, tempo and dynamics — not a mood."+ onChange={(event) => onChange({ music: event.target.value })}+ />+ </label>+ </>}+ </>}+ </PropSection>+ </div>+ <div role="region" aria-label="Generation" className="scene-settings">+ <PropSection title="Generation" persistKey="generator.generation">+ {animate && <p className="prop-caption">Animate output is limited to 14.375 seconds; longer scenes are shortened to fit.</p>}+ <PropRow label="Steps" htmlFor={`${id}-steps`}><CommittedNumberInput+ id={`${id}-steps`}+ className="text-field"minimum={2}maximum={MAX_GENERATION_STEPS}step={1}@@ -516,10 +496,11 @@ export function SceneInspector({ job, shots, references, previousScene, defaultSaria-label="Generation step count"onCommit={(value) => onChange({ steps: value })}/>- </label>- <label className="scene-settings__field">- <span>Seed</span>+ </PropRow>+ <PropRow label="Seed" htmlFor={`${id}-seed`}><CommittedNumberInput+ id={`${id}-seed`}+ className="text-field"minimum={-1}maximum={Number.MAX_SAFE_INTEGER}step={1}@@ -527,12 +508,12 @@ export function SceneInspector({ job, shots, references, previousScene, defaultSintegerdisabled={disabled}aria-label="Generation seed"+ data-tooltip="-1 picks a random seed"onCommit={(value) => onChange({ seed: value })}/>- <small>Use -1 for a random seed.</small>- </label>- </div>- </section>+ </PropRow>+ </PropSection>+ </div></section>;}@@ -556,28 +537,27 @@ function ReferenceSmartChips({ action, tokenOrder, referenceById, citable, numbereturn `Reference ${number > 0 ? number : "?"}${name ? ` · ${name}` : ""}`;};return <div className="shot-action-editor__chips">- {parts.map((part, index) => part.kind === "reference" && <select+ {parts.map((part, index) => part.kind === "reference" && <ComboBoxkey={index}className={`reference-smart-chip ${citable.some((reference) => reference.id === part.value) ? "" : "reference-smart-chip--broken"}`}value={part.value}disabled={disabled}aria-label={`${label(part.value)} — choose another reference`}- onChange={(event) => {- if (event.target.value === "") onChange(index, null);- else if (event.target.value !== part.value) onChange(index, event.target.value);+ options={[+ // A reference that can no longer be cited still has to be listed,+ // or the control could not show what the line currently says.+ ...(!citable.some((reference) => reference.id === part.value) ? [{ value: part.value, label: `${label(part.value)} — can’t be used` }] : []),+ ...citable.map((reference) => {+ const number = numbered.findIndex((item) => item.id === reference.id) + 1;+ return { value: reference.id, label: number > 0 ? `Reference ${number} · ${reference.name}` : `${reference.name} — not in this scene yet` };+ }),+ { value: "", label: "Remove from the line" },+ ]}+ onChange={(value) => {+ if (value === "") onChange(index, null);+ else if (value !== part.value) onChange(index, value);}}- >- {/* A reference that can no longer be cited still has to be selectable,- or the control could not show what the line currently says. */}- {!citable.some((reference) => reference.id === part.value) && <option value={part.value}>{label(part.value)} — can’t be used</option>}- {citable.map((reference) => {- const number = numbered.findIndex((item) => item.id === reference.id) + 1;- return <option key={reference.id} value={reference.id}>- {number > 0 ? `Reference ${number} · ${reference.name}` : `${reference.name} — not in this scene yet`}- </option>;- })}- <option value="">Take it out of the line</option>- </select>)}+ />)}</div>;}@@ -602,53 +582,49 @@ function ShotSettings({ settings, disabled, shotNumber, onChange }: {const group = pending ? shotTagGroup(pending) : undefined;return <div className="shot-settings">+ <span className="shot-card__sublabel">Settings</span><ul className="shot-settings__chips">{chosen.map(({ group: owner, option }) => <li key={`${owner.id}-${option.id}`}>- <span className="setting-tag">+ <span className="setting-tag" data-tooltip={`Adds “${option.term}” to the prompt`}><em>{owner.label}</em><b>{option.label}</b><buttontype="button"disabled={disabled}aria-label={`Remove ${owner.label}: ${option.label} from shot ${shotNumber}`}- title={`Puts “${option.term}” in the prompt`}onClick={() => onChange(toggleShotTag(settings, owner.id, option.id))}- ><X size={13} /></button>+ ><X size={12} aria-hidden="true" /></button></span></li>)}- {chosen.length === 0 && <li className="shot-settings__none">No settings on this shot, which is a finished shot.</li>}+ {chosen.length === 0 && <li className="shot-settings__none">None</li>}</ul><div className="shot-settings__add">- <select- value={pending ?? ""}+ <ComboBox+ value={pending}disabled={disabled}+ placeholder="Add a setting…"aria-label={`Add a setting to shot ${shotNumber}`}- onChange={(event) => setPending(event.target.value || null)}- >- <option value="">Add a setting…</option>- {groups.map((option) => {+ options={groups.map((option) => {// Speed and amplitude qualify a movement. With none chosen the// compiler leaves them out, so offering them would promise something// the prompt does not do.const blocked = Boolean(option.requiresMovement) && !movement;- return <option key={option.id} value={option.id} disabled={blocked}>- {option.label}{blocked ? " — needs a camera movement first" : ""}- </option>;+ return { value: option.id, label: option.label, disabled: blocked, description: blocked ? "Needs a camera movement first" : undefined };})}- </select>- {group && <select- value=""+ onChange={(value) => setPending(value || null)}+ />+ {group && <ComboBox+ value={null}disabled={disabled}+ placeholder="Choose a value…"aria-label={`Value for ${group.label} on shot ${shotNumber}`}- onChange={(event) => {- if (!event.target.value) return;- onChange(toggleShotTag(settings, group.id, event.target.value));+ options={group.options.map((option) => ({ value: option.id, label: option.label }))}+ onChange={(value) => {+ if (!value) return;+ onChange(toggleShotTag(settings, group.id, value));setPending(null);}}- >- <option value="">Choose a value…</option>- {group.options.map((option) => <option key={option.id} value={option.id}>{option.label}</option>)}- </select>}+ />}{group && <span className="shot-settings__help">{group.help}</span>}</div></div>;@@ -665,11 +641,8 @@ function ReferencePalette({ citable, numbered, dangling, referenceById, disabledonInsert: (referenceId: string) => void;}) {return <div className="reference-palette">- <span className="reference-palette__lead">- {citable.length === 0- ? "This project has no references the prompt can use yet. Add one under References and it can be dropped into a line."- : "Drag one into the line, or click it to write it where the caret is."}- </span>+ <span className="shot-card__sublabel">References</span>+ {citable.length === 0 && <span className="reference-palette__lead">None yet — add one under References.</span>}<ul>{citable.map((reference) => {const number = numbered.findIndex((item) => item.id === reference.id) + 1;@@ -679,9 +652,9 @@ function ReferencePalette({ citable, numbered, dangling, referenceById, disabledclassName="reference-chip"draggable={!disabled}disabled={disabled}- title={number > 0- ? `Writes “Reference ${number}” into the line, and <Subject ${number}> into the prompt`- : "Dropping it into a line adds it to this scene, and it takes the next Reference number"}+ data-tooltip={number > 0+ ? `Writes “Reference ${number}” into the line, and <Subject ${number}> into the prompt. Drag it, or click to insert at the caret.`+ : "Dropping it into a line adds it to this scene with the next Reference number"}onDragStart={(event) => {event.dataTransfer.setData(REFERENCE_DRAG_TYPE, reference.id);event.dataTransfer.effectAllowed = "copy";@@ -694,11 +667,10 @@ function ReferencePalette({ citable, numbered, dangling, referenceById, disabled</li>;})}</ul>- {dangling.length > 0 && <p className="reference-palette__broken">- {dangling.length === 1 ? "One reference named in this scene" : `${dangling.length} references named in this scene`} can no- longer be used — {dangling.map((id) => referenceById.get(id)?.name ?? "one that was deleted").join(", ")}. Those names are- left out of the compiled prompt, and the scene cannot be sent until each one is swapped for another reference or taken- out of the line.- </p>}+ {dangling.length > 0 && <InfoBar+ severity="error"+ title={dangling.length === 1 ? "A reference can’t be used" : `${dangling.length} references can’t be used`}+ message={`${dangling.map((id) => referenceById.get(id)?.name ?? "A deleted reference").join(", ")} ${dangling.length === 1 ? "is" : "are"} left out of the prompt. Swap ${dangling.length === 1 ? "it" : "each one"} for another reference or remove ${dangling.length === 1 ? "it" : "them"} from the line before generating.`}+ />}</div>;}diff --git a/src/components/workspace/sceneStatus.tsx b/src/components/workspace/sceneStatus.tsxindex f90999e..ad3df15 100644--- a/src/components/workspace/sceneStatus.tsx+++ b/src/components/workspace/sceneStatus.tsx@@ -11,15 +11,17 @@ import { sceneDurationSeconds, sceneShots, type GenerationJob } from "../../lib/export type JobStatus = GenerationJob["status"];export type SceneIndicatorStatus = JobStatus | "changed";+/* Sentence case, like every other Windows status word — the old tracked+ mono capitals read as a shout beside a 14px scene name. */export const STATUS_BADGE: Record<SceneIndicatorStatus, string> = {- draft: "DRAFT",- queued: "IN QUEUE",- generating: "RENDERING",- ready: "SAVING",- completed: "FINISHED",- failed: "FAILED",- cancelled: "CANCELLED",- changed: "CHANGED",+ draft: "Draft",+ queued: "In queue",+ generating: "Rendering",+ ready: "Saving",+ completed: "Finished",+ failed: "Failed",+ cancelled: "Cancelled",+ changed: "Changed",};export const STATUS_WORD: Record<JobStatus, string> = {diff --git a/src/styles/generator.css b/src/styles/generator.cssindex 6a74fce..380427b 100644--- a/src/styles/generator.css+++ b/src/styles/generator.css@@ -1,352 +1,220 @@/* ============================================================================- generator.css — the Generator screen: a board of shot cards, and the panel- that edits whatever is open on it.+ generator.css — the Generator screen: a command bar, a board of scene groups+ with their shot tiles, a status bar, and the inspector pane that edits+ whatever is open on the board.Legibility contract: body copy is --text-base, the smallest text anywhere is--text-2xs (12px), standard controls are --control-md (32px) and compactones --control-sm (24px). No raw px type, no hand-written greys.========================================================================== */+/* The board, the splitter and the inspector. The inspector's width is the+ user's (usePaneSize → --pane-generator-inspector), so there are no width+ breakpoints any more: a narrow window narrows the board, and the splitter+ is how the inspector gets out of the way. */.generator-view {height: 100%;min-height: 0;display: grid;- grid-template-columns: minmax(0, 1fr) 380px;- background: var(--bg);+ grid-template-columns: minmax(0, 1fr) auto var(--pane-generator-inspector, 380px);+ background: var(--layer);}/* Nothing to inspect until there is a scene, so the board takes the width. */.generator-view--empty {grid-template-columns: minmax(0, 1fr);}-/* --- The runtime pill -------------------------------------------------------- The user's single source of truth about whether a scene can be generated at- all. It used to sit at the foot of the scene rail; with the rail gone it sits- beside the button it governs.- ========================================================================== */--.generator-runtime {- display: inline-flex;- align-items: center;- gap: var(--space-2);- min-height: var(--control-sm);- padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-pill);- color: var(--text-muted);- background: var(--panel);- font-size: var(--text-xs);- font-weight: var(--weight-medium);- line-height: var(--leading-snug);-}--.generator-runtime > i {- width: 8px;- height: 8px;- flex: 0 0 auto;- border-radius: 50%;- background: currentColor;-}--.generator-runtime__label {- color: var(--text-secondary);- font-weight: var(--weight-medium);- white-space: nowrap;-}--.generator-runtime__select {- position: relative;- width: 140px;- flex: 0 0 140px;-}-.generator-runtime__select--open {- z-index: 20;-}+/* --- The board column: command bar, board, status bar ---------------------- */-.generator-runtime__trigger {- width: 100%;+.generator-main {min-width: 0;- min-height: var(--control-sm);+ min-height: 0;display: flex;- align-items: center;- gap: var(--space-2);- padding: 0 var(--space-3);- overflow: hidden;- border: 1px solid var(--success-line);- border-radius: var(--radius-pill);- outline: 0;- color: var(--success);- background: color-mix(in srgb, var(--success) 10%, var(--panel-2));- font-size: var(--text-sm);- font-weight: var(--weight-semibold);- transition: var(--transition-control);-}--.generator-runtime__trigger:hover,-.generator-runtime__select--open .generator-runtime__trigger {- border-color: var(--success);- background: color-mix(in srgb, var(--success) 16%, var(--panel-2));-}--.generator-runtime__trigger:focus-visible {- border-color: var(--success);+ flex-direction: column;}-.generator-runtime__trigger > svg {+.generator-command {flex: 0 0 auto;- transition: transform var(--motion-normal) var(--ease-decelerate);-}--.generator-runtime__select--open .generator-runtime__trigger > svg {- transform: rotate(180deg);+ min-height: var(--space-7);+ border-bottom: 1px solid var(--line);}-.generator-runtime__value {- --template-scroll-distance: 0px;- min-width: 0;- flex: 1 1 auto;- overflow: hidden;- color: inherit;- text-align: left;- white-space: nowrap;+/* "Generate all" is the screen's one accent button, as in the mock: an accent+ fill on the command bar's otherwise subtle row. */+.generator-command .generator-command__generate:not(:disabled) {+ color: var(--on-accent);+ background: var(--button-primary-bg);}-.generator-runtime__value > span {- display: inline-block;- min-width: max-content;+.generator-command .generator-command__generate:hover:not(:disabled) {+ background: var(--button-primary-hover);}-.generator-runtime__value--overflow > span {- animation: generator-template-scroll 4s ease-in-out 0.6s infinite alternate;+.generator-command .generator-command__generate:active:not(:disabled) {+ color: var(--on-accent-dim);+ background: var(--button-primary-active);}-@keyframes generator-template-scroll {- 0%, 15% { transform: translateX(0); }- 85%, 100% { transform: translateX(var(--template-scroll-distance)); }+.generator-command .generator-command__cancel {+ color: var(--danger);}-.generator-runtime__options {- position: absolute;- top: calc(100% + var(--space-2));- left: 0;- width: 176px;- max-height: 220px;+.generator-board {+ flex: 1 1 auto;+ min-height: 0;overflow-y: auto;- padding: var(--space-1);- border: 1px solid var(--success-line);- border-radius: var(--radius-lg);- background: color-mix(in srgb, var(--success) 9%, var(--panel-2));- box-shadow: var(--shadow-sm);- scrollbar-color: var(--success-line) transparent;-}--.generator-runtime__options button {- width: 100%;- min-height: var(--control-sm);- display: grid;- grid-template-columns: minmax(0, 1fr) 8px;- align-items: center;- gap: var(--space-2);padding: var(--space-2) var(--space-3);- border: 0;- border-radius: var(--radius-sm);- color: var(--text-secondary);- background: transparent;- font-size: var(--text-sm);- font-weight: var(--weight-medium);- text-align: left;-}--.generator-runtime__options button > span {- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}--.generator-runtime__options button:hover,-.generator-runtime__options button:focus-visible {- outline: 0;- color: var(--text-primary);- background: color-mix(in srgb, var(--success) 14%, transparent);}-.generator-runtime__options button[aria-selected="true"] {- color: var(--success);- background: var(--success-soft);-}--.generator-runtime__options button i {- width: 7px;- height: 7px;- border-radius: 50%;- background: var(--success);+.generator-board__empty {+ margin: var(--space-2) 0;+ color: var(--text-muted);+ font-size: var(--text-sm);}-/* Missing weights belong to the selected generator, so its selector uses the- same error treatment as the runtime indicator instead of looking ready. */-.generator-runtime--modelsMissing .generator-runtime__trigger {- border-color: var(--danger-line);- color: var(--danger);- background: color-mix(in srgb, var(--danger) 10%, var(--panel-2));+.generator-status {+ flex: 0 0 auto;}-.generator-runtime--modelsMissing .generator-runtime__trigger:hover,-.generator-runtime--modelsMissing .generator-runtime__select--open .generator-runtime__trigger {- border-color: var(--danger);- background: color-mix(in srgb, var(--danger) 16%, var(--panel-2));+.generator-status__runtime {+ color: var(--warning);}-.generator-runtime--modelsMissing .generator-runtime__trigger:focus-visible {- border-color: var(--danger);-}+/* --- The generator picker ---------------------------------------------------+ A neutral ComboBox; the engine's readiness is the 8px glyph in front of it,+ coloured by state. The name ellipsises (with the full name in the tooltip)+ rather than scrolling sideways, and the box grows to 240px before it does.+ ========================================================================== */-.generator-runtime--modelsMissing .generator-runtime__options {- border-color: var(--danger-line);- background: color-mix(in srgb, var(--danger) 9%, var(--panel-2));- scrollbar-color: var(--danger-line) transparent;+.generator-runtime {+ min-width: 0;+ display: inline-flex;+ align-items: center;+ gap: var(--space-2);+ padding-left: var(--space-2);}-.generator-runtime--modelsMissing .generator-runtime__options button:hover,-.generator-runtime--modelsMissing .generator-runtime__options button:focus-visible {- background: color-mix(in srgb, var(--danger) 14%, transparent);+.generator-runtime > i {+ width: 8px;+ height: 8px;+ flex: 0 0 auto;+ border-radius: 50%;+ background: var(--text-faint);}-.generator-runtime--modelsMissing .generator-runtime__options button[aria-selected="true"] {- color: var(--danger);- background: color-mix(in srgb, var(--danger) 12%, transparent);-}+.generator-runtime--ready > i { background: var(--success); }+.generator-runtime--demo > i { background: var(--warning); }-.generator-runtime--modelsMissing .generator-runtime__options button i {+.generator-runtime--runtimeMissing > i,+.generator-runtime--modelsMissing > i,+.generator-runtime--incompatible > i,+.generator-runtime--unavailable > i {background: var(--danger);}-@media (prefers-reduced-motion: reduce) {- .generator-runtime__value--overflow > span {- max-width: 100%;- overflow: hidden;- text-overflow: ellipsis;- animation: none;- }+.generator-template {+ min-width: 140px;+ max-width: 240px;}-.generator-runtime__status {+.generator-template .ui-combo__value {+ overflow: hidden;+ text-overflow: ellipsis;white-space: nowrap;}-.generator-runtime--ready {- border-color: var(--success-line);- color: var(--success);- background: var(--success-soft);-}--.generator-runtime--demo {- border-color: var(--warning-line);- color: var(--warning);- background: var(--warning-soft);-}--.generator-runtime--runtimeMissing,-.generator-runtime--modelsMissing,-.generator-runtime--incompatible,-.generator-runtime--unavailable {- border-color: var(--danger-line);- color: var(--danger);- background: color-mix(in srgb, var(--danger) 10%, transparent);-}+/* --- The board ----------------------------------------------------------------/* --- The board column ------------------------------------------------------ */+ Every scene in the project as a 32px group header — the Explorer "group by"+ look: a chevron, the name, a caption, and a divider underneath — with its+ shots as tiles in an auto-filling grid below it.+ ========================================================================== */-.generator-main {- min-width: 0;- min-height: 0;- overflow-y: auto;- padding: var(--space-6) var(--space-7) var(--space-8);+.scene-board {+ display: flex;+ flex-direction: column;+ padding-bottom: var(--space-4);}-.generator-heading {+.scene-section {+ position: relative;display: flex;- justify-content: space-between;- align-items: flex-end;- gap: var(--space-5);- max-width: var(--content-max);- margin: 0 auto var(--space-5);+ flex-direction: column;}-.generator-heading__title h1 {- margin: var(--space-2) 0 var(--space-1);- font-size: var(--text-2xl);- font-weight: var(--weight-semibold);- line-height: var(--leading-tight);+.scene-section--dragging {+ opacity: 0.45;}-.generator-heading__title p {- margin: 0;- color: var(--text-muted);- font-size: var(--text-sm);- line-height: var(--leading-snug);+/* A 2px accent bar where a dragged scene would land. */+.scene-section--drop-before::before,+.scene-section--drop-after::after {+ content: "";+ position: absolute;+ left: 0;+ right: 0;+ z-index: 1;+ height: 2px;+ border-radius: 1px;+ background: var(--accent);+ pointer-events: none;}-.generator-heading__actions {+.scene-section--drop-before::before { top: -1px; }+.scene-section--drop-after::after { bottom: -1px; }++/* --- The scene header ------------------------------------------------------- */++.scene-rule {+ min-width: 0;+ min-height: var(--control-md);display: flex;- flex-wrap: wrap;align-items: center;- gap: var(--space-3);+ gap: var(--space-1);+ border-bottom: 1px solid var(--line);}-/* --- The board --------------------------------------------------------------- Every scene in the project, each one a row of shot cards reading left to- right in the order they play, with the scene's own line drawn between one- row and the next.- ========================================================================== */--.scene-board {- max-width: var(--content-max);- margin: 0 auto;- display: flex;- flex-direction: column;- gap: var(--space-6);- padding-bottom: var(--space-6);+.scene-rule__toggle,+.scene-rule__action {+ width: var(--control-sm);+ height: var(--control-sm);+ flex: 0 0 auto;+ display: grid;+ place-items: center;+ padding: 0;+ border: 0;+ border-radius: var(--radius-sm);+ color: var(--text-secondary);+ background: transparent;+ transition: var(--transition-control);}-.scene-section {- display: flex;- flex-direction: column;- gap: var(--space-3);+.scene-rule__toggle:hover,+.scene-rule__action:hover:not(:disabled) {+ background: var(--fill-subtle-hover);}-/* --- The scene line ---------------------------------------------------------- The rule that separates one scene's shots from the next one's, and the only- way into the scene's own settings. */+.scene-rule__toggle:active,+.scene-rule__action:active:not(:disabled) {+ background: var(--fill-subtle-pressed);+}-.scene-rule {- display: flex;- flex-wrap: wrap;- align-items: center;- gap: var(--space-3);- width: 100%;- padding: var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-lg);- background: var(--panel);+.scene-rule__action:disabled {+ color: var(--text-disabled);}-.scene-section--current > .scene-rule {- border-color: var(--accent);- background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel));+.scene-rule__action > span {+ display: grid;+ place-items: center;}-.generator-heading__cancel {- width: auto;- min-height: var(--control-md);- padding: 0 var(--space-3);- font-size: var(--text-base);+.scene-rule__cancel {+ color: var(--danger);}.scene-rule__drag {- width: var(--control-sm);+ width: var(--space-5);height: var(--control-sm);flex: 0 0 auto;display: grid;@@ -358,7 +226,7 @@.scene-rule__drag:hover {color: var(--text-primary);- background: var(--panel-2);+ background: var(--fill-subtle-hover);}.scene-rule__drag:active {@@ -366,13 +234,13 @@}.scene-rule__summary {- flex: 1 1 280px;+ flex: 1 1 auto;min-width: 0;min-height: var(--control-sm);display: flex;align-items: center;- gap: var(--space-3);- padding: var(--space-2) 0;+ gap: var(--space-2);+ padding: 0 var(--space-1);border: 0;border-radius: var(--radius-sm);color: inherit;@@ -380,19 +248,21 @@text-align: left;}-.scene-rule__summary:hover .scene-rule__text b {+.scene-rule__summary:hover {+ background: var(--fill-subtle-hover);+}++.scene-section--current .scene-rule__title {color: var(--accent-bright);}.scene-rule__status {- width: var(--space-6);- height: var(--space-6);+ width: var(--space-4);+ height: var(--space-4);flex: 0 0 auto;display: grid;place-items: center;- border-radius: var(--radius-sm);color: var(--accent-bright);- background: color-mix(in srgb, var(--accent) 22%, var(--panel-3));}.scene-rule__status--generating svg,@@ -400,331 +270,205 @@animation: spin 1.4s linear infinite;}-.scene-rule__status--completed,-.scene-rule__status--ready {- color: var(--success);- background: color-mix(in srgb, var(--success) 16%, var(--panel-3));-}--.scene-rule__status--changed {- color: var(--warning);- background: var(--warning-soft);-}+.scene-rule__status--completed { color: var(--success); }+.scene-rule__status--changed { color: var(--warning); }.scene-rule__status--failed,.scene-rule__status--cancelled {color: var(--danger);- background: color-mix(in srgb, var(--danger) 16%, var(--panel-3));}.scene-rule__status--draft {color: var(--text-muted);- background: var(--panel-3);}-.scene-rule__text {+.scene-rule__title {min-width: 0;- display: flex;- flex-direction: column;-}--.scene-rule__text b {overflow: hidden;color: var(--text-primary);- font-size: var(--text-md);+ font-size: var(--text-base);font-weight: var(--weight-semibold);line-height: var(--leading-snug);text-overflow: ellipsis;white-space: nowrap;}+.scene-rule__caption,.scene-rule__badge {flex: 0 0 auto;color: var(--text-muted);- font: var(--weight-semibold) var(--text-2xs) / var(--leading-snug) var(--font-mono);+ font-size: var(--text-xs);+ white-space: nowrap;+}++.scene-rule__badge {+ padding: 0 var(--space-2);+ border: 1px solid var(--line);+ border-radius: var(--radius-sm);+ line-height: 18px;}.scene-rule__length {- flex: 0 0 auto;+ flex: 0 1 120px;+ min-width: 64px;display: flex;align-items: center;- gap: var(--space-2);- min-height: var(--control-sm);- color: var(--text-muted);- font-size: var(--text-xs);- font-weight: var(--weight-semibold);+ padding: 0 var(--space-2);}.scene-rule__length input[type="range"] {- width: 150px;- max-width: 18vw;- accent-color: var(--accent);+ width: 100%;}-.scene-rule__length b {- min-width: 4.5ch;- color: var(--text-primary);- font-family: var(--font-mono);- font-size: var(--text-2xs);-}+/* --- One shot, as a tile -------------------------------------------------------.scene-rule__generate {- width: auto;- flex: 0 0 auto;- white-space: nowrap;-}+ The tile is a SUMMARY and a target: a frame, the name and times, one line+ of the shot's words. 4px corners and a hairline edge like any Fluent grid+ item; hover is a fill, the open shot an accent fill with an accent edge.+ The grid auto-fills 200px-and-up columns, so it needs no breakpoints.+ ========================================================================== */-/* The line itself: what actually separates one scene from the next. */-.scene-rule__line {- flex: 1 1 auto;- height: 1px;- background: var(--line-strong);+.shot-grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));+ gap: var(--space-2);+ margin: 0;+ padding: var(--space-2) 0 var(--space-3);+ list-style: none;}-/* --- Length, and the bar the scene is split on ----------------------------- */-.scene-bar {- padding: var(--space-4);- border: 1px solid var(--line);- border-radius: var(--radius-lg);- background: var(--panel);+/* List density: one 28px row per shot, no frames. */+.scene-board--list .shot-grid {+ grid-template-columns: minmax(0, 1fr);+ gap: 2px;}-.scene-bar__head {+.shot-slot {+ position: relative;+ min-width: 0;display: flex;- flex-wrap: wrap;- align-items: center;- justify-content: space-between;- gap: var(--space-2) var(--space-4);- margin-bottom: var(--space-3);}-.scene-bar__length {- display: flex;- align-items: center;- gap: var(--space-3);- min-height: var(--control-sm);-}--.scene-bar__length > span {- color: var(--text-secondary);- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.scene-bar__length input[type="range"] {- width: 240px;- max-width: 44vw;- accent-color: var(--accent);-}--.scene-bar__length b {- min-width: 5ch;- color: var(--text-primary);- font-family: var(--font-mono);- font-size: var(--text-2xs);- font-weight: var(--weight-semibold);-}--.scene-bar__range {- color: var(--text-muted);- font-size: var(--text-xs);- line-height: var(--leading-snug);-}--/* One segment per shot, sized by how long it runs. The line between two of- them is the cut, and it is what gets dragged. */-.scene-bar__track {- display: flex;- min-height: 56px;- border: 1px solid var(--line);- border-radius: var(--radius-md);- background: var(--panel-2);- overflow: hidden;- touch-action: none;-}--.scene-bar__shot {- position: relative;- min-width: 0;- display: flex;-}--.scene-bar__shot + .scene-bar__shot {- border-left: 1px solid var(--line-strong);-}--.scene-bar__label {- flex: 1 1 auto;- min-width: 0;- display: flex;- flex-direction: column;- justify-content: center;- gap: var(--space-1);- padding: var(--space-2) var(--space-3);- border: 0;- color: var(--text-secondary);- background: none;- text-align: left;-}--.scene-bar__label:hover {- color: var(--text-primary);-}--.scene-bar__label b {- overflow: hidden;- white-space: nowrap;- text-overflow: ellipsis;- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.scene-bar__label em {- color: var(--text-faint);- font-family: var(--font-mono);- font-size: var(--text-2xs);- font-style: normal;- line-height: var(--leading-snug);-}--/* Wide enough to grab, drawn as the hairline it represents. */-.scene-bar__handle {- position: absolute;- inset-block: 0;- left: calc(var(--space-3) * -1);- z-index: 1;- width: var(--space-5);- padding: 0;- border: 0;- background: none;- cursor: ew-resize;-}--.scene-bar__handle::before {+/* The 2px accent insertion bar, between tiles (or rows in the list). */+.shot-slot--drop-before::before,+.shot-slot--drop-after::after {content: "";position: absolute;- inset-block: var(--space-2);- left: 50%;- width: 2px;- border-radius: var(--radius-pill);- background: var(--line-strong);- transform: translateX(-50%);-}--.scene-bar__handle:hover::before,-.scene-bar__handle:focus-visible::before {- background: var(--accent-bright);-}--.scene-bar__handle:disabled {- cursor: default;+ z-index: 1;+ border-radius: 1px;+ background: var(--accent);+ pointer-events: none;}-/* --- One shot, as a card ------------------------------------------------------ The card is a SUMMARY and a target: a picture, the line, the settings. It- carries no control of its own, because a card that both opens a shot and- changes it is a card you cannot click.- ========================================================================== */--.shot-grid {- display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));- gap: var(--space-3);- margin: 0;- padding: 0;- list-style: none;-}+.shot-slot--drop-before::before { top: -2px; bottom: -2px; left: -5px; width: 2px; }+.shot-slot--drop-after::after { top: -2px; bottom: -2px; right: -5px; width: 2px; }-.shot-grid > li {- min-width: 0;- display: flex;-}+.scene-board--list .shot-slot--drop-before::before { inset: -2px 0 auto; width: auto; height: 2px; }+.scene-board--list .shot-slot--drop-after::after { inset: auto 0 -2px; width: auto; height: 2px; }.shot-card {width: 100%;min-width: 0;display: flex;flex-direction: column;- gap: var(--space-2);- padding: var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-lg);+ gap: var(--space-1);+ padding: 6px;+ border: 1px solid var(--stroke-card);+ border-radius: var(--radius-sm);color: inherit;- background: var(--panel);+ background: var(--card);text-align: left;+ transition: var(--transition-control);}.shot-card:hover {- border-color: var(--line-hover);- background: var(--panel-2);+ background: var(--card-hover);}-.shot-card--open {+.shot-card--open,+.shot-card--open:hover {border-color: var(--accent);background: var(--accent-soft);}-/* The picture and the editor affordance are separate controls: clicking the- picture plays this shot; clicking the copy still opens its settings. */+.shot-card--dragging {+ opacity: 0.45;+}++.scene-board--list .shot-card {+ min-height: 28px;+ padding: 2px var(--space-2);+ justify-content: center;+}++/* The frame and the text are separate controls: clicking the frame plays+ this shot; clicking the text opens its settings. */.shot-card__open-control {min-width: 0;display: flex;flex: 1;flex-direction: column;- gap: var(--space-2);+ gap: 2px;padding: 0;border: 0;+ border-radius: 2px;color: inherit;background: none;text-align: left;}-.shot-card:focus-within {- border-color: var(--accent-bright);+.scene-board--list .shot-card__open-control {+ flex-direction: row;+ align-items: center;+ gap: var(--space-3);}.shot-card__head {+ min-width: 0;display: flex;align-items: baseline;justify-content: space-between;gap: var(--space-2);+ font-size: var(--text-xs);+ line-height: 16px;+}++.scene-board--list .shot-card__head {+ flex: 0 0 auto;+ min-width: 180px;}.shot-card__head > b {+ min-width: 0;+ overflow: hidden;color: var(--text-primary);- font-size: var(--text-sm);font-weight: var(--weight-semibold);- line-height: var(--leading-snug);+ text-overflow: ellipsis;+ white-space: nowrap;}.shot-card__head > em {- color: var(--text-faint);- font-family: var(--font-mono);- font-size: var(--text-2xs);+ flex: 0 0 auto;+ color: var(--text-muted);font-style: normal;+ font-variant-numeric: tabular-nums;+ white-space: nowrap;}-/* Three lines of the shot's own words. Clamped rather than scrolled: the whole- line is one click away in the panel, and a card that scrolls is a card that- eats the gesture meant to open it. */+/* One line of the shot's own words, ellipsised; the full line is in the+ tooltip and in the inspector. */.shot-card__line {- display: -webkit-box;- -webkit-box-orient: vertical;- -webkit-line-clamp: 3;- line-clamp: 3;+ min-width: 0;overflow: hidden;- min-height: calc(3 * var(--text-sm) * var(--leading-normal));color: var(--text-secondary);- font-size: var(--text-sm);- line-height: var(--leading-normal);+ font-size: var(--text-xs);+ line-height: 16px;+ text-overflow: ellipsis;+ white-space: nowrap;}.shot-card__line--empty {color: var(--text-faint);- font-style: italic;}/* A cited reference reads as the thing it points at, not as the token that@@ -739,49 +483,26 @@display: flex;flex-wrap: wrap;gap: var(--space-1);+ overflow: hidden;+ max-height: var(--control-sm);}+/* Chips everywhere in the Generator: 24px, 4px corners, 12px text. */.shot-card__tag {- padding: 2px var(--space-2);+ min-height: 20px;+ display: inline-flex;+ align-items: center;+ padding: 0 6px;border: 1px solid var(--line);- border-radius: var(--radius-pill);+ border-radius: var(--radius-sm);color: var(--text-secondary);- background: var(--panel-2);+ background: var(--fill-control);font-size: var(--text-2xs);font-style: normal;- line-height: 1.6;-}--.shot-card__tag--none {- border-color: transparent;- background: none;- color: var(--text-faint);-}--/* The one card that is a control: it adds the next shot to this scene. Drawn- as an outline so it never reads as a shot that already exists. */-.shot-card--add {- min-height: 100%;- align-items: center;- justify-content: center;- gap: var(--space-2);- border-style: dashed;- color: var(--text-muted);- background: none;-}--.shot-card--add:hover {- border-color: var(--accent-bright);- color: var(--accent-bright);- background: var(--accent-soft);-}--.shot-card--add span {- font-size: var(--text-sm);- font-weight: var(--weight-semibold);+ line-height: 16px;}-/* --- The frame a card shows -------------------------------------------------+/* --- The frame a tile shows ---------------------------------------------------A real frame of the shot once the scene has been rendered, and nothinginvented before that: the placeholder says which state the scene is in@@ -798,14 +519,9 @@justify-content: center;gap: var(--space-1);overflow: hidden;- border-radius: var(--radius-md);+ border-radius: 2px;color: var(--text-muted);background-color: var(--panel-3);- background-image: repeating-linear-gradient(- 135deg,- var(--hatch) 0 6px,- transparent 6px 12px- );}.shot-thumb img {@@ -814,13 +530,6 @@object-fit: cover;}-.scene-card--add {- width: min(100%, var(--content-max));- min-height: 88px;- flex: 0 0 auto;- margin: 0 auto;-}-.shot-thumb video {width: 100%;height: 100%;@@ -904,191 +613,286 @@transition: width var(--motion-normal) linear;}-/* --- The controls a shot's panel is made of -------------------------------- */+/* --- The inspector pane --------------------------------------------------------.shot-card__start {+ One shot, or one scene. Which one is showing is decided by what was clicked+ on the board, and the two never appear at once: a pane that edits a shot+ and its scene side by side is a pane where nobody knows which "length"+ they are looking at. Its width is the splitter's.+ ========================================================================== */++.generator-panel {+ min-width: 0;+ min-height: 0;+ display: flex;+ flex-direction: column;+ background: var(--panel);+}++/* A 40px pane header: the (editable) name at 14px semibold, a delete button+ at the trailing edge; a shot's header leads with its scene as the way back+ up. */+.panel-head {+ flex: 0 0 auto;+ min-width: 0;+ min-height: var(--space-7);display: flex;align-items: center;- gap: var(--space-2);- margin-left: auto;+ gap: var(--space-1);+ padding: 0 var(--space-1) 0 var(--space-2);+ border-bottom: 1px solid var(--line);}-.shot-card__start > span {- color: var(--text-muted);- font-size: var(--text-xs);+.panel-head__title {+ flex: 1 1 auto;+ min-width: 0;+ margin: 0;+ font-size: var(--text-base);+ font-weight: var(--weight-semibold);line-height: var(--leading-snug);}-.shot-card__start input {- width: 8ch;- height: var(--control-sm);+/* Reads as the heading it sits in until it is hovered or focused; focus is+ the TextBox underline. */+.panel-title__name {+ width: 100%;+ min-width: 0;+ height: var(--control-md);padding: 0 var(--space-2);- border: 1px solid var(--line);+ border: 1px solid transparent;border-radius: var(--radius-sm);color: var(--text-primary);- background: var(--panel-2);- font-family: var(--font-mono);- font-size: var(--text-2xs);-}--.shot-card__start input:disabled {- color: var(--text-faint);- cursor: default;+ background: none;+ font: inherit;+ text-overflow: ellipsis;}-.shot-card__start em {- color: var(--text-faint);- font-family: var(--font-mono);- font-size: var(--text-2xs);- font-style: normal;+.panel-title__name:hover:not(:focus) {+ background: var(--fill-subtle-hover);}-/* The line itself. Biggest type on the screen after the page title, because it- is the thing the whole screen exists to collect. */-.shot-card__action {- display: block;+.panel-title__name:focus {+ border-color: var(--stroke-control);+ border-bottom-color: var(--field-focus-line);+ outline: none;+ background: var(--fill-input-focus);+ box-shadow: inset 0 -1px 0 var(--field-focus-line);}-.shot-card__sublabel {- display: block;- margin-bottom: var(--space-2);- color: var(--text-secondary);- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);+.panel-title__name::placeholder {+ color: var(--text-primary);+ opacity: 1;}-.shot-action-editor {+.panel-head__up {+ flex: 0 1 auto;+ min-width: 0;+ max-width: 45%;+ height: var(--control-sm);+ padding: 0 var(--space-1);overflow: hidden;- border: 1px solid var(--line-strong);- border-radius: var(--radius-md);- background: var(--panel-2);-}--.shot-action-editor:focus-within {- border-color: var(--accent);-}--/* A composite text field: the TextBox underline, not a ring. */-.shot-action-editor:has(textarea:focus-visible) {- border-bottom-color: var(--field-focus-line);- box-shadow: inset 0 -1px 0 var(--field-focus-line);+ border: 0;+ border-radius: var(--radius-sm);+ color: var(--text-secondary);+ background: none;+ font-size: var(--text-base);+ text-align: left;+ text-overflow: ellipsis;+ white-space: nowrap;}-.shot-card__action textarea {- width: 100%;- min-height: 160px;- padding: var(--space-3);- border: 0;- border-radius: 0;- outline: 0;- box-shadow: none; /* .shot-action-editor draws the underline */+.panel-head__up:hover {color: var(--text-primary);- background: transparent;- font-family: var(--font-sans);- font-size: var(--text-sm);- line-height: var(--leading-normal);- resize: vertical;+ background: var(--fill-subtle-hover);}-.shot-card__action textarea:disabled {+.panel-head__sep {+ flex: 0 0 auto;color: var(--text-muted);- cursor: default;}-.shot-speech {- margin-top: 0;+.panel-head__delete {+ flex: 0 0 auto;}-.shot-speech__heading {- display: flex;- align-items: end;- justify-content: space-between;- gap: var(--space-3);- margin-bottom: var(--space-2);-}+.status-icon {+ width: var(--control-sm);+ height: var(--control-sm);+ flex: 0 0 auto;+ display: grid;+ place-items: center;+ color: var(--accent-bright);+}-.shot-speech__heading > .shot-card__sublabel {- margin-bottom: 0;+.status-icon--generating svg,+.status-icon--ready svg {+ animation: spin 1.4s linear infinite;+}++.status-icon--completed { color: var(--success); }+.status-icon--changed { color: var(--warning); }++.status-icon--failed,+.status-icon--cancelled {+ color: var(--danger);}-.shot-speech__language {+.status-icon--draft {+ color: var(--text-muted);+}++/* The pane's scrolling middle. It takes what the head and the debug row+ leave, and scrolls inside it. */+.panel-scroll {+ flex: 1 1 auto;+ min-width: 0;+ min-height: 0;display: flex;- align-items: center;- gap: var(--space-2);+ flex-direction: column;+ gap: var(--space-3);+ padding: var(--space-2) var(--space-3) var(--space-3);+ overflow-y: auto;+}++.shot-inspector,+.scene-inspector {+ display: flex;+ flex-direction: column;+ gap: var(--space-3);+}++/* Inspector rows (PropRow) inside the pane, and the caption that explains+ one: 12px secondary, indented to line up with the row's value column. */+.prop-caption {+ margin: 0 0 var(--space-1);+ padding-left: calc(104px + var(--space-2));color: var(--text-muted);font-size: var(--text-xs);+ line-height: var(--leading-snug);}-.shot-speech__language select {- min-height: var(--control-sm);- padding: 0 var(--space-7) 0 var(--space-3);- border: 1px solid var(--line-strong);- border-radius: var(--radius-sm);- color: var(--text-primary);- background: var(--panel-2);- font: inherit;+.prop-unit {+ flex: 0 0 auto;+ color: var(--text-muted);+ font-size: var(--text-xs);+ font-variant-numeric: tabular-nums;+ white-space: nowrap;+}++.prop-row__button.icon-button {+ width: var(--control-sm);+ height: var(--control-sm);+ flex: 0 0 auto;+}++.scene-settings .ui-prop-section__content {+ padding-inline: 0;+}++/* The full-width fields: a 12px label over a textarea. */+.shot-card__sublabel,+.scene-settings__field > span {+ display: block;+ margin-bottom: var(--space-1);+ color: var(--text-secondary);+ font-size: var(--text-xs);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);+}++.scene-settings__field {+ display: block;+ margin-top: var(--space-2);}+.scene-settings__field textarea,.shot-speech > textarea {width: 100%;- min-height: 112px;- padding: var(--space-3);- border: 1px solid var(--line-strong);- border-radius: var(--radius-md);- outline: 0;- color: var(--text-primary);- background: var(--panel-2);+ height: auto;+ min-height: 80px;+ padding: var(--space-2);font-family: var(--font-sans);- font-size: var(--text-sm);+ font-size: var(--text-base);line-height: var(--leading-normal);resize: vertical;}-.shot-speech > textarea:focus-visible {+.shot-speech {+ display: flex;+ flex-direction: column;+ gap: var(--space-1);+}++.shot-speech > .shot-card__sublabel {+ margin-bottom: 0;+}++/* The line itself: a composite text field (the textarea plus the chips that+ stand for the references it cites) with the TextBox underline on focus. */+.shot-action-editor {+ overflow: hidden;+ border: 1px solid var(--stroke-control);+ border-bottom-color: var(--stroke-control-bottom);+ border-radius: var(--radius-sm);+ background: var(--fill-control);+}++.shot-action-editor:has(textarea:focus-visible) {border-bottom-color: var(--field-focus-line);+ background: var(--fill-input-focus);box-shadow: inset 0 -1px 0 var(--field-focus-line);}-.shot-speech__hint {- margin: var(--space-2) 0 0;- color: var(--text-faint);- font-size: var(--text-2xs);+.shot-card__action textarea {+ width: 100%;+ min-height: 144px;+ padding: var(--space-2);+ border: 0;+ border-radius: 0;+ outline: 0;+ box-shadow: none; /* .shot-action-editor draws the underline */+ color: var(--text-primary);+ background: transparent;+ font-family: var(--font-sans);+ font-size: var(--text-base);+ line-height: var(--leading-normal);+ resize: vertical;+}++.shot-card__action textarea:disabled {+ color: var(--text-muted);}-/* Reference controls are part of the description box instead of a second- readback of the same sentence. Each select is one token occurrence. */+/* One ComboBox per cited reference, as a 24px chip. */.shot-action-editor__chips {display: flex;flex-wrap: wrap;align-items: center;- gap: var(--space-2);- padding: var(--space-2) var(--space-3) var(--space-3);+ gap: var(--space-1);+ padding: var(--space-1) var(--space-2) var(--space-2);border-top: 1px solid var(--line);}-.reference-smart-chip {- min-height: var(--control-sm);+.ui-combo.reference-smart-chip {+ min-width: 0;max-width: 100%;- padding: 0 var(--space-3);- border: 1px solid var(--accent);- border-radius: var(--radius-pill);+ height: var(--control-sm);+ min-height: var(--control-sm);+ padding-inline: var(--space-2);+ border-color: var(--accent-line);color: var(--text-primary);background: var(--accent-soft);- font-family: var(--font-sans);font-size: var(--text-xs);- font-weight: var(--weight-semibold);}-.reference-smart-chip--broken {- border-color: var(--danger);- background: color-mix(in srgb, var(--danger) 16%, transparent);+.ui-combo.reference-smart-chip--broken {+ border-color: var(--danger-line);+ background: var(--danger-soft);}/* --- Settings on a shot ---------------------------------------------------- */.shot-settings {- margin-top: 0;padding-top: var(--space-3);border-top: 1px solid var(--line);}@@ -1096,8 +900,8 @@.shot-settings__chips {display: flex;flex-wrap: wrap;- gap: var(--space-2);- margin: 0 0 var(--space-3);+ gap: var(--space-1);+ margin: 0 0 var(--space-2);padding: 0;list-style: none;}@@ -1105,46 +909,47 @@.shot-settings__none {color: var(--text-faint);font-size: var(--text-xs);- line-height: var(--leading-snug);+ line-height: var(--control-sm);}+/* A token: 24px, 4px corners, 12px text, a small square remove button. */.setting-tag {display: inline-flex;align-items: center;- gap: var(--space-2);- min-height: var(--control-sm);- padding: 0 var(--space-1) 0 var(--space-3);- border: 1px solid var(--line-strong);- border-radius: var(--radius-pill);- background: var(--panel-2);+ gap: var(--space-1);+ height: var(--control-sm);+ padding: 0 2px 0 var(--space-2);+ border: 1px solid var(--stroke-control);+ border-radius: var(--radius-sm);+ background: var(--fill-control);+ font-size: var(--text-xs);}.setting-tag em {- color: var(--text-faint);- font-size: var(--text-2xs);+ color: var(--text-muted);font-style: normal;}.setting-tag b {color: var(--text-primary);- font-size: var(--text-xs);font-weight: var(--weight-semibold);}.setting-tag button {display: grid;place-items: center;- width: var(--space-6);- height: var(--space-6);+ width: 20px;+ height: 20px;padding: 0;border: 0;- border-radius: var(--radius-pill);- color: var(--text-muted);+ border-radius: 2px;+ color: var(--text-secondary);background: none;}.setting-tag button:hover:not(:disabled) {- color: var(--danger);+ color: var(--text-primary);+ background: var(--fill-subtle-hover);}.shot-settings__add {@@ -1154,150 +959,17 @@gap: var(--space-2);}-.shot-settings__add select,-.scene-settings select {- height: var(--field-height);- max-width: 100%;- padding: 0 var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-sm);- color: var(--text-primary);- background: var(--panel-2);- font-family: var(--font-sans);- font-size: var(--text-sm);-}-.shot-settings__help {color: var(--text-muted);font-size: var(--text-xs);line-height: var(--leading-snug);}-/* --- What belongs to the whole scene --------------------------------------- */--.scene-settings {- padding: 0;- border: 0;- border-radius: 0;- background: transparent;-}--.scene-settings h3 {- margin: 0 0 var(--space-3);- color: var(--text-primary);- font-size: var(--text-sm);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.scene-settings__field {- display: block;-}--.scene-settings__field + .scene-settings__field {- margin-top: var(--space-3);-}--.scene-settings__field > span {- display: block;- margin-bottom: var(--space-1);- color: var(--text-secondary);- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.scene-settings + .scene-settings {- padding-top: var(--space-3);- border-top: 1px solid var(--line);-}--.scene-settings__start-frame {- display: grid;- grid-template-columns: minmax(0, 1fr) auto;- gap: var(--space-2);-}--.scene-settings__start-frame select {- width: 100%;-}--.scene-settings__start-frame button {- min-height: var(--field-height);- gap: var(--space-2);- padding-inline: var(--space-3);- white-space: nowrap;-}--.scene-settings__field .scene-settings__error {- color: var(--danger);-}--.scene-settings__numbers {- display: grid;- grid-template-columns: 1fr 1fr;- gap: var(--space-3);- margin-top: var(--space-3);-}--.scene-settings > h3 + .scene-settings__numbers {- margin-top: 0;-}--.scene-settings__numbers .scene-settings__field + .scene-settings__field {- margin-top: 0;-}--.scene-settings__numbers + .scene-settings__field {- margin-top: var(--space-3);-}--.scene-settings__numbers input {- width: 100%;- height: var(--field-height);- padding: 0 var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-sm);- color: var(--text-primary);- background: var(--panel-2);- font-family: var(--font-mono);- font-size: var(--text-sm);-}--.scene-settings__field textarea {- width: 100%;- min-height: 112px;- padding: var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-sm);- color: var(--text-primary);- background: var(--panel-2);- font-family: var(--font-sans);- font-size: var(--text-base);- line-height: var(--leading-normal);- resize: vertical;-}--.scene-settings__field small {- display: block;- margin-top: var(--space-2);- color: var(--text-muted);- font-size: var(--text-xs);- line-height: var(--leading-normal);-}--.scene-settings__field code {- font-family: var(--font-mono);- font-size: var(--text-2xs);-}-/* --- References that can be dropped into a line ---------------------------- */.reference-palette {- padding: var(--space-3) 0 0;+ padding-top: var(--space-3);border-top: 1px solid var(--line);- border-radius: 0;- background: transparent;}.reference-palette__lead {@@ -1310,8 +982,8 @@.reference-palette ul {display: flex;flex-wrap: wrap;- gap: var(--space-2);- margin: var(--space-3) 0 0;+ gap: var(--space-1);+ margin: 0 0 var(--space-2);padding: 0;list-style: none;}@@ -1320,295 +992,48 @@margin: 0;}+/* Draggable reference tokens: 24px chips with 4px corners. */.reference-chip {- display: flex;- flex-direction: column;- gap: 2px;- min-height: var(--control-sm);max-width: 26ch;- padding: var(--space-2) var(--space-3);- border: 1px solid var(--line-strong);- border-radius: var(--radius-md);+ height: var(--control-sm);+ display: inline-flex;+ align-items: center;+ gap: var(--space-1);+ padding: 0 var(--space-2);+ border: 1px solid var(--stroke-control);+ border-radius: var(--radius-sm);color: var(--text-primary);- background: var(--panel-2);+ background: var(--fill-control);+ font-size: var(--text-xs);text-align: left;cursor: grab;+ transition: var(--transition-control);}.reference-chip:hover:not(:disabled) {- border-color: var(--accent-bright);- background: var(--accent-soft);+ background: var(--fill-control-hover);}.reference-chip:disabled {+ color: var(--text-disabled);cursor: default;- opacity: 0.55;}.reference-chip em {- color: var(--text-faint);- font-size: var(--text-2xs);+ flex: 0 0 auto;+ color: var(--text-muted);font-style: normal;}.reference-chip b {+ min-width: 0;overflow: hidden;- white-space: nowrap;- text-overflow: ellipsis;- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.reference-palette__broken {- margin: var(--space-3) 0 0;- padding: var(--space-3);- border: 1px solid var(--danger);- border-radius: var(--radius-md);- color: var(--text-secondary);- background: color-mix(in srgb, var(--danger) 12%, transparent);- font-size: var(--text-xs);- line-height: var(--leading-normal);-}---/* --- The compiled prompt --------------------------------------------------- */--/* Shown before anything is committed, and coloured by authorship, because the- one thing this panel must never do is let Slopus's own scaffolding read as- the user's writing. */-.compiled-prompt {- margin-top: var(--space-4);- padding: var(--space-4);- border: 1px solid var(--line);- border-radius: var(--radius-lg);- background: var(--panel);-}--.compiled-prompt__title {- display: block;- color: var(--text-primary);- font-size: var(--text-sm);font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.compiled-prompt__key {- display: flex;- flex-wrap: wrap;- gap: var(--space-2) var(--space-4);- margin: var(--space-2) 0 var(--space-3);-}--.compiled-prompt__swatch {- display: inline-flex;- align-items: center;- gap: var(--space-2);- color: var(--text-muted);- font-size: var(--text-xs);- font-style: normal;- line-height: var(--leading-snug);-}--.compiled-prompt__swatch::before {- content: "";- width: 12px;- height: 12px;- border-radius: var(--radius-xs);- background: currentColor;-}--.compiled-prompt__swatch--brief::before {- background: var(--success);-}--.compiled-prompt__swatch--tag::before {- background: var(--accent-bright);-}--.compiled-prompt__swatch--frame::before {- background: var(--text-faint);-}--.compiled-prompt__text {- user-select: text;- max-height: 280px;- margin: 0;- overflow: auto;- padding: var(--space-3);- border-radius: var(--radius-md);- background: var(--bg);- color: var(--text-faint);- font-family: var(--font-mono);- font-size: var(--text-xs);- line-height: var(--leading-normal);- white-space: pre-wrap;- overflow-wrap: anywhere;-}--.prompt-part--brief {- color: var(--success);- font-weight: var(--weight-medium);-}--.prompt-part--tag {- color: var(--accent-bright);- font-weight: var(--weight-medium);-}--.compiled-prompt small {- display: block;- margin-top: var(--space-2);- color: var(--text-muted);- font-size: var(--text-xs);- line-height: var(--leading-snug);-}--/* --- The panel --------------------------------------------------------------- One shot, or one scene. Which one is showing is decided by what was clicked- on the board, and the two never appear at once: a screen that edits a shot- and its scene side by side is a screen where nobody knows which "length"- they are looking at.- ========================================================================== */--.generator-panel {- min-width: 0;- min-height: 0;- display: flex;- flex-direction: column;- border-left: 1px solid var(--line);- background: var(--panel);-}--.panel-head {- flex: 0 0 auto;- padding: var(--space-3);- border-bottom: 1px solid var(--line);-}--.panel-head h2 {- display: flex;- flex-wrap: wrap;- align-items: baseline;- gap: var(--space-2);- margin: 0;- color: var(--text-primary);- font-size: var(--text-xl);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.panel-head h2 small {- color: var(--text-muted);- font-size: var(--text-xs);- font-weight: var(--weight-regular);- letter-spacing: 0;-}--.panel-head__shot-title,-.panel-head__scene-title {- display: flex;- align-items: center;- gap: var(--space-2);-}--.panel-head__shot-title h2 {- min-width: 0;- flex: 1 1 auto;-}--.panel-head__scene-title .job-title {- min-width: 0;- flex: 1 1 auto;-}--.panel-head__scene-title .job-title > div {- flex: 1 1 auto;-}--.shot-title__name {- width: 100%;- min-width: 0;- padding: 2px var(--space-1);- margin-left: calc(var(--space-1) * -1);- border: 1px solid transparent;- border-radius: var(--radius-sm);- color: inherit;- background: none;- font: inherit;- letter-spacing: inherit;-}--.shot-title__name:hover:not(:disabled),-.shot-title__name:focus {- border-color: var(--accent-bright);- background: var(--panel-2);- outline: none;-}--.shot-title__name::placeholder {- color: var(--text-primary);- opacity: 1;-}--/* The way back up to the scene, which is the same place its line on the board- opens — so a shot is never a dead end. */-.panel-head__up {- display: block;- max-width: 100%;- margin-bottom: var(--space-2);- padding: 0;- overflow: hidden;- border: 0;- border-radius: var(--radius-xs);- color: var(--accent-bright);- background: none;- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);- text-align: left;text-overflow: ellipsis;white-space: nowrap;}-.panel-head__up:hover {- text-decoration: underline;-}--/* The scene panel keeps the title block it always had; in the shot panel the- heading is the shot number itself. */-.panel-head .job-title {- padding-bottom: 0;- border-bottom: 0;-}--/* --- One shot, opened -------------------------------------------------------- The panel is a single column, so the pieces a shot is made of stack rather- than sitting inside a card of their own. */--.shot-inspector {- display: flex;- flex-direction: column;- gap: var(--space-3);-}--.shot-inspector__timing {- display: flex;- flex-wrap: wrap;- align-items: center;- gap: var(--space-2);-}--.shot-inspector__timing .shot-card__start {- margin-left: 0;-}--.scene-inspector {- display: flex;- flex-direction: column;- gap: var(--space-3);-}+/* --- The compiled prompt (Debug prompt dialog) ----------------------------- */.debug-prompt {flex: 0 0 auto;@@ -1621,476 +1046,37 @@width: 100%;}-.debug-prompt-backdrop {- position: fixed;- z-index: 120;- inset: 0;- display: grid;- place-items: center;- padding: var(--space-5);- background: var(--scrim);-}--.debug-prompt-dialog {- width: min(880px, 100%);- max-height: calc(100dvh - 2 * var(--space-5));- min-height: 0;- display: flex;- flex-direction: column;- padding: var(--space-5);- border: 1px solid var(--stroke-surface);- border-radius: var(--radius-xl);- background: var(--dialog-bg);- box-shadow: var(--shadow);-}--.debug-prompt-dialog__header {- flex: 0 0 auto;- display: flex;- align-items: flex-start;- justify-content: space-between;- gap: var(--space-4);- margin-bottom: var(--space-4);-}--.debug-prompt-dialog__header h2 {- margin: 0;- color: var(--text-primary);- font-size: var(--text-xl);-}--.debug-prompt-dialog__header p {- margin: var(--space-1) 0 0;- color: var(--text-muted);+.debug-prompt-dialog__scene {+ margin: 0 0 var(--space-3);+ color: var(--text-secondary);overflow-wrap: anywhere;}-.debug-prompt-dialog .compiled-prompt__text {- min-height: 0;- max-height: none;- padding: var(--space-4);-}--.remove-dialog-backdrop {- position: fixed;- z-index: 120;- inset: 0;- display: grid;- place-items: center;- padding: var(--space-4);- background: var(--scrim);-}--.remove-dialog {- width: min(440px, 100%);- padding: var(--space-6);- border: 1px solid var(--stroke-surface);- border-radius: var(--radius-xl);- background: var(--dialog-bg);- box-shadow: var(--shadow);-}--.remove-dialog h2 {+/* Coloured by authorship, because the one thing it must never do is let+ Slopus's own scaffolding read as the user's writing. */+.compiled-prompt__text {+ user-select: text;+ max-height: min(60vh, 560px);margin: 0;- color: var(--text-primary);- font-size: var(--text-xl);-}--.remove-dialog p {- margin: var(--space-3) 0 var(--space-5);- color: var(--text-secondary);- line-height: var(--leading-normal);-}--.remove-dialog > div {- display: flex;- justify-content: flex-end;- gap: var(--space-2);-}-/* --- The panel's scrolling middle ----------------------------------------- */--.panel-scroll {- /* Takes what the head and the actions leave, and scrolls inside it — without- the grow the actions row is pushed off the bottom of the panel. */- flex: 1 1 auto;- min-width: 0;- min-height: 0;- display: flex;- flex-direction: column;- gap: var(--space-3);+ overflow: auto;padding: var(--space-3);- overflow-y: auto;-}--.job-title {- display: flex;- align-items: flex-start;- gap: var(--space-3);- padding-bottom: var(--space-4);- border-bottom: 1px solid var(--line);-}--.job-title > div {- min-width: 0;-}--.status-icon {- width: var(--control-md);- height: var(--control-md);- flex: 0 0 auto;- display: grid;- place-items: center;- border-radius: var(--radius-md);- color: var(--accent-bright);- background: color-mix(in srgb, var(--accent) 22%, var(--panel-3));-}--.status-icon--generating svg {- animation: spin 1.4s linear infinite;-}--.status-icon--completed,-.status-icon--ready {- color: var(--success);- background: color-mix(in srgb, var(--success) 16%, var(--panel-3));-}--.status-icon--changed {- color: var(--warning);- background: var(--warning-soft);-}--.status-icon--failed,-.status-icon--cancelled {- color: var(--danger);- background: color-mix(in srgb, var(--danger) 16%, var(--panel-3));-}--.status-icon--draft {- color: var(--text-muted);- background: var(--panel-3);-}--.job-title__badge {- display: inline-block;- color: var(--text-muted);- font: var(--weight-semibold) var(--text-2xs) / var(--leading-snug) var(--font-mono);-}--.job-title h2 {- margin: var(--space-1) 0 0;- color: var(--text-primary);- font-size: var(--text-lg);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--/* Reads as the heading it sits in until it is hovered or focused — the same- rule the track names follow. */-.job-title__name {- width: 100%;- min-width: 0;- padding: 2px var(--space-1);- margin-left: calc(var(--space-1) * -1);- border: 1px solid transparent;+ border: 1px solid var(--line);border-radius: var(--radius-sm);- color: inherit;- background: none;- font: inherit;- letter-spacing: inherit;- text-overflow: ellipsis;-}--.job-title__name:hover {- border-color: var(--line-strong);-}--.job-title__name:focus {- outline: none;- border-color: var(--accent-bright);- background: var(--panel-2);-}--.job-runtime-note {- padding: var(--space-4) 0;- border-bottom: 1px solid var(--line);-}--.job-refs > span,-.job-runtime-note > span {- display: block;- color: var(--text-secondary);- font-size: var(--text-xs);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.job-runtime-note p {- margin: var(--space-2) 0 0;- color: var(--text-secondary);- font-size: var(--text-base);- line-height: var(--leading-normal);-}--.job-runtime-note small {- display: block;- margin-top: var(--space-2);+ background: var(--layer-alt);color: var(--text-faint);- font-size: var(--text-2xs);font-family: var(--font-mono);- line-height: var(--leading-snug);-}--.job-meta {- display: grid;- grid-template-columns: repeat(2, minmax(0, 1fr));- gap: var(--space-4);- margin: 0;- padding: var(--space-4) 0;- border-bottom: 1px solid var(--line);-}--.job-meta dt {- color: var(--text-muted);font-size: var(--text-xs);- line-height: var(--leading-snug);-}--.job-meta dd {- margin: var(--space-1) 0 0;- overflow-wrap: anywhere;- color: var(--text-secondary);- font-size: var(--text-sm);- font-weight: var(--weight-medium);- line-height: var(--leading-snug);-}--.job-refs {- padding: var(--space-4) 0;- border-bottom: 1px solid var(--line);-}--.job-refs__empty {- margin: var(--space-2) 0 0;- color: var(--text-muted);- font-size: var(--text-sm);line-height: var(--leading-normal);-}--/* One row per project reference: its tick box, its swatch, its name and- whatever the compiler will or won't do with it. */-.job-ref {- display: grid;- grid-template-columns: auto 44px minmax(0, 1fr);- column-gap: var(--space-2);- align-items: center;- margin: var(--space-2) calc(var(--space-2) * -1) 0;- padding: var(--space-1) var(--space-2);- border-radius: var(--radius-sm);-}--.job-ref:hover {- background: var(--panel-2);-}--.job-ref--bound {- background: var(--accent-soft);-}--.job-ref input {- grid-row: 1 / 3;- margin: 0 var(--space-1) 0 0;- accent-color: var(--accent-bright);-}--.job-ref:has(input:disabled) {- cursor: default;-}--/* The reference's OWN picture at thumbnail size — the same file ReferencesView- shows full size, through the same component. This used to be a hardcoded- gradient, and since only --1 had a rule of its own, every reference but the- second wore the identical fabricated image over a real one sitting on disk.- A text definition, or an image file the project has lost, gets a marked tile:- a labelled placeholder, never invented art. */-.job-refs .ref-mini {- grid-row: 1 / 3;- display: grid;- place-items: center;- width: 40px;- height: 40px;- overflow: hidden;- border: 1px solid var(--line);- border-radius: var(--radius-sm);- background: var(--panel-3);- color: var(--text-muted);-}--.job-refs .ref-mini img {- width: 100%;- height: 100%;- object-fit: cover;-}--/* ReferenceImage says "Loading…" / "File not found" in words as well as an- icon. At 40px there is room for the icon only; the states still differ, and- the card in References spells both out in full. */-.job-refs .ref-mini .reference-image-fallback em {- display: none;-}--.job-refs b,-.job-refs small {- display: block;- overflow: hidden;- white-space: nowrap;- text-overflow: ellipsis;-}--.job-refs b {- color: var(--text-secondary);- font-size: var(--text-sm);- font-weight: var(--weight-semibold);- line-height: var(--leading-snug);-}--.job-refs small {- margin-top: var(--space-1);- color: var(--text-muted);- font-size: var(--text-xs);- 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;+ white-space: pre-wrap;overflow-wrap: anywhere;- color: var(--text-muted);- font-size: var(--text-xs);- line-height: var(--leading-snug);-}--/* --- Actions: the one obvious next step -------------------------------------- Pinned under the scrolling middle of the panel rather than carried along by- it: "Generate this scene" is the whole point of the screen and must not be- somewhere the user has to scroll to find. */--.job-actions {- flex: 0 0 auto;- padding: var(--space-4) var(--space-5);- border-top: 1px solid var(--line);- background: var(--panel);-}--.job-actions .primary-button,-.job-actions .danger-button {- width: 100%;- min-height: var(--control-lg);- font-size: var(--text-base);-}--.job-actions .secondary-button {- width: 100%;- min-height: var(--control-md);- font-size: var(--text-base);-}--/* The states that cannot produce a file still get real controls, so the user- is never left with prose and no way forward. */--.job-actions .primary-button:disabled {- color: var(--text-muted);- border-color: var(--line-strong);- background: var(--panel-3);- box-shadow: none;- opacity: 1;}-.job-actions__note {- display: flex;- align-items: center;- gap: var(--space-2);- margin: var(--space-3) 0 0;- color: var(--text-muted);- font-size: var(--text-sm);- line-height: var(--leading-normal);-}--/* The path a scene was saved to, which is a file name and reads as one. */-.job-actions__note code {- color: var(--text-secondary);- font: var(--weight-medium) var(--text-xs) / 1.4 var(--font-mono);- overflow-wrap: anywhere;+.prompt-part--brief {+ color: var(--success);+ font-weight: var(--weight-medium);}-/* Encoding is the one thing in this panel that is HAPPENING rather than- waiting to be started, so its icon turns. */-.job-actions__note .spin {- flex: 0 0 auto;+.prompt-part--tag {color: var(--accent-bright);- animation: spin 1.4s linear infinite;-}--/* --- Responsive -------------------------------------------------------------- The window can be resized down to 900px (tauri.conf.json minWidth), so the- board and the 380px panel have to keep working the whole way down without a- horizontal scrollbar. The panel narrows in two steps and then drops under the- board; the card grid steps from three across to two and finally to one. */--@media (max-width: 1400px) {- .shot-grid {- grid-template-columns: repeat(2, minmax(0, 1fr));- }-}--@media (max-width: 1180px) {- .generator-view {- grid-template-columns: minmax(0, 1fr) 340px;- }-- .generator-main {- padding-inline: var(--space-5);- }-- .generator-heading {- flex-direction: column;- align-items: flex-start;- }-}--@media (max-width: 1040px) {- .generator-main {- padding: var(--space-5) var(--space-4) var(--space-7);- }-- .generator-panel .job-actions {- padding: var(--space-4);- }--}--/* Under 960 the panel has nowhere left to go sideways, so it goes under the- board rather than squeezing the cards out of readability. */-@media (max-width: 960px) {- .generator-view {- grid-template-columns: minmax(0, 1fr);- grid-template-rows: minmax(0, 1fr) auto;- }-- .generator-panel {- max-height: 60vh;- border-left: 0;- border-top: 1px solid var(--line);- }-- .shot-grid {- grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));- }-- .job-meta {- grid-template-columns: minmax(0, 1fr);- gap: var(--space-3);- }+ font-weight: var(--weight-medium);}