AI media harness for planning, generating, and editing locally
TypeScript
Move Single Shot prompt to shot panel
Bitti4bc7a16f8bfb
diff --git a/docs/scene-types.md b/docs/scene-types.mdindex c364031..754815c 100644--- a/docs/scene-types.md+++ b/docs/scene-types.md@@ -3,7 +3,7 @@The Scene panel saves a type on each scene:- **Prompt** is the default for ordinary video scenes. It supports shot descriptions, speech, Look, sound, music and references cited in prompts, without start- or last-frame selectors. Stored frame anchors and continuation links are inactive.-- **Single Shot** has one prompt and an optional **Ending prompt**, both with reference support. It generates a short ending first, then uses those latents to anchor the full shot. A blank ending prompt uses the main prompt. **Starting video** can select any other generated scene; ending latents from its full clip guide the new shot's beginning. Generate all handles dependency order. Use matching resolution and latent-upscale settings, a duration of at least two seconds, and updated LAN workers.+- **Single Shot** keeps its main prompt in the Shot panel and an optional **Ending prompt** in the Scene panel, both with reference support. It generates a short ending first, then uses those latents to anchor the full shot. A blank ending prompt uses the main prompt. **Starting video** can select any other generated scene; ending latents from its full clip guide the new shot's beginning. Generate all handles dependency order. Use matching resolution and latent-upscale settings, a duration of at least two seconds, and updated LAN workers.- **First & Last Frame** adds optional start- and last-frame anchors to the same controls. Older scenes without a type retain this type when they have frame selections; otherwise they use Prompt. Switching types retains saved frame selections for later use.- **Backdrop** generates the described subject and action against a selected green, blue, black or white background (green by default). The compiled prompt requests a uniform color across all shots, with no scenery, floor, horizon, texture, gradients or backdrop shadows. Prompt references guide the subject; their original settings are replaced. Stored frame anchors and continuation links are inactive. Apply Chroma Key to the generated timeline clip and select the matching backdrop or Auto to remove it. Generation still produces ordinary video: transparency is applied by the effect. Choose a color absent from the subject and describe action that fits inside the frame.- **Continue** uses another scene's saved latents. Choose the source scene, beginning or end (default: end), and overlap in frames (default: 22; increments of 17 at 24 fps). Generate the source first, or use Generate All to render dependencies in order. Scene length controls the new segment. The saved video keeps Slopfab's full joined video and audio; adjacent source and continuation clips use that shared decode in preview and export, while trims remain relative to each scene. Regenerate older Continue scenes to preserve both sides of the decoded boundary. Old Previous scene selections become Continue scenes linked to their original source; reordering scenes keeps that link.diff --git a/src/components/workspace/GeneratorView.test.tsx b/src/components/workspace/GeneratorView.test.tsxindex 4bd46cf..c8feb6b 100644--- a/src/components/workspace/GeneratorView.test.tsx+++ b/src/components/workspace/GeneratorView.test.tsx@@ -111,15 +111,15 @@ it("queues Long Shot anchors before their intervening bridges", () => {expect(submitted.mock.calls[0][0][2].request.latentBridge).toMatchObject({ leftSceneId: "1", rightSceneId: "3", leftMarginFrames: 17, rightMarginFrames: 17 });});-it("edits reference-aware Single Shot prompts and allows other scene types as starting videos", () => {+it("keeps Single Shot prompts in the shot panel and the ending prompt and starting video in the scene panel", () => {const initial = project();initial.references = [{ id: "hero", kind: "image", name: "Hero", description: "", intendedUse: [], relativePath: "references/hero.png", createdAt: initial.createdAt }];initial.generationJobs[1].sceneType = "single-shot";initial.generationJobs.push(createDraftGenerationJob("A regular scene", { id: "ordinary", title: "Ordinary" }));const state = setup(initial);choose("Scene type", "Single Shot");- const main = screen.getByLabelText("Single Shot prompt"), ending = screen.getByLabelText("Ending prompt");- typePrompt(main, "Walk forward.");+ expect(screen.queryByLabelText("Describe shot 1")).not.toBeInTheDocument();+ const ending = screen.getByLabelText("Ending prompt");typePrompt(ending, "Wave goodbye.");placePromptCaret(ending);fireEvent.focus(ending);@@ -132,7 +132,18 @@ it("edits reference-aware Single Shot prompts and allows other scene types as stchooseOption(source, "Second scene");expect(state.latest().generationJobs[0].continuationSceneId).toBe("scene-second");fireEvent.click(screen.getByRole("button", { name: "Shot 1 of First scene" }));+ expect(screen.queryByLabelText("Ending prompt")).not.toBeInTheDocument();+ const main = screen.getByLabelText("Describe shot 1");+ typePrompt(main, "Walk forward.");+ placePromptCaret(main);+ fireEvent.focus(main);+ fireEvent.click(within(screen.getByRole("toolbar", { name: "Describe shot 1 tools" })).getByRole("button", { name: "Reference" }));+ fireEvent.click(screen.getByRole("button", { name: /^Hero\b/ }));+ expect(sceneShots(state.latest().generationJobs[0])[0].action).toContain("@[ref:hero]");+ fireEvent.click(screen.getByRole("button", { name: "Select scene First scene" }));expect(screen.getByLabelText("Ending prompt")).toBeInTheDocument();+ expect(screen.queryByLabelText("Describe shot 1")).not.toBeInTheDocument();+ expect(state.latest().generationJobs[0].endingPrompt).toContain("@[ref:hero]");fireEvent.click(screen.getByRole("button", { name: "Add scene" }));expect(state.latest().generationJobs.at(-1)?.sceneType).toBe("single-shot");});diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex fa2faf4..1517610 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -154,7 +154,7 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCoconst animate = selected ? sceneTypeFor(selected) === "animate" : false;const selectedShots = useMemo(() => (selected ? sceneShots(selected) : []), [selected]);const shotIndex = selectedShots.findIndex((shot) => shot.id === selection.shotId);- const openShot = !animate && selected?.sceneType !== "single-shot" && shotIndex >= 0 ? selectedShots[shotIndex] : null;+ const openShot = !animate && shotIndex >= 0 ? selectedShots[shotIndex] : null;const shotEndsAt = selected && openShot? shotIndex + 1 < selectedShots.length ? selectedShots[shotIndex + 1].startSeconds : sceneDurationSeconds(selected): 0;diff --git a/src/components/workspace/SceneEditor.tsx b/src/components/workspace/SceneEditor.tsxindex 1958cd4..4e00892 100644--- a/src/components/workspace/SceneEditor.tsx+++ b/src/components/workspace/SceneEditor.tsx@@ -282,26 +282,19 @@ const SCENE_TYPES: { value: SceneType; label: string }[] = [{ value: "bridge", label: "Bridge" },];-function SingleShotPrompts({ job, shots, references, folderPath, disabled, onChange, onShots }: {- job: GenerationJob; shots: SceneShot[]; references: ProjectReference[]; folderPath: string; disabled: boolean;- onChange: (updates: Partial<GenerationJob>) => void; onShots: (shots: SceneShot[]) => void;+function SingleShotEndingPrompt({ job, references, folderPath, disabled, onChange }: {+ job: GenerationJob; references: ProjectReference[]; folderPath: string; disabled: boolean;+ onChange: (updates: Partial<GenerationJob>) => void;}) {const fields = citableReferences(references).map((reference) => ({ id: reference.id, name: reference.name,mediaTypes: referenceMediaTypes(reference), detail: referenceTypeLabel(reference),icon: <ReferenceIcon reference={reference} folderPath={folderPath} fallback={<Text16 />} /> }));const missingLabel = (id: string) => references.find((reference) => reference.id === id)?.name ?? "Deleted reference";- return <>- <div className="shot-card__action">- <span className="shot-card__sublabel">Prompt</span>- <PromptTextField aria-label="Single Shot prompt" rows={6} value={sceneBriefText(shots)} references={fields} missingLabel={missingLabel} disabled={disabled}- onChange={(action) => onShots([{ ...shots[0], startSeconds: 0, action }])} />- </div>- <div className="shot-card__action">+ return <div className="shot-card__action"><span className="shot-card__sublabel">Ending prompt</span><PromptTextField aria-label="Ending prompt" rows={4} value={job.endingPrompt ?? ""} references={fields} missingLabel={missingLabel} disabled={disabled}placeholder="Describe how the shot ends. Leave empty to use the main prompt." onChange={(endingPrompt) => onChange({ endingPrompt })} />- </div>- </>;+ </div>;}const SCENE_TYPE_DESCRIPTIONS: Record<SceneType, string> = {@@ -384,7 +377,7 @@ export function SceneInspector({ job, shots, references, folderPath = "", scenes...scenes.filter((scene) => scene.id !== job.id).map((scene) => ({ value: scene.id, label: scene.title }))]}onChange={(value) => onChange({ continuationSceneId: value || null })} /></PropRow>- <SingleShotPrompts job={job} shots={shots} references={references} folderPath={folderPath} disabled={disabled} onChange={onChange} onShots={onShots} />+ <SingleShotEndingPrompt job={job} references={references} folderPath={folderPath} disabled={disabled} onChange={onChange} /></>}{longShot && <><p className="prop-caption">{longShot.continuation