AI media harness for planning, generating, and editing locally
TypeScript
Make generator legible and plain-spoken
Bittidc5028a497a3
diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex 96c5d8d..22c5ad1 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -1,5 +1,5 @@import { listen } from "@tauri-apps/api/event";-import { AlertCircle, Ban, Check, ChevronRight, Clock3, Film, LoaderCircle, MoreHorizontal, Play, RefreshCw, Sparkles, Square, WandSparkles, X } from "lucide-react";+import { AlertCircle, Ban, Check, ChevronRight, Clock3, Film, LoaderCircle, Play, RefreshCw, Sparkles, Square, WandSparkles, X } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { isTauri } from "../../lib/persistence";import { createDraftGenerationJob, type GenerationJob, type ProjectAsset, type ProjectConfig, type TimelineClip, type TimelineTrack } from "../../lib/project";@@ -13,6 +13,8 @@ interface GeneratorViewProps {selectedJobId?: string;}+type JobStatus = GenerationJob["status"];+export function GeneratorView({ config, runtime = null, onChange, onOpenTimeline, selectedJobId }: GeneratorViewProps) {const [selectedId, setSelectedId] = useState(selectedJobId ?? config.generationJobs.find((job) => job.status === "generating")?.id ?? config.generationJobs[0]?.id);const [prompt, setPrompt] = useState("");@@ -27,6 +29,7 @@ export function GeneratorView({ config, runtime = null, onChange, onOpenTimelineconst completed = jobs.filter((job) => ["ready", "completed", "failed", "cancelled"].includes(job.status));const boundRefs = useMemo(() => config.references.filter((ref) => selected?.referenceIds.includes(ref.id)), [config.references, selected]);const runtimeReady = runtime?.state === "ready";+ const submitLabel = runtimeReady ? "Generate this shot" : "Save as a draft";useEffect(() => { if (selectedJobId) setSelectedId(selectedJobId); }, [selectedJobId]);@@ -70,7 +73,7 @@ export function GeneratorView({ config, runtime = null, onChange, onOpenTimelineconst prepareOrRetry = async (job: GenerationJob) => {const now = new Date().toISOString();- updateJob(job.id, { status: runtimeReady ? "queued" : "draft", stage: "queued", progress: 0, error: runtimeReady ? null : runtime?.detail ?? "Runtime unavailable.", updatedAt: now });+ updateJob(job.id, { status: runtimeReady ? "queued" : "draft", stage: "queued", progress: 0, error: runtimeReady ? null : runtime?.detail ?? "The video engine isn’t available on this computer right now.", updatedAt: now });if (runtimeReady) await enqueueVidfabGeneration(requestFor(job), configRef.current);};@@ -85,9 +88,9 @@ export function GeneratorView({ config, runtime = null, onChange, onOpenTimelinetry {const request = requestFor(job);const plan = await resolveVidfabPlan(request, next);- setPlanNotes((current) => ({ ...current, [job.id]: `${plan.alignedFrames} frames · ${plan.canvasWidth}×${plan.canvasHeight}. ${plan.boundary}` }));+ setPlanNotes((current) => ({ ...current, [job.id]: `Planned as ${plan.alignedFrames} frames at ${plan.canvasWidth}×${plan.canvasHeight}. ${plan.boundary}` }));if (runtimeReady) await enqueueVidfabGeneration(request, next);- else updateJob(job.id, { error: runtime?.detail ?? "Generator runtime is unavailable; the editable draft remains saved." });+ else updateJob(job.id, { error: runtime?.detail ?? "The video engine isn’t available, so this was kept as an editable draft." });} catch (reason) {updateJob(job.id, { error: reason instanceof Error ? reason.message : String(reason) });}@@ -121,54 +124,301 @@ export function GeneratorView({ config, runtime = null, onChange, onOpenTimelinereturn <div className="generator-view"><aside className="queue-panel">- <div className="queue-panel__title"><div><span>GENERATION QUEUE</span><b>{active.length} active · {queued.length} waiting</b></div><button><MoreHorizontal size={16} /></button></div>- <QueueGroup title="Active" jobs={active} selectedId={selectedId} onSelect={setSelectedId} />- <QueueGroup title="Up next" jobs={queued} selectedId={selectedId} onSelect={setSelectedId} />- <QueueGroup title="Drafts" jobs={drafts} selectedId={selectedId} onSelect={setSelectedId} />- <QueueGroup title="History" jobs={completed} selectedId={selectedId} onSelect={setSelectedId} />- <div className={`queue-runtime queue-runtime--${runtime?.state ?? "checking"}`} title={runtime?.detail}><span><i /> {runtimeLabel(runtime)}</span><small>{runtimeReady ? "One raw-buffer job at a time" : "Generation runtime unavailable"}</small></div>+ <div className="queue-panel__title">+ <span>Your shots</span>+ <b>{queueSummary(active.length, queued.length, jobs.length)}</b>+ </div>+ <div className="queue-panel__scroll">+ <QueueGroup title="Rendering now" jobs={active} selectedId={selectedId} onSelect={setSelectedId} />+ <QueueGroup title="Waiting to render" jobs={queued} selectedId={selectedId} onSelect={setSelectedId} />+ <QueueGroup title="Drafts" jobs={drafts} selectedId={selectedId} onSelect={setSelectedId} />+ <QueueGroup title="Already run" jobs={completed} selectedId={selectedId} onSelect={setSelectedId} />+ {jobs.length === 0 && <p className="queue-empty">No shots yet. Describe one in the box on the right and it will appear here.</p>}+ </div>+ <div className={`queue-runtime queue-runtime--${runtime?.state ?? "checking"}`}>+ <span className="queue-runtime__state"><i /> {runtimeHeadline(runtime)}</span>+ <p>{runtimeExplainer(runtime)}</p>+ {!runtimeReady && <small>You can still write and save shot drafts.</small>}+ </div></aside><main className="generator-main">- <header className="generator-heading"><div><span className="eyebrow">Create shots</span><h1>Generator</h1><p>Turn a scene idea into an editable plan. Runtime availability is reported before costly generation.</p></div><button className="secondary-button" onClick={onOpenTimeline}><Film size={15} /> View timeline</button></header>+ <header className="generator-heading">+ <div>+ <span className="eyebrow">Create shots</span>+ <h1>Generator</h1>+ <p>Describe a shot in your own words and Pol Studio turns it into a scene you can keep editing. You always see what the video engine can actually do before anything starts.</p>+ </div>+ <button className="secondary-button" onClick={onOpenTimeline}><Film size={16} /> View timeline</button>+ </header>+<section className="generation-composer">- <div className="generation-composer__top"><Sparkles size={17} /><textarea value={prompt} onChange={(event) => setPrompt(event.target.value)} placeholder="Describe the next shot — subject, action, camera movement, light, and sound…" /><button onClick={() => void createJob()}><WandSparkles size={15} /> {runtimeReady ? "Add to queue" : "Save draft"}</button></div>- <div className="generation-settings"><span>H3 VIDEO</span><button>6 seconds <ChevronRight size={12} /></button><button>{config.settings.aspectRatio} <ChevronRight size={12} /></button><button>{config.settings.resolution.toUpperCase()} <ChevronRight size={12} /></button><i /><span>{config.references.length} project references available</span></div>+ <label className="generation-composer__field">+ <span className="generation-composer__label"><Sparkles size={17} /> Describe the shot you want</span>+ <textarea+ value={prompt}+ onChange={(event) => setPrompt(event.target.value)}+ placeholder="Example: a close shot of hands shaping wet clay on a spinning wheel, warm window light, the camera pushes in slowly, quiet room tone."+ />+ </label>+ <div className="generation-composer__foot">+ <div className="generation-settings">+ <span className="generation-settings__lead">Every shot is made as</span>+ <span className="setting-chip"><em>Length</em><b>6 seconds</b></span>+ <span className="setting-chip"><em>Shape</em><b>{config.settings.aspectRatio}</b></span>+ <span className="setting-chip"><em>Size</em><b>{config.settings.resolution.toUpperCase()}</b></span>+ <span className="setting-chip"><em>Model</em><b>MiniMax H3</b></span>+ </div>+ <button className="primary-button generation-composer__submit" onClick={() => void createJob()}>+ <WandSparkles size={17} /> {submitLabel}+ </button>+ </div>+ <p className="generation-composer__hint">+ {runtimeReady+ ? "Shots render one at a time, so a new shot joins the queue behind anything already running."+ : "Nothing renders on this computer yet, so your shot is saved as a draft you can run later."}+ {config.references.length > 0+ ? ` ${config.references.length} project ${config.references.length === 1 ? "reference is" : "references are"} available to guide it.`+ : " No references added yet — add characters, places, or looks to keep shots consistent."}+ </p></section>{selected ? <section className="job-detail"><div className="job-detail__visual">- <div className={`generation-preview generation-preview--${selected.status}`}><span className="generation-preview__flare" /><div className="generation-preview__model"><i /><i /><i /><i /></div>{selected.status === "generating" && <div className="generation-scanner" />}<span className="preview-status">{previewStatus(selected)}</span></div>- <div className="job-progress-block"><div><b>{progressTitle(selected)}</b><span>{selected.stage === "generating" ? "vidfab is synthesizing raw motion and sound" : stageCopy(selected)}</span></div><div className="progress-track"><i style={{ width: `${selected.progress * 100}%` }} /></div><div className="stage-rail">{["Prepare", "Generate", "Deliver", "Encode later"].map((stage, index) => <span key={stage} className={selected.progress > 0 && selected.progress >= index / 3 ? "done" : ""}><i>{selected.progress > 0 && selected.progress >= index / 3 ? <Check size={9} /> : index + 1}</i>{stage}</span>)}</div></div>+ <div className={`generation-preview generation-preview--${selected.status}`}>+ <span className="generation-preview__flare" />+ <div className="generation-preview__model"><i /><i /><i /><i /></div>+ {selected.status === "generating" && <div className="generation-scanner" />}+ <span className="preview-status">{previewStatus(selected)}</span>+ </div>+ <div className="job-progress-block">+ <div className="job-progress-block__head">+ <b>{progressTitle(selected)}</b>+ <span>{stageCopy(selected)}</span>+ </div>+ <div className="progress-track"><i style={{ width: `${selected.progress * 100}%` }} /></div>+ <ol className="stage-rail">+ {STAGES.map((stage, index) => {+ const done = selected.progress > 0 && selected.progress >= stage.at;+ return <li key={stage.label} className={done ? "done" : ""}>+ <i>{done ? <Check size={14} /> : index + 1}</i>+ <span>{stage.label}</span>+ </li>;+ })}+ <li className="stage-rail__blocked">+ <i><Ban size={14} /></i>+ <span>Save as a video file<small>Not built yet</small></span>+ </li>+ </ol>+ </div></div>+<aside className="job-detail__info">- <div className="job-title"><span className={`status-icon status-icon--${selected.status}`}>{statusIcon(selected.status)}</span><div><span>{selected.status.toUpperCase()}</span><h2>{selected.title}</h2></div></div>- <div className="job-prompt"><span>CREATIVE BRIEF</span><p>{selected.creativeBrief}</p></div>- {(planNotes[selected.id] || selected.error) && <div className="job-runtime-note"><span>RUNTIME BOUNDARY</span><p>{planNotes[selected.id] ?? selected.error}</p></div>}- <div className="job-meta"><label><span>MODEL</span><b>MiniMax H3</b></label><label><span>DELIVERY</span><b>{selected.outputRelativePath ?? "Raw buffers"}</b></label><label><span>CONTAINER</span><b>{selected.outputRelativePath ? "Project asset" : "Not encoded"}</b></label><label><span>STATUS</span><b>{selected.status}</b></label></div>- <div className="job-refs"><span>REFERENCES · {boundRefs.length}</span>{boundRefs.map((ref, index) => <div key={ref.id}><i className={`ref-mini ref-mini--${index}`} /> <b>{ref.name}</b><small>{ref.intendedUse.join(", ")}</small></div>)}</div>+ <div className="job-title">+ <span className={`status-icon status-icon--${selected.status}`}>{statusIcon(selected.status)}</span>+ <div>+ <span className="job-title__badge">{STATUS_BADGE[selected.status]}</span>+ <h2>{selected.title}</h2>+ </div>+ </div>++ <div className="job-prompt">+ <span>What you asked for</span>+ <p>{selected.creativeBrief}</p>+ </div>++ {(planNotes[selected.id] || selected.error) && <div className="job-runtime-note">+ <span>What actually happened</span>+ <p>{planNotes[selected.id] ?? selected.error}</p>+ <small>Reported by the video engine (vidfab).</small>+ </div>}++ <dl className="job-meta">+ <div><dt>Video model</dt><dd>MiniMax H3</dd></div>+ <div><dt>Where it is</dt><dd>{STATUS_WORD[selected.status]}</dd></div>+ <div><dt>Saved to</dt><dd>{selected.outputRelativePath ?? "Nothing saved to disk"}</dd></div>+ <div><dt>Video file</dt><dd>{selected.outputRelativePath ? "Ready to use in your edit" : "Not created yet"}</dd></div>+ </dl>++ <div className="job-refs">+ <span>{boundRefs.length === 0 ? "No references pinned to this shot" : boundRefs.length === 1 ? "1 reference guides this shot" : `${boundRefs.length} references guide this shot`}</span>+ {boundRefs.length === 0+ ? <p className="job-refs__empty">The video engine only follows the words above. Add characters, places, or looks in References to keep shots consistent.</p>+ : boundRefs.map((ref, index) => <div key={ref.id}>+ <i className={`ref-mini ref-mini--${index}`} />+ <b>{ref.name}</b>+ <small>{ref.intendedUse.join(", ")}</small>+ </div>)}+ </div>+<div className="job-actions">- {selected.status === "generating" && <button className="danger-button" onClick={() => cancelJob(selected)}><Square size={13} /> Cancel generation</button>}- {(selected.status === "failed" || selected.status === "cancelled") && <button className="primary-button" onClick={() => void prepareOrRetry(selected)}><RefreshCw size={13} /> {runtimeReady ? "Retry generation" : "Prepare retry"}</button>}- {selected.status === "draft" && <button className="primary-button" disabled={!runtimeReady} onClick={() => void startDraft(selected)}><WandSparkles size={13} /> {runtimeReady ? "Generate with vidfab" : "Runtime unavailable — draft saved"}</button>}- {selected.status === "ready" && <button className="primary-button" disabled>Raw frames ready — encoding not implemented</button>}- {selected.status === "completed" && selected.outputRelativePath && !selected.clipId && <button className="primary-button" onClick={() => insertIntoStory(selected)}><Play size={13} /> Insert into Story</button>}- {selected.status === "completed" && selected.clipId && <button className="primary-button" onClick={onOpenTimeline}><Play size={13} /> Open in timeline</button>}- {selected.status === "completed" && !selected.outputRelativePath && <button className="primary-button" disabled>Output unavailable</button>}- {selected.status === "queued" && <button className="danger-button" onClick={() => cancelJob(selected)}><X size={13} /> Remove from queue</button>}+ {selected.status === "generating" && <button className="danger-button" onClick={() => cancelJob(selected)}><Square size={14} /> Stop this shot</button>}++ {selected.status === "queued" && <button className="danger-button" onClick={() => cancelJob(selected)}><X size={14} /> Take out of the queue</button>}++ {selected.status === "draft" && <>+ <button className="primary-button" disabled={!runtimeReady} onClick={() => void startDraft(selected)}>+ <WandSparkles size={15} /> {runtimeReady ? "Generate this shot" : "Can’t generate yet"}+ </button>+ {!runtimeReady && <p className="job-actions__note">This draft is saved with your project. Pol Studio needs a working video engine before it can render it.</p>}+ </>}++ {(selected.status === "failed" || selected.status === "cancelled") && <>+ <button className="primary-button" disabled={!runtimeReady} onClick={() => void prepareOrRetry(selected)}>+ <RefreshCw size={15} /> {runtimeReady ? "Try this shot again" : "Can’t try again yet"}+ </button>+ {!runtimeReady && <p className="job-actions__note">Pol Studio needs a working video engine before it can run this shot again.</p>}+ </>}++ {selected.status === "ready" && <div className="job-actions__blocked">+ <b>There is nothing to open yet</b>+ <p>The frames and sound were rendered and are held in memory, but Pol Studio can’t package them into a video file yet — that step isn’t built. Nothing was written to your project folder.</p>+ <small>Keep drafting other shots in the meantime.</small>+ </div>}++ {selected.status === "completed" && selected.outputRelativePath && !selected.clipId && <button className="primary-button" onClick={() => insertIntoStory(selected)}><Play size={15} /> Insert into Story</button>}++ {selected.status === "completed" && selected.clipId && <button className="primary-button" onClick={onOpenTimeline}><Play size={15} /> Open in timeline</button>}++ {selected.status === "completed" && !selected.outputRelativePath && <>+ <button className="primary-button" disabled={!runtimeReady} onClick={() => void prepareOrRetry(selected)}>+ <RefreshCw size={15} /> {runtimeReady ? "Run this shot again" : "Can’t run it again yet"}+ </button>+ <p className="job-actions__note">This run finished without saving a video file, so there is nothing to add to your edit.</p>+ </>}</div></aside>- </section> : <div className="job-empty"><Sparkles size={25} /><h2>Draft your first shot</h2><p>Describe it above and Pol Studio will keep it connected to your edit.</p></div>}+ </section> : <div className="job-empty">+ <span className="job-empty__icon"><Sparkles size={26} /></span>+ <h2>Start with one shot</h2>+ <p>Write what should happen on screen in the box above — who or what is in frame, how the camera moves, the light, the sound. Then choose “{submitLabel}”.</p>+ <ul className="job-empty__tips">+ <li>One moment per shot works better than a whole scene.</li>+ <li>Say what the camera does: holds still, pushes in, follows.</li>+ <li>Every shot stays editable, so you can rewrite and run it again.</li>+ </ul>+ </div>}</main></div>;}function QueueGroup({ title, jobs, selectedId, onSelect }: { title: string; jobs: GenerationJob[]; selectedId?: string; onSelect: (id: string) => void }) {- return <section className="queue-group"><h3>{title}<span>{jobs.length}</span></h3>{jobs.map((job) => <button key={job.id} className={selectedId === job.id ? "selected" : ""} onClick={() => onSelect(job.id)}><span className={`queue-thumb queue-thumb--${job.status}`}>{statusIcon(job.status)}</span><span><b>{job.title}</b><small>{job.status === "generating" ? `${Math.round(job.progress * 100)}% · ${job.stage}` : job.status === "completed" ? job.outputRelativePath ? "Project asset · 6 seconds" : "Output unavailable" : job.status === "ready" ? "Raw buffers · encoding pending" : job.status}</small>{job.status === "generating" && <i className="mini-progress"><em style={{ width: `${job.progress * 100}%` }} /></i>}</span><ChevronRight size={13} /></button>)}</section>;+ if (jobs.length === 0) return null;+ return <section className="queue-group">+ <h3>{title}<span>{jobs.length}</span></h3>+ {jobs.map((job) => <button key={job.id} className={selectedId === job.id ? "selected" : ""} onClick={() => onSelect(job.id)}>+ <span className={`queue-thumb queue-thumb--${job.status}`}>{statusIcon(job.status)}</span>+ <span className="queue-row__text">+ <b>{job.title}</b>+ <small>{queueLine(job)}</small>+ {job.status === "generating" && <i className="mini-progress"><em style={{ width: `${job.progress * 100}%` }} /></i>}+ </span>+ <ChevronRight size={16} />+ </button>)}+ </section>;}-const statusIcon = (status: GenerationJob["status"]) => status === "generating" ? <LoaderCircle size={14} /> : status === "completed" || status === "ready" ? <Check size={14} /> : status === "failed" ? <AlertCircle size={14} /> : status === "cancelled" ? <Ban size={14} /> : <Clock3 size={14} />;-const progressTitle = (job: GenerationJob) => job.status === "generating" ? `${Math.round(job.progress * 100)}%` : job.status === "ready" ? "Frames ready" : job.status === "completed" ? "Complete" : job.status === "failed" ? "Generation failed" : job.status === "cancelled" ? "Cancelled" : job.status === "draft" ? "Draft" : "Queued";-const stageCopy = (job: GenerationJob) => job.status === "draft" ? "Draft saved — connect a compatible runtime to render" : job.status === "queued" ? "Waiting for the active vidfab job" : job.status === "ready" ? "Raw frames delivered; host encoding is not implemented" : job.status === "completed" ? job.outputRelativePath ? "Encoded project asset" : "Completed without a saved output" : job.error ?? "This job can be retried when the runtime is ready";-const previewStatus = (job: GenerationJob) => job.status === "generating" ? <><LoaderCircle size={14} /> vidfab · {Math.round(job.progress * 100)}%</> : job.status === "ready" ? <><Check size={14} /> Raw frames ready</> : job.status === "completed" && job.outputRelativePath ? <><Check size={14} /> Ready for timeline</> : job.status === "completed" ? <><AlertCircle size={14} /> Output unavailable</> : job.status === "cancelled" ? <><Ban size={14} /> Generation cancelled</> : job.status === "failed" ? <><AlertCircle size={14} /> Generation failed</> : job.status === "draft" ? <><Clock3 size={14} /> Draft saved — runtime unavailable</> : <><Clock3 size={14} /> Waiting in queue</>;-const runtimeLabel = (runtime: VidfabStatus | null) => !runtime ? "Checking generator…" : runtime.state === "ready" ? "vidfab ready" : runtime.state === "modelsMissing" ? "Models not configured" : runtime.state === "demo" ? "Browser demo" : runtime.state === "incompatible" ? "Incompatible vidfab" : "vidfab unavailable";+const STAGES: Array<{ label: string; at: number }> = [+ { label: "Prepare", at: 0.01 },+ { label: "Render", at: 0.5 },+ { label: "Frames ready", at: 1 },+];++const STATUS_BADGE: Record<JobStatus, string> = {+ draft: "DRAFT",+ queued: "IN QUEUE",+ generating: "RENDERING",+ ready: "FRAMES RENDERED",+ completed: "FINISHED",+ failed: "FAILED",+ cancelled: "CANCELLED",+};++const STATUS_WORD: Record<JobStatus, string> = {+ draft: "Saved as a draft",+ queued: "Waiting to render",+ generating: "Rendering now",+ ready: "Frames rendered, held in memory",+ completed: "Finished",+ failed: "Stopped by an error",+ cancelled: "Stopped by you",+};++const queueSummary = (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 shot" : `${total} shots`;+};++const queueLine = (job: GenerationJob) => {+ switch (job.status) {+ case "generating": return `Rendering · ${Math.round(job.progress * 100)}%`;+ case "queued": return "Waiting its turn";+ case "draft": return "Draft — not started";+ case "ready": return "Frames rendered · no video file";+ case "completed": return job.outputRelativePath ? "Ready to use · 6 seconds" : "Finished with no file";+ case "failed": return "Didn’t finish";+ case "cancelled": return "Cancelled";+ }+};++const statusIcon = (status: JobStatus) => status === "generating" ? <LoaderCircle size={16} /> : status === "completed" || status === "ready" ? <Check size={16} /> : status === "failed" ? <AlertCircle size={16} /> : status === "cancelled" ? <Ban size={16} /> : <Clock3 size={16} />;++const progressTitle = (job: GenerationJob) => {+ switch (job.status) {+ case "generating": return `${Math.round(job.progress * 100)}% rendered`;+ case "queued": return "Waiting to start";+ case "draft": return "Draft saved";+ case "ready": return "Frames rendered";+ case "completed": return job.outputRelativePath ? "Ready for your edit" : "Finished with no file";+ case "failed": return "Didn’t finish";+ case "cancelled": return "Generation stopped";+ }+};++const stageCopy = (job: GenerationJob) => {+ switch (job.status) {+ case "generating": return "The video engine is building the motion and the sound.";+ case "queued": return "Waiting for the shot ahead of it to finish.";+ case "draft": return "Saved with your project. Nothing has been rendered yet.";+ case "ready": return "The frames and sound exist in memory. Pol Studio can’t package them into a video file yet.";+ case "completed": return job.outputRelativePath ? "Saved in your project and ready to drop into the timeline." : "This run ended without saving a video file.";+ case "failed": return "The run stopped before it finished. You can try it again.";+ case "cancelled": return "You stopped this one. You can run it again.";+ }+};++const previewStatus = (job: GenerationJob) => {+ switch (job.status) {+ case "generating": return <><LoaderCircle size={15} /> Rendering {Math.round(job.progress * 100)}%</>;+ case "queued": return <><Clock3 size={15} /> Waiting in queue</>;+ case "draft": return <><Clock3 size={15} /> Draft — nothing rendered</>;+ case "ready": return <><Check size={15} /> Frames rendered</>;+ case "completed": return job.outputRelativePath ? <><Check size={15} /> Ready for your edit</> : <><AlertCircle size={15} /> No video file was saved</>;+ case "failed": return <><AlertCircle size={15} /> Generation failed</>;+ case "cancelled": return <><Ban size={15} /> Generation cancelled</>;+ }+};++const runtimeHeadline = (runtime: VidfabStatus | null) => {+ if (!runtime) return "Checking for the video engine…";+ switch (runtime.state) {+ case "ready": return "Video generator ready";+ case "demo": return "Preview mode";+ case "modelsMissing": return "Video model files missing";+ case "runtimeMissing": return "Video engine not installed";+ case "incompatible": return "Video engine doesn’t match";+ }+};++const runtimeExplainer = (runtime: VidfabStatus | null) => {+ if (!runtime) return "Pol Studio is looking for the video engine on this computer.";+ switch (runtime.state) {+ case "ready": return "It renders one shot at a time.";+ case "demo": return "Pol Studio plans the shot but doesn’t render it.";+ case "modelsMissing": return "The video model files aren’t set up yet.";+ case "runtimeMissing": return "The video engine isn’t installed on this computer.";+ case "incompatible": return "This version of the video engine doesn’t work with Pol Studio.";+ }+};diff --git a/src/styles/generator.css b/src/styles/generator.cssindex 7aefd7b..c203277 100644--- a/src/styles/generator.css+++ b/src/styles/generator.css@@ -1,145 +1,162 @@/* ============================================================================- generator.css — generation queue, prompt composer, job detail panel.+ generator.css — the Generator screen: shot queue, composer, job detail.++ Legibility contract: body copy is --text-base, the smallest text anywhere is+ --text-2xs (12px) and only for mono micro-labels, every interactive element+ clears --control-sm (36px). No raw px type, no hand-written greys.========================================================================== */.generator-view {height: 100%;min-height: 0;display: grid;- grid-template-columns: 300px minmax(0, 1fr);- background: #0a0d12;+ grid-template-columns: 320px minmax(0, 1fr);+ background: var(--bg);}/* --- Queue rail ------------------------------------------------------------ */.queue-panel {min-height: 0;- overflow-y: auto;- border-right: 1px solid #292d37;+ display: flex;+ flex-direction: column;+ border-right: 1px solid var(--line);background: var(--panel);}.queue-panel__title {- height: var(--topbar-height);+ min-height: var(--topbar-height);+ flex: 0 0 auto;display: flex;- align-items: center;- justify-content: space-between;- padding: 0 var(--space-4);+ flex-direction: column;+ justify-content: center;+ gap: var(--space-1);+ padding: var(--space-3) var(--space-4);border-bottom: 1px solid var(--line);}-.queue-panel__title span,-.queue-panel__title b {- display: block;-}-.queue-panel__title span {- color: var(--text-muted);- font-size: var(--text-2xs);+ color: var(--text-primary);+ font-size: var(--text-md);font-weight: var(--weight-semibold);line-height: var(--leading-snug);- letter-spacing: var(--tracking-label);+ letter-spacing: var(--tracking-tight);}.queue-panel__title b {- margin-top: var(--space-1);- color: var(--text-secondary);- font-size: var(--text-base);+ color: var(--text-muted);+ font-size: var(--text-xs);+ font-weight: var(--weight-regular);line-height: var(--leading-snug);}-.queue-panel__title button {- min-width: var(--control-sm);- min-height: var(--control-sm);- display: grid;- place-items: center;- border: 0;- border-radius: var(--radius-sm);- color: var(--text-muted);- background: none;+.queue-panel__scroll {+ flex: 1 1 auto;+ min-height: 0;+ overflow-y: auto;+ padding-bottom: var(--space-3);}-.queue-panel__title button:hover {- color: var(--text-secondary);- background: rgba(255, 255, 255, 0.04);+.queue-empty {+ margin: var(--space-5) var(--space-4);+ color: var(--text-muted);+ font-size: var(--text-sm);+ line-height: var(--leading-normal);}.queue-group {- padding: var(--space-3) var(--space-2) var(--space-1);+ padding: var(--space-4) var(--space-3) 0;}.queue-group h3 {- height: var(--space-5);- margin: 0 var(--space-1);- color: var(--text-muted);- font-size: var(--text-2xs);- font-weight: var(--weight-bold);- line-height: var(--space-5);- text-transform: uppercase;- letter-spacing: var(--tracking-label);+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-2);+ min-height: var(--space-5);+ margin: 0 var(--space-1) var(--space-2);+ color: var(--text-secondary);+ font-size: var(--text-xs);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);+ letter-spacing: 0;+ text-transform: none;}.queue-group h3 span {- float: right;+ min-width: var(--space-5);padding: 0 var(--space-2);border-radius: var(--radius-pill);- background: #1a1f28;+ color: var(--text-muted);+ background: var(--panel-3);+ font: var(--weight-medium) var(--text-2xs) / var(--space-5) var(--font-mono);+ text-align: center;}.queue-group > button {width: 100%;- min-height: var(--space-9);+ min-height: 68px;display: grid;- grid-template-columns: 44px minmax(0, 1fr) 16px;+ grid-template-columns: 48px minmax(0, 1fr) 18px;align-items: center;- gap: var(--space-2);- margin-bottom: var(--space-1);- padding: var(--space-2);+ gap: var(--space-3);+ margin-bottom: var(--space-2);+ padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);border: 1px solid transparent;- border-radius: var(--radius-sm);+ border-radius: var(--radius-md);text-align: left;color: var(--text-muted);background: transparent;+ transition: 0.16s ease;}.queue-group > button:hover {- background: #13171f;+ border-color: var(--line);+ background: var(--panel-2);}.queue-group > button.selected {- border-color: rgba(90, 120, 218, 0.35);- background: rgba(51, 76, 154, 0.15);+ border-color: rgba(90, 120, 218, 0.4);+ background: var(--accent-soft);+}++.queue-group > button.selected b {+ color: var(--text-primary);}.queue-thumb {- width: 44px;- height: 44px;+ width: 48px;+ height: 48px;display: grid;place-items: center;- border-radius: var(--radius-sm);- color: #9db3f2;- background: linear-gradient(140deg, #24375d, #604e54);+ border-radius: var(--radius-md);+ color: var(--accent-bright);+ background: color-mix(in srgb, var(--accent) 20%, var(--panel-3));}.queue-thumb--generating svg {animation: spin 1.4s linear infinite;}-.queue-thumb--completed {+.queue-thumb--completed,+.queue-thumb--ready {color: var(--success);- background: #1d3c32;+ background: color-mix(in srgb, var(--success) 16%, var(--panel-3));}.queue-thumb--failed,.queue-thumb--cancelled {color: var(--danger);- background: #3b2227;+ background: color-mix(in srgb, var(--danger) 16%, var(--panel-3));}-.queue-thumb--ready,-.status-icon--ready {- color: var(--success);- background: #1b3a31;+.queue-thumb--draft {+ color: var(--text-muted);+ background: var(--panel-3);+}++.queue-row__text {+ min-width: 0;}.queue-group button b,@@ -152,7 +169,8 @@.queue-group button b {color: var(--text-secondary);- font-size: var(--text-sm);+ font-size: var(--text-base);+ font-weight: var(--weight-semibold);line-height: var(--leading-snug);}@@ -161,56 +179,109 @@color: var(--text-muted);font-size: var(--text-xs);line-height: var(--leading-snug);- text-transform: capitalize;}+.queue-group button .mini-progress {+ height: 6px;+ margin-top: var(--space-2);+ background: var(--panel-3);+}++.queue-group > button > svg {+ color: var(--text-faint);+}++/* The runtime pill is the user's single source of truth about whether a shot+ can actually be rendered, so it stays pinned to the bottom of the rail. */+.queue-runtime {- margin: var(--space-4) var(--space-3);- padding: var(--space-3);- border: 1px solid var(--line);- border-radius: var(--radius-sm);- background: #0a0d12;+ position: sticky;+ bottom: 0;+ flex: 0 0 auto;+ margin: 0;+ padding: var(--space-4);+ border-top: 1px solid var(--line);+ background: var(--panel-2);}-.queue-runtime span,-.queue-runtime small {- display: block;+.queue-runtime__state {+ display: flex;+ align-items: center;+ gap: var(--space-2);+ color: var(--text-primary);+ font-size: var(--text-base);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);+}++.queue-runtime__state i {+ width: 10px;+ height: 10px;+ flex: 0 0 auto;+ border-radius: 50%;+ background: var(--text-muted);}-.queue-runtime span {+.queue-runtime p {+ margin: var(--space-2) 0 0;+ color: var(--text-secondary);+ font-size: var(--text-sm);+ line-height: var(--leading-normal);+}++.queue-runtime small {+ display: block;+ margin-top: var(--space-2);color: var(--text-muted);font-size: var(--text-xs);- line-height: var(--leading-snug);+ line-height: var(--leading-normal);}-.queue-runtime span i {- display: inline-block;- width: 6px;- height: 6px;- margin-right: var(--space-2);- border-radius: 50%;+.queue-runtime--ready {+ border-top-color: color-mix(in srgb, var(--success) 35%, transparent);+}++.queue-runtime--ready .queue-runtime__state {+ color: var(--success);+}++.queue-runtime--ready .queue-runtime__state i {background: var(--success);+ box-shadow: 0 0 8px color-mix(in srgb, var(--success) 60%, transparent);}-.queue-runtime small {- margin-top: var(--space-1);- color: var(--text-faint);- font-size: var(--text-2xs);- line-height: var(--leading-snug);+.queue-runtime--demo {+ border-top-color: color-mix(in srgb, var(--warning) 35%, transparent);}-.queue-runtime--unavailable span i {+.queue-runtime--demo .queue-runtime__state {+ color: var(--warning);+}++.queue-runtime--demo .queue-runtime__state i {background: var(--warning);}-.queue-runtime--runtimeMissing span i,-.queue-runtime--incompatible span i,-.queue-runtime--modelsMissing span i {+.queue-runtime--runtimeMissing,+.queue-runtime--modelsMissing,+.queue-runtime--incompatible {+ border-top-color: color-mix(in srgb, var(--danger) 35%, transparent);+}++.queue-runtime--runtimeMissing .queue-runtime__state,+.queue-runtime--modelsMissing .queue-runtime__state,+.queue-runtime--incompatible .queue-runtime__state {+ color: var(--danger);+}++.queue-runtime--runtimeMissing .queue-runtime__state i,+.queue-runtime--modelsMissing .queue-runtime__state i,+.queue-runtime--incompatible .queue-runtime__state i {background: var(--danger);}-.queue-runtime--demo span i {- background: var(--accent-bright);+.queue-runtime--checking .queue-runtime__state {+ color: var(--text-secondary);}/* --- Main column ----------------------------------------------------------- */@@ -218,20 +289,26 @@.generator-main {min-height: 0;overflow-y: auto;- padding: var(--space-6) var(--space-7) var(--space-7);+ padding: var(--space-6) var(--space-7) var(--space-8);}.generator-heading {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);}+.generator-heading > div {+ min-width: 0;+ max-width: 68ch;+}+.generator-heading h1 {- margin: var(--space-1) 0 var(--space-1);- font-size: var(--text-xl);+ margin: var(--space-2) 0 var(--space-2);+ font-size: var(--text-2xl);font-weight: var(--weight-semibold);line-height: var(--leading-tight);letter-spacing: var(--tracking-hero);@@ -244,123 +321,153 @@line-height: var(--leading-normal);}+.generator-heading .secondary-button {+ flex: 0 0 auto;+}+/* --- Generation composer --------------------------------------------------- */.generation-composer {max-width: var(--content-max);- margin: 0 auto var(--space-5);- border: 1px solid rgba(91, 121, 211, 0.3);- border-radius: var(--radius-lg);- background: linear-gradient(120deg, #111827, #11141c);+ margin: 0 auto var(--space-6);+ padding: var(--space-5);+ border: 1px solid rgba(91, 121, 211, 0.32);+ border-radius: var(--radius-xl);+ background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 10%, var(--panel-2)), var(--panel-2));box-shadow: var(--shadow-sm);}-.generation-composer__top {- min-height: 96px;+.generation-composer__field {+ display: block;+}++.generation-composer__label {display: flex;- align-items: flex-start;- gap: var(--space-3);- padding: var(--space-4);- color: #8ea6f2;+ align-items: center;+ gap: var(--space-2);+ color: var(--text-primary);+ font-size: var(--text-md);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);+}++.generation-composer__label svg {+ color: var(--accent-bright);}.generation-composer textarea {- min-height: 64px;- flex: 1;- resize: none;- border: 0;+ width: 100%;+ min-height: 128px;+ margin-top: var(--space-3);+ padding: var(--space-3) var(--space-4);+ resize: vertical;+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);outline: 0;- color: var(--text-secondary);- background: none;+ color: var(--text-primary);+ background: var(--panel);+ font-family: var(--font-sans);font-size: var(--text-base);line-height: var(--leading-normal);}+.generation-composer textarea:focus-visible {+ border-color: var(--accent);+}+.generation-composer textarea::placeholder {color: var(--text-faint);}-.generation-composer__top button {- min-height: var(--control-md);+.generation-composer__foot {display: flex;+ flex-wrap: wrap;align-items: center;- gap: var(--space-2);- padding: 0 var(--space-4);- border: 1px solid #5d7de6;- border-radius: var(--radius-sm);- color: #fff;- background: #3e63da;+ justify-content: space-between;+ gap: var(--space-4);+ margin-top: var(--space-4);+}++.generation-composer__submit {+ min-height: var(--control-lg);+ flex: 0 0 auto;+ font-size: var(--text-base);+}++.generation-composer__hint {+ max-width: 78ch;+ margin: var(--space-4) 0 0;+ color: var(--text-muted);font-size: var(--text-sm);- font-weight: var(--weight-semibold);+ line-height: var(--leading-normal);}+/* Read-only facts about how every shot is made — deliberately not buttons,+ because none of these values can be changed from here yet. */+.generation-settings {- min-height: var(--control-lg);display: flex;+ flex-wrap: wrap;align-items: center;- gap: var(--space-2);- padding: var(--space-1) var(--space-3);- border-top: 1px solid var(--line);+ gap: var(--space-2) var(--space-3);+}++.generation-settings__lead {color: var(--text-muted);- font: var(--weight-medium) var(--text-2xs) / var(--leading-snug) var(--font-mono);+ font-size: var(--text-sm);+ line-height: var(--leading-snug);}-.generation-settings > span:first-child {- color: #8ea6f2;+.setting-chip {+ display: inline-flex;+ flex-direction: column;+ gap: 2px;+ padding: var(--space-2) var(--space-3);+ border: 1px solid var(--line);+ border-radius: var(--radius-md);+ background: var(--panel);}-.generation-settings button {- min-height: var(--control-sm);- display: flex;- align-items: center;- gap: var(--space-1);- padding: 0 var(--space-2);- border: 1px solid #272d37;- border-radius: var(--radius-xs);+.setting-chip em {color: var(--text-muted);- background: #151922;- font-size: var(--text-xs);- font-family: var(--font-sans);+ font: var(--weight-medium) var(--text-2xs) / var(--leading-snug) var(--font-mono);+ font-style: normal;+ letter-spacing: var(--tracking-label);+ text-transform: uppercase;}-.generation-settings button:hover {+.setting-chip b {color: var(--text-secondary);- border-color: #39414f;-}--.generation-settings i {- width: 1px;- height: 20px;- margin: 0 var(--space-1);- background: #2a2f38;+ font-size: var(--text-sm);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);}/* --- Job detail ------------------------------------------------------------ */.job-detail {max-width: var(--content-max);- min-height: 460px;margin: 0 auto;display: grid;- grid-template-columns: minmax(480px, 1.5fr) minmax(320px, 0.75fr);+ grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);overflow: hidden;- border: 1px solid #282d37;- border-radius: var(--radius-lg);- background: #0e1117;+ border: 1px solid var(--line);+ border-radius: var(--radius-xl);+ background: var(--panel);}.job-detail__visual {min-width: 0;padding: var(--space-5);- border-right: 1px solid #282d37;+ border-right: 1px solid var(--line);}.generation-preview {position: relative;- height: 320px;+ height: 340px;overflow: hidden;- border: 1px solid #303640;- border-radius: var(--radius-sm);+ border: 1px solid var(--line-strong);+ border-radius: var(--radius-lg);background: linear-gradient(150deg, #26374f 0 48%, #ca8b60 49% 51%, #171c24 52%);}@@ -371,7 +478,7 @@right: -80px;top: -110px;border-radius: 50%;- background: #efb17544;+ background: rgba(239, 177, 117, 0.27);filter: blur(25px);}@@ -398,7 +505,7 @@position: absolute;inset: -40% 0 auto;height: 50%;- background: linear-gradient(transparent, #91a8ff25, transparent);+ background: linear-gradient(transparent, rgba(145, 168, 255, 0.15), transparent);animation: scan 2.5s ease-in-out infinite;}@@ -406,87 +513,150 @@position: absolute;left: var(--space-3);bottom: var(--space-3);- display: flex;+ min-height: var(--control-sm);+ display: inline-flex;align-items: center;gap: var(--space-2);- padding: var(--space-1) var(--space-2);- border: 1px solid rgba(255, 255, 255, 0.13);- border-radius: var(--radius-xs);- color: #dde3ef;- background: rgba(9, 12, 18, 0.72);+ padding: 0 var(--space-3);+ border: 1px solid var(--line-strong);+ border-radius: var(--radius-md);+ color: var(--text-primary);+ background: rgba(9, 12, 18, 0.82);backdrop-filter: blur(6px);- font-size: var(--text-xs);+ font-size: var(--text-sm);+ font-weight: var(--weight-medium);line-height: var(--leading-snug);}.preview-status svg {+ flex: 0 0 auto;color: var(--accent-bright);}-.generation-preview--completed .preview-status svg {+.generation-preview--generating .preview-status svg {+ animation: spin 1.4s linear infinite;+}++.generation-preview--completed .preview-status svg,+.generation-preview--ready .preview-status svg {color: var(--success);}+.generation-preview--failed .preview-status svg,+.generation-preview--cancelled .preview-status svg {+ color: var(--danger);+}++.generation-preview--draft .preview-status svg,+.generation-preview--queued .preview-status svg {+ color: var(--text-muted);+}+/* --- Progress block -------------------------------------------------------- */.job-progress-block {- padding: var(--space-4) var(--space-1) 0;+ padding: var(--space-5) 0 0;}-.job-progress-block > div:first-child {+.job-progress-block__head {display: flex;- justify-content: space-between;+ flex-direction: column;+ gap: var(--space-1);}-.job-progress-block b {- font-size: var(--text-sm);+.job-progress-block__head b {+ color: var(--text-primary);+ font-size: var(--text-lg);+ font-weight: var(--weight-semibold);line-height: var(--leading-snug);+ letter-spacing: var(--tracking-tight);}-.job-progress-block span {+.job-progress-block__head span {+ max-width: 70ch;color: var(--text-muted);- font-size: var(--text-xs);- line-height: var(--leading-snug);+ font-size: var(--text-base);+ line-height: var(--leading-normal);}+.job-progress-block .progress-track {+ height: 8px;+ margin: var(--space-4) 0 var(--space-4);+ background: var(--panel-3);+}++/* The rail shows the three steps that can actually happen today, plus the one+ step Pol Studio cannot do at all — drawn as blocked, never as "pending". */+.stage-rail {- display: flex !important;- justify-content: space-between !important;+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: var(--space-2) var(--space-5);+ margin: 0;+ padding: 0;+ list-style: none;}-.stage-rail span {+.stage-rail li {display: flex;align-items: center;- gap: var(--space-1);- font-size: var(--text-2xs) !important;+ gap: var(--space-2);+ color: var(--text-muted);+ font-size: var(--text-sm);+ line-height: var(--leading-snug);}-.stage-rail span i {- width: 20px;- height: 20px;+.stage-rail li i {+ width: 26px;+ height: 26px;+ flex: 0 0 auto;display: grid;place-items: center;- border: 1px solid #303642;+ border: 1px solid var(--line-strong);border-radius: 50%;font-style: normal;font-size: var(--text-2xs);+ font-family: var(--font-mono);}-.stage-rail span.done {- color: #9db3f2;+.stage-rail li.done {+ color: var(--text-secondary);}-.stage-rail span.done i {+.stage-rail li.done i {color: #fff;- border-color: #5575d9;- background: #3b5fce;+ border-color: var(--accent-bright);+ background: var(--accent);+}++.stage-rail__blocked {+ margin-left: auto;+}++.stage-rail__blocked i {+ color: var(--danger);+ border-color: color-mix(in srgb, var(--danger) 45%, transparent) !important;+ background: color-mix(in srgb, var(--danger) 14%, transparent);+}++.stage-rail__blocked span {+ display: flex;+ flex-direction: column;+ color: var(--text-secondary);+}++.stage-rail__blocked small {+ color: var(--danger);+ font-size: var(--text-2xs);+ line-height: var(--leading-snug);}/* --- Job info column ------------------------------------------------------- */.job-detail__info {min-width: 0;- padding: var(--space-4);+ padding: var(--space-5);overflow-y: auto;}@@ -498,102 +668,140 @@border-bottom: 1px solid var(--line);}+.job-title > div {+ min-width: 0;+}+.status-icon {- width: var(--control-sm);- height: var(--control-sm);+ width: var(--control-md);+ height: var(--control-md);flex: 0 0 auto;display: grid;place-items: center;- border-radius: var(--radius-sm);- color: #9db3f2;- background: #28365b;+ 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--completed,+.status-icon--ready {color: var(--success);- background: #1c3c31;+ background: color-mix(in srgb, var(--success) 16%, var(--panel-3));}-.job-title > div > span {- color: #8ea6f2;- font: var(--weight-medium) var(--text-2xs) / var(--leading-snug) var(--font-mono);+.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);letter-spacing: var(--tracking-label);}.job-title h2 {margin: var(--space-1) 0 0;- color: var(--text-secondary);- font-size: var(--text-md);+ color: var(--text-primary);+ font-size: var(--text-lg);+ font-weight: var(--weight-semibold);line-height: var(--leading-snug);+ letter-spacing: var(--tracking-tight);}-.job-prompt {- padding: var(--space-3) 0;+.job-prompt,+.job-runtime-note {+ padding: var(--space-4) 0;border-bottom: 1px solid var(--line);}.job-prompt > span,-.job-refs > span {- color: var(--text-muted);- font-size: var(--text-2xs);+.job-refs > span,+.job-runtime-note > span {+ display: block;+ color: var(--text-secondary);+ font-size: var(--text-xs);font-weight: var(--weight-semibold);- letter-spacing: var(--tracking-label);+ line-height: var(--leading-snug);}-.job-prompt p {+.job-prompt p,+.job-runtime-note p {margin: var(--space-2) 0 0;- color: var(--text-muted);+ 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);+ 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: 1fr 1fr;- gap: var(--space-3);- padding: var(--space-3) 0;+ 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 span,-.job-meta b {- display: block;-}--.job-meta span {+.job-meta dt {color: var(--text-muted);- font-size: var(--text-2xs);+ font-size: var(--text-xs);line-height: var(--leading-snug);- letter-spacing: var(--tracking-label);}-.job-meta b {- margin-top: var(--space-1);+.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-3) 0;+ 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);}.job-refs > div {display: grid;- grid-template-columns: 36px minmax(0, 1fr);- margin-top: var(--space-2);+ grid-template-columns: 44px minmax(0, 1fr);+ column-gap: var(--space-3);align-items: center;+ margin-top: var(--space-3);}.job-refs .ref-mini {grid-row: 1 / 3;- width: 32px;- height: 32px;- border-radius: var(--radius-xs);+ width: 40px;+ height: 40px;+ border-radius: var(--radius-sm);background: linear-gradient(140deg, #304465, #a2755a);}@@ -610,94 +818,184 @@}.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: 2px;+ margin-top: var(--space-1);color: var(--text-muted);font-size: var(--text-xs);line-height: var(--leading-snug);}-.job-runtime-note {- padding: var(--space-3) 0;- border-bottom: 1px solid var(--line);+/* --- Actions: the one obvious next step ------------------------------------ */++.job-actions {+ margin-top: var(--space-4);}-.job-runtime-note span {- color: #8ea6f2;- font-size: var(--text-2xs);- font-weight: var(--weight-semibold);- letter-spacing: var(--tracking-label);+.job-actions .primary-button,+.job-actions .danger-button {+ width: 100%;+ min-height: var(--control-lg);+ font-size: var(--text-base);}-.job-runtime-note p {- margin: var(--space-2) 0 0;+.job-actions .primary-button:disabled {+ cursor: not-allowed;color: var(--text-muted);- font-size: var(--text-base);+ border-color: var(--line-strong);+ background: var(--panel-3);+ box-shadow: none;+ opacity: 1;+}++.job-actions__note {+ margin: var(--space-3) 0 0;+ color: var(--text-muted);+ font-size: var(--text-sm);line-height: var(--leading-normal);}-.job-actions {- margin-top: var(--space-3);+/* Shown when the honest answer is "there is no next step here". */++.job-actions__blocked {+ padding: var(--space-4);+ border: 1px solid color-mix(in srgb, var(--warning) 32%, transparent);+ border-radius: var(--radius-lg);+ background: color-mix(in srgb, var(--warning) 8%, var(--panel-2));}-.job-actions .primary-button {- width: 100%;- min-height: var(--control-lg);+.job-actions__blocked b {+ display: block;+ color: var(--warning);+ font-size: var(--text-base);+ font-weight: var(--weight-semibold);+ line-height: var(--leading-snug);}-.job-actions .primary-button:disabled {- cursor: not-allowed;+.job-actions__blocked p {+ margin: var(--space-2) 0 0;+ color: var(--text-secondary);+ font-size: var(--text-sm);+ line-height: var(--leading-normal);+}++.job-actions__blocked small {+ display: block;+ margin-top: var(--space-3);color: var(--text-muted);- border-color: #303642;- background: #171b22;- opacity: 1;+ font-size: var(--text-xs);+ line-height: var(--leading-normal);}/* --- Empty state ----------------------------------------------------------- */.job-empty {max-width: var(--content-max);- min-height: 340px;- margin: auto;+ margin: 0 auto;+ padding: var(--space-8) var(--space-6);display: flex;flex-direction: column;align-items: center;- justify-content: center;- border: 1px dashed #292f39;+ text-align: center;+ border: 1px dashed var(--line-strong);+ border-radius: var(--radius-xl);+ background: var(--panel);+}++.job-empty__icon {+ width: var(--space-8);+ height: var(--space-8);+ display: grid;+ place-items: center;border-radius: var(--radius-lg);- color: #7f8fc4;+ color: var(--accent-bright);+ background: var(--accent-soft);}.job-empty h2 {- margin: var(--space-3) 0 var(--space-1);- color: var(--text-secondary);- font-size: var(--text-lg);+ margin: var(--space-4) 0 var(--space-2);+ color: var(--text-primary);+ font-size: var(--text-xl);+ font-weight: var(--weight-semibold);line-height: var(--leading-snug);+ letter-spacing: var(--tracking-tight);}.job-empty p {+ max-width: 62ch;margin: 0;color: var(--text-muted);font-size: var(--text-base);line-height: var(--leading-normal);}+.job-empty__tips {+ max-width: 62ch;+ margin: var(--space-5) 0 0;+ padding: 0;+ display: grid;+ gap: var(--space-2);+ list-style: none;+ text-align: left;+}++.job-empty__tips li {+ padding-left: var(--space-4);+ position: relative;+ color: var(--text-secondary);+ font-size: var(--text-sm);+ line-height: var(--leading-normal);+}++.job-empty__tips li::before {+ content: "";+ position: absolute;+ left: 0;+ top: 0.6em;+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: var(--accent-bright);+}+/* --- Responsive ------------------------------------------------------------ */+@media (max-width: 1280px) {+ .job-detail {+ grid-template-columns: minmax(0, 1fr);+ }++ .job-detail__visual {+ border-right: 0;+ border-bottom: 1px solid var(--line);+ }+}+@media (max-width: 1180px) {.generator-view {- grid-template-columns: 264px minmax(0, 1fr);+ grid-template-columns: 288px minmax(0, 1fr);}.generator-main {padding-inline: var(--space-5);}- .job-detail {- grid-template-columns: minmax(420px, 1.5fr) minmax(300px, 0.75fr);+ .generator-heading {+ flex-direction: column;+ align-items: flex-start;+ }++ .generation-composer__foot {+ flex-direction: column;+ align-items: stretch;+ }++ .generation-composer__submit {+ width: 100%;}}