AI media harness for planning, generating, and editing locally
TypeScript
Rename image template to Zoom
Bittiaaa3770a553c
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex a62b266..647598d 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,7 +4,7 @@ This alpha update adds SeedVR2 and Real-ESRGAN export upscaling, Long Shot and B## What's new-- **Extend image template restored.** Draw or resize the output box, choose a generation resolution, and optionally describe the new surroundings. Output follows the box's aspect ratio and selected pixel budget, resizing the source to fit. Boxes inside the source regenerate the selected crop with refined detail at the target resolution. Positioned source conditioning keeps the scene anchored, while generated edges blend into the original with seam tone matching.+- **Zoom image template (formerly Extend).** Draw or resize the output box, choose a generation resolution, and optionally describe the new surroundings. Output follows the box's aspect ratio and selected pixel budget, resizing the source to fit. Boxes inside the source regenerate the selected crop with refined detail at the target resolution. Positioned source conditioning keeps the scene anchored, while generated edges blend into the original with seam tone matching.- **SeedVR2 upscaling for images and videos.** Restore exports at the selected output size using SeedVR2 3B FP16 and its VAE. Run on the local NVIDIA CUDA GPU or a selected CUDA LAN worker. Workers download missing standard weights or receive your selected local weight files.- **Real-ESRGAN upscaling for images and videos.** Use RealESRGAN x4plus during export, with the result resized to your chosen output dimensions. CUDA and Vulkan are supported. Choose None to export without an upscaler.- **Other weights settings.** Settings → Generator now includes downloads and optional local file paths for Real-ESRGAN, SeedVR2 and the MiniMax H3 latent upscaler. Upscaler downloads share the generator and LoRA download queue, with progress and cancellation in Work Queue.@@ -24,7 +24,7 @@ This alpha update adds SeedVR2 and Real-ESRGAN export upscaling, Long Shot and B## Fixes and improvements-- Extend blends color locally along each edge and smoothly around corners, reducing visible rectangular transitions without spreading high-contrast details into halos.+- Zoom blends color locally along each edge and smoothly around corners, reducing visible rectangular transitions without spreading high-contrast details into halos.- Generate all includes the final scene in an even-length Long Shot sequence, continuing from the preceding scene and preserving earlier joined video and audio. Four scenes generate in 1 → 3 → 2 → 4 order; adding another scene turns the final continuation into a bridge on its next generation.- Long Shot timeline playback keeps the same video player running across adjacent scenes in a joined generation, avoiding a playback restart at bridge boundaries.- Reduced memory retained between generations by releasing consumed SlopFab samples and handles, completed queue snapshots, encoder buffers on errors, and abandoned LAN generation results.diff --git a/src-tauri/core/src/slopfab/ffi/raw/mod.rs b/src-tauri/core/src/slopfab/ffi/raw/mod.rsindex 3dd15b6..d4ccaeb 100644--- a/src-tauri/core/src/slopfab/ffi/raw/mod.rs+++ b/src-tauri/core/src/slopfab/ffi/raw/mod.rs@@ -468,7 +468,7 @@ impl Api {self.error(unsafe { set(r, pixels.as_ptr(), pixels.len(), width, height, width as usize * 3, bounds[0], bounds[1], bounds[2], bounds[3], strength, feather) })}pub fn set_image_edit_invert_mask(&self, r: *mut Request) -> Result<(), String> {- let set = self.set_image_edit_invert_mask.ok_or("Seamless Extend requires SlopFab API 1.20 or later. Update the generation runtime.")?;+ let set = self.set_image_edit_invert_mask.ok_or("Seamless Zoom requires SlopFab API 1.20 or later. Update the generation runtime.")?;self.error(unsafe { set(r, 1) })}pub fn set_save_latents(&self, r: *mut Request, path: &Path) -> Result<(), String> {diff --git a/src-tauri/src/commands/extend_image.rs b/src-tauri/src/commands/extend_image.rsindex 948bd30..efa6929 100644--- a/src-tauri/src/commands/extend_image.rs+++ b/src-tauri/src/commands/extend_image.rs@@ -38,7 +38,7 @@ fn scaled_layout(output: ExtendSize,) -> Result<(ExtendSize, ExtendBounds), String> {if width == 0 || height == 0 || width > 8192 || height > 8192 {- return Err("Invalid Extend source dimensions.".into());+ return Err("Invalid Zoom source dimensions.".into());}let workspace = source_dimensions(width, height);bounds.validate(workspace.width, workspace.height)?;@@ -48,7 +48,7 @@ fn scaled_layout(|| bounds.height > MAX_GENERATION_EDGE|| u64::from(bounds.width) * u64::from(bounds.height) > MAX_GENERATION_PIXELS{- return Err("Extend box dimensions must be multiples of 32 within the maximum generation resolution.".into());+ return Err("Zoom box dimensions must be multiples of 32 within the maximum generation resolution.".into());}if output.width == 0|| output.height == 0@@ -59,7 +59,7 @@ fn scaled_layout(|| u64::from(output.width) * u64::from(output.height) > MAX_GENERATION_PIXELS{return Err(- "Extend output must be aligned to 32 pixels within the maximum generation resolution."+ "Zoom output must be aligned to 32 pixels within the maximum generation resolution.".into(),);}@@ -109,12 +109,12 @@ impl ExtendBounds {|| self.x.unsigned_abs() > 8192|| self.y.unsigned_abs() > 8192{- return Err("Invalid Extend image dimensions.".into());+ return Err("Invalid Zoom image dimensions.".into());}let right = self.x + self.width as i32;let bottom = self.y + self.height as i32;if self.x >= width as i32 || self.y >= height as i32 || right <= 0 || bottom <= 0 {- return Err("The Extend box must overlap the original image.".into());+ return Err("The Zoom box must overlap the original image.".into());}Ok(())}@@ -168,13 +168,13 @@ pub(crate) fn prepare_extend_image(.assets.iter().find(|asset| asset.id == source_id && asset.kind == "image")- .ok_or("The Extend source image no longer exists.")?;+ .ok_or("The Zoom source image no longer exists.")?;let source_path = if let Some(path) = &asset.relative_path {root.existing(path)?} else if let Some(path) = &asset.source_path {std::path::PathBuf::from(path)} else {- return Err("The Extend source has no saved file.".into());+ return Err("The Zoom source has no saved file.".into());};let (width, height) = image::image_dimensions(&source_path).map_err(|e| e.to_string())?;let selection = bounds;@@ -385,7 +385,7 @@ pub(crate) fn save_extended_image(crate::rendered::summary(&job_id).ok_or("The extended image is no longer in memory.")?;if summary.frame_count != 1 || summary.width != bounds.width || summary.height != bounds.height{- return Err("The generated image does not match the Extend box.".into());+ return Err("The generated image does not match the Zoom box.".into());}let (_, pixels) = crate::rendered::take_still(&job_id)?;let mut result = RgbaImage::from_raw(bounds.width, bounds.height, pixels)diff --git a/src/components/workspace/Extend.test.tsx b/src/components/workspace/Extend.test.tsxindex f19f9c4..a10fb5b 100644--- a/src/components/workspace/Extend.test.tsx+++ b/src/components/workspace/Extend.test.tsx@@ -15,27 +15,27 @@ import type { ExtendBounds } from "../../lib/extendImage";afterEach(() => { cleanup(); localStorage.clear(); vi.restoreAllMocks(); });const source = { id: "source", name: "Source", kind: "image" as const, relativePath: "media/source.png", mimeType: "image/png", width: 400, height: 300, createdAt: "2026-10-04T00:00:00Z" };-it("opens Extend from Template with box controls and returns to image settings", () => {+it("opens Zoom from Template with box controls and returns to image settings", () => {vi.spyOn(persistence, "readMediaFileUrl").mockResolvedValue(null);const config = parseProjectConfig(fixture); config.assets = [source]; config.imageScene!.outputAssetId = source.id;render(<ImageEditor config={config} folderPath="D:/Images" onChange={vi.fn()} onGenerate={vi.fn()} onCancel={vi.fn()} onGenerateExtend={vi.fn()} />);fireEvent.click(screen.getByRole("button", { name: "Template" }));- expect(screen.getByRole("menuitem", { name: "Extend" })).toBeEnabled();+ expect(screen.getByRole("menuitem", { name: "Zoom" })).toBeEnabled();expect(screen.getByRole("menuitem", { name: "Character sheet" })).toBeEnabled();- fireEvent.click(screen.getByRole("menuitem", { name: "Extend" }));- expect(screen.getByLabelText("Extend bounding box tool")).toBeInTheDocument();- expect(screen.getByLabelText("Extend width")).toHaveValue(608);- expect(screen.getByLabelText("Extend resolution")).toBeEnabled();- expect(screen.getByLabelText("Extend prompt")).toBeInTheDocument();+ fireEvent.click(screen.getByRole("menuitem", { name: "Zoom" }));+ expect(screen.getByLabelText("Zoom bounding box tool")).toBeInTheDocument();+ expect(screen.getByLabelText("Zoom width")).toHaveValue(608);+ expect(screen.getByLabelText("Zoom resolution")).toBeEnabled();+ expect(screen.getByLabelText("Zoom prompt")).toBeInTheDocument();fireEvent.click(screen.getByRole("button", { name: "Close template settings" }));- expect(screen.queryByLabelText("Extend bounding box tool")).not.toBeInTheDocument();+ expect(screen.queryByLabelText("Zoom bounding box tool")).not.toBeInTheDocument();});it("executes an optional-prompt extension at the changed resolution without changing video settings", () => {vi.spyOn(persistence, "readMediaFileUrl").mockResolvedValue(null);vi.spyOn(persistence, "isTauri").mockReturnValue(true);vi.spyOn(settings, "templateUsable").mockReturnValue(true);- const generator = settings.createGeneratorTemplate("Extend generator");+ const generator = settings.createGeneratorTemplate("Zoom generator");settings.saveGeneratorTemplateSettings({ templates: [generator], defaultTemplateId: generator.id });const initial = parseProjectConfig(fixture);initial.assets = [source]; initial.imageScene!.outputAssetId = source.id;@@ -47,8 +47,8 @@ it("executes an optional-prompt extension at the changed resolution without chan}render(<Harness />);fireEvent.click(screen.getByRole("button", { name: "Template" }));- fireEvent.click(screen.getByRole("menuitem", { name: "Extend" }));- choose("Extend resolution", "1088p");+ fireEvent.click(screen.getByRole("menuitem", { name: "Zoom" }));+ choose("Zoom resolution", "1088p");expect(latest.imageSettings?.resolution).toBe("1088p");expect(latest.settings).toEqual(initial.settings);fireEvent.click(screen.getByRole("button", { name: "Execute" }));@@ -64,7 +64,7 @@ it("moves, resizes, redraws and cancels box drags in original pixel coordinates"return <ExtendCanvas source={source} folderPath="D:/Images" bounds={bounds} onChange={setBounds} disabled={false} />;}render(<Harness />);- const canvas = screen.getByLabelText("Extend bounding box tool");+ const canvas = screen.getByLabelText("Zoom bounding box tool");const pointer = (type: "pointerDown" | "pointerMove" | "pointerUp" | "pointerCancel", target: Element, x: number, y: number) => {const view = canvas.getAttribute("viewBox")!.split(" ").map(Number);vi.spyOn(canvas, "getBoundingClientRect").mockReturnValue({ left: 0, top: 0, width: view[2], height: view[3] } as DOMRect);@@ -72,7 +72,7 @@ it("moves, resizes, redraws and cancels box drags in original pixel coordinates"Object.defineProperties(event, { button: { value: 0 }, pointerId: { value: 1 }, clientX: { value: x - view[0] }, clientY: { value: y - view[1] } });fireEvent(target, event);};- pointer("pointerDown", screen.getByRole("button", { name: "Move Extend box" }), 0, 0);+ pointer("pointerDown", screen.getByRole("button", { name: "Move Zoom box" }), 0, 0);pointer("pointerMove", canvas, 20, 10); pointer("pointerUp", canvas, 20, 10);expect(latest).toEqual({ x: -76, y: -54, width: 576, height: 448 });pointer("pointerDown", canvas.querySelector('[data-handle="nw"]')!, -76, -54);@@ -99,7 +99,7 @@ it.each([0.5, 2])("snaps within six screen pixels at %sx scale without trappingreturn <ExtendCanvas source={{ ...source, width: 384, height: 288 }} folderPath="D:/Images" bounds={bounds} onChange={setBounds} disabled={false} />;}render(<Harness />);- const canvas = screen.getByLabelText("Extend bounding box tool");+ const canvas = screen.getByLabelText("Zoom bounding box tool");const pointer = (type: "pointerDown" | "pointerMove" | "pointerUp" | "pointerCancel", target: Element, x: number, y: number) => {const view = canvas.getAttribute("viewBox")!.split(" ").map(Number);vi.spyOn(canvas, "getBoundingClientRect").mockReturnValue({ left: 0, top: 0, width: view[2] * scale, height: view[3] * scale } as DOMRect);@@ -126,7 +126,7 @@ it.each([0.5, 2])("snaps within six screen pixels at %sx scale without trappingexpect(latest).toEqual(original);// Moving snaps by translation, never by stretching the box.- pointer("pointerDown", screen.getByRole("button", { name: "Move Extend box" }), 0, 0);+ pointer("pointerDown", screen.getByRole("button", { name: "Move Zoom box" }), 0, 0);pointer("pointerMove", canvas, 96 - 4 / scale, 64 + 4 / scale);expect(latest).toEqual({ ...original, x: 0, y: 0 });pointer("pointerCancel", canvas, 96, 64);@@ -136,7 +136,7 @@ it.each([0.5, 2])("snaps within six screen pixels at %sx scale without trappingpointer("pointerMove", canvas, 384 + 4 / scale, 288 + 4 / scale);expect(latest).toEqual({ x: 0, y: 0, width: 384, height: 288 });pointer("pointerUp", canvas, 384, 288);- fireEvent.keyDown(screen.getByRole("button", { name: "Move Extend box" }), { key: "ArrowLeft" });+ fireEvent.keyDown(screen.getByRole("button", { name: "Move Zoom box" }), { key: "ArrowLeft" });expect(latest).toEqual({ x: -1, y: 0, width: 384, height: 288 });});@@ -145,7 +145,7 @@ it("executes a contained selection as crop regeneration", () => {vi.spyOn(persistence, "readMediaFileUrl").mockResolvedValue(null);vi.spyOn(persistence, "isTauri").mockReturnValue(true);vi.spyOn(settings, "templateUsable").mockReturnValue(true);- const generator = settings.createGeneratorTemplate("Extend generator");+ const generator = settings.createGeneratorTemplate("Zoom generator");settings.saveGeneratorTemplateSettings({ templates: [generator], defaultTemplateId: generator.id });const initial = parseProjectConfig(fixture);initial.assets = [source]; initial.imageScene!.outputAssetId = source.id;@@ -156,9 +156,9 @@ it("executes a contained selection as crop regeneration", () => {}render(<Harness />);fireEvent.click(screen.getByRole("button", { name: "Template" }));- fireEvent.click(screen.getByRole("menuitem", { name: "Extend" }));+ fireEvent.click(screen.getByRole("menuitem", { name: "Zoom" }));for (const [field, value] of Object.entries({ x: 32, y: 32, width: 128, height: 96 })) {- fireEvent.change(screen.getByLabelText(`Extend ${field}`), { target: { value: String(value) } });+ fireEvent.change(screen.getByLabelText(`Zoom ${field}`), { target: { value: String(value) } });}expect(screen.getByText(/Regenerate selection:/)).toBeInTheDocument();expect(screen.getByRole("button", { name: "Execute" })).toBeEnabled();diff --git a/src/components/workspace/ExtendCanvas.tsx b/src/components/workspace/ExtendCanvas.tsxindex c3518cb..7abcb5e 100644--- a/src/components/workspace/ExtendCanvas.tsx+++ b/src/components/workspace/ExtendCanvas.tsx@@ -66,7 +66,7 @@ export function ExtendCanvas({ source, folderPath, bounds, onChange, disabled }:<div className="extend-source" style={{ left: `${-camera.x / camera.width * 100}%`, top: `${-camera.y / camera.height * 100}%`, width: `${width / camera.width * 100}%`, height: `${height / camera.height * 100}%` }}><ReferenceImage folderPath={folderPath} relativePath={source.relativePath} sourcePath={source.sourcePath} alt={source.name} /></div>- <svg className="extend-overlay" viewBox={`${camera.x} ${camera.y} ${camera.width} ${camera.height}`} aria-label="Extend bounding box tool" aria-disabled={disabled}+ <svg className="extend-overlay" viewBox={`${camera.x} ${camera.y} ${camera.width} ${camera.height}`} aria-label="Zoom bounding box tool" aria-disabled={disabled}onPointerDown={(event) => {if (disabled || event.button !== 0) return;let at = point(event); if (!Number.isFinite(at.x + at.y)) return;@@ -108,7 +108,7 @@ export function ExtendCanvas({ source, folderPath, bounds, onChange, disabled }:<path className="extend-excluded" d={`M0,0h${width}v${height}h${-width}Z` + hole} fillRule="evenodd" pointerEvents="none" /><path className="extend-generated" d={outline + hole} fillRule="evenodd" pointerEvents="none" /><rect className="extend-original" x="0" y="0" width={width} height={height} vectorEffect="non-scaling-stroke" pointerEvents="none" />- <rect className="extend-box" {...box} data-handle="move" vectorEffect="non-scaling-stroke" role="button" tabIndex={disabled ? -1 : 0} aria-label="Move Extend box"+ <rect className="extend-box" {...box} data-handle="move" vectorEffect="non-scaling-stroke" role="button" tabIndex={disabled ? -1 : 0} aria-label="Move Zoom box"onKeyDown={(event) => {if (disabled || !["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(event.key)) return;event.preventDefault(); const step = event.shiftKey ? 10 : 1;diff --git a/src/components/workspace/ExtendSettings.tsx b/src/components/workspace/ExtendSettings.tsxindex dd8ccc9..edde066 100644--- a/src/components/workspace/ExtendSettings.tsx+++ b/src/components/workspace/ExtendSettings.tsx@@ -20,12 +20,12 @@ export function ExtendSettings({ config, source, options, onChange, onResolution}catch (reason) { return { output: null, prompt: null, message: reason instanceof Error ? reason.message : String(reason) }; }}, [config, source, options]);- return <aside className="image-inspector image-template-settings" aria-label="Extend settings">- <ItemHeader name="Extend" meta="Template" actions={<button type="button" className="icon-button" aria-label="Close template settings" data-tooltip="Back to image settings" onClick={onClose}><Dismiss16 aria-hidden="true" /></button>} />+ return <aside className="image-inspector image-template-settings" aria-label="Zoom settings">+ <ItemHeader name="Zoom" meta="Template" actions={<button type="button" className="icon-button" aria-label="Close template settings" data-tooltip="Back to image settings" onClick={onClose}><Dismiss16 aria-hidden="true" /></button>} /><form className="image-template-settings__form" onSubmit={(event) => { event.preventDefault(); if (!busy && !disabledReason && !validation.message) onExecute(); }}><div className="image-inspector__fields image-template-settings__fields"><PropRow label="Resolution" htmlFor="extend-resolution" tooltip="The box sets the aspect ratio. The selected resolution sets the pixel budget; expanding the box makes the source smaller within that output.">- <ComboBox id="extend-resolution" aria-label="Extend resolution" value={imageSettings(config).resolution} options={PROJECT_RESOLUTIONS.map((value) => ({ value, label: value }))}+ <ComboBox id="extend-resolution" aria-label="Zoom resolution" value={imageSettings(config).resolution} options={PROJECT_RESOLUTIONS.map((value) => ({ value, label: value }))}disabled={busy || !onResolutionChange} onChange={(value) => onResolutionChange?.(value)} /></PropRow>{validation.output && <p className="image-inspector__caption">Output: {validation.output.width} × {validation.output.height} px</p>}@@ -33,7 +33,7 @@ export function ExtendSettings({ config, source, options, onChange, onResolution<p className="image-inspector__caption">Source: {source.name} · {source.width} × {source.height} px</p>{(["x", "y", "width", "height"] as const).map((field) => <PropRow key={field} label={field === "x" ? "X" : field === "y" ? "Y" : field === "width" ? "Width" : "Height"} htmlFor={`extend-${field}`}tooltip={field === "x" || field === "y" ? "Drag the box or its handles, or drag outside it to draw a new box." : "Sizes use 32-pixel increments. The source is resized to fit the box at the selected generation resolution."}>- <input id={`extend-${field}`} aria-label={`Extend ${field}`} className="text-field" type="number" step={field === "x" || field === "y" ? 1 : EXTEND_GRID} min={field === "x" || field === "y" ? -8192 : EXTEND_GRID} max={field === "x" || field === "y" ? 8192 : EXTEND_MAX_EDGE} required disabled={busy}+ <input id={`extend-${field}`} aria-label={`Zoom ${field}`} className="text-field" type="number" step={field === "x" || field === "y" ? 1 : EXTEND_GRID} min={field === "x" || field === "y" ? -8192 : EXTEND_GRID} max={field === "x" || field === "y" ? 8192 : EXTEND_MAX_EDGE} required disabled={busy}value={options.bounds[field]} onChange={(event) => {const value = event.target.valueAsNumber; if (!Number.isFinite(value)) return;const bounds = { ...options.bounds, [field]: value };@@ -45,12 +45,12 @@ export function ExtendSettings({ config, source, options, onChange, onResolutionvalue={Number.isNaN(options.steps) ? "" : options.steps} onChange={(event) => onChange({ ...options, steps: event.target.valueAsNumber })} /></PropRow><PropRow label="Seed" htmlFor="extend-seed" tooltip="Use -1 for a random seed."><input id="extend-seed" className="text-field" type="number" min="-1" max={Number.MAX_SAFE_INTEGER} step="1" required disabled={busy}value={Number.isNaN(options.seed) ? "" : options.seed} onChange={(event) => onChange({ ...options, seed: event.target.valueAsNumber })} /></PropRow>- <div className="image-inspector__area"><span>Prompt (optional)</span><PromptTextField aria-label="Extend prompt" value={options.prompt} onChange={(prompt) => onChange({ ...options, prompt })}+ <div className="image-inspector__area"><span>Prompt (optional)</span><PromptTextField aria-label="Zoom prompt" value={options.prompt} onChange={(prompt) => onChange({ ...options, prompt })}references={references} missingLabel={missingLabel} disabled={busy} placeholder={validation.mode === "regenerate" ? "Describe details to refine…" : "Describe what should appear beyond the image…"} /></div>- {validation.message && <InfoBar severity="error" title="Adjust the Extend settings" message={validation.message} />}+ {validation.message && <InfoBar severity="error" title="Adjust the Zoom settings" message={validation.message} />}</div><div className="image-template-settings__footer">- <TemplateDebugPrompt name="Extend" prompts={validation.prompt === null ? [] : [{ label: "Extend", prompt: validation.prompt }]} />+ <TemplateDebugPrompt name="Zoom" prompts={validation.prompt === null ? [] : [{ label: "Zoom", prompt: validation.prompt }]} />{disabledReason && <p className="image-inspector__caption">{disabledReason}</p>}<button type="submit" className="primary-button" disabled={busy || Boolean(disabledReason || validation.message)}><Sparkle16 aria-hidden="true" />{busy ? "Executing…" : "Execute"}</button></div>diff --git a/src/components/workspace/ImageEditor.test.tsx b/src/components/workspace/ImageEditor.test.tsxindex 86f1294..ed5660c 100644--- a/src/components/workspace/ImageEditor.test.tsx+++ b/src/components/workspace/ImageEditor.test.tsx@@ -36,7 +36,7 @@ it.each([const initial = parseProjectConfig(fixture);const source = { id: "source", kind: "image" as const, name: "Original", relativePath: "media/source.png", width: 512, height: 512, mimeType: "image/png", createdAt: initial.createdAt };initial.assets = [source];- const name = kind === "extend" ? "Extend" : "Character sheet";+ const name = kind === "extend" ? "Zoom" : "Character sheet";const generation = { ...imageGenerationSnapshot({ ...initial, imageScene: { ...createImageScene("Snowy forest"), steps: 28, seed: -1 } }, "Compiled prompt", "removed-generator"), usedSeed: 1234,template: { sourceId: source.id, sourceName: source.name, generatorName: "Recorded generator", prompt: "Snowy forest", steps: 28, seed: -1,...(kind === "extend" ? { kind, bounds: { x: -64, y: -32, width: 768, height: 640 } } : { kind, height: 1024 }) } };@@ -57,10 +57,10 @@ it.each([expect(promptValue(panel.getByLabelText(`${name} prompt`))).toBe("Snowy forest");expect(panel.getByRole("button", { name: "Executing…" })).toBeDisabled();if (kind === "extend") {- expect(panel.getByLabelText("Extend x")).toHaveValue(-64);- expect(panel.getByLabelText("Extend y")).toHaveValue(-32);- expect(panel.getByLabelText("Extend width")).toHaveValue(768);- expect(panel.getByLabelText("Extend height")).toHaveValue(640);+ expect(panel.getByLabelText("Zoom x")).toHaveValue(-64);+ expect(panel.getByLabelText("Zoom y")).toHaveValue(-32);+ expect(panel.getByLabelText("Zoom width")).toHaveValue(768);+ expect(panel.getByLabelText("Zoom height")).toHaveValue(640);} else expect(comboValue(panel.getByLabelText("Character sheet resolution"))).toBe("1024");expect(screen.getByRole("button", { name: "Cancel" })).toBeEnabled();expect(screen.getByRole("progressbar", { name: "Image generation progress" })).toBeInTheDocument();@@ -95,14 +95,14 @@ it.each(["extend", "character-sheet"] as const)("returns from %s settings to norconst work = { id: "job", imageAssetId: "source", imageDraftId: "result", status: "generating", progress: 0.25, detail: "Generating template" } as WorkItem;const props = { folderPath: "D:/Images", onChange: vi.fn(), onGenerate: vi.fn(), onCancel: vi.fn() };const { rerender } = render(<ImageEditor {...props} config={pending} workItems={[work]} />);- expect(screen.getByRole("complementary", { name: kind === "extend" ? "Extend settings" : "Character sheet settings" })).toBeInTheDocument();+ expect(screen.getByRole("complementary", { name: kind === "extend" ? "Zoom settings" : "Character sheet settings" })).toBeInTheDocument();const result = { ...source, id: "result", name: "Result", relativePath: "media/result.png" };const completed = completeImageDraft(pending, result.id, { ...result, imageGeneration: { ...generation, scene: createImageEditScene(result, generation.scene) } });rerender(<ImageEditor {...props} config={completed} workItems={[{ ...work, status: "completed", progress: 1 }]} />);expect(screen.getByRole("complementary", { name: "Image node inspector" })).toBeInTheDocument();expect(screen.getByLabelText("Edit prompt")).toBeInTheDocument();expect(screen.getByLabelText("Used seed")).toHaveValue("42");- expect(screen.queryByRole("complementary", { name: /^(Extend|Character sheet) settings$/ })).not.toBeInTheDocument();+ expect(screen.queryByRole("complementary", { name: /^(Zoom|Character sheet) settings$/ })).not.toBeInTheDocument();});/* Undo lives in the title bar; inside the editor it is Ctrl+Z. */diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex e277a5b..0b03ec2 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -161,7 +161,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGenelet extendSize: { width: number; height: number } | null = null;if (extendMode && extendOptions && output?.width && output.height) {try { extendSize = extendOutputDimensions(config, extendOptions.bounds); }- catch { /* Invalid bounds are explained in Extend settings. */ }+ catch { /* Invalid bounds are explained in Zoom settings. */ }}const images = config.assets.filter((asset) => asset.kind === "image");const menuImage = images.find((asset) => asset.id === imageMenu?.id);@@ -542,7 +542,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene/></div><div className="image-tools__center">- {extendMode ? <span className="extend-tool-active"><Boxes16Filled aria-hidden="true" /> Extend box</span> : <>+ {extendMode ? <span className="extend-tool-active"><Boxes16Filled aria-hidden="true" /> Zoom box</span> : <><div className="image-tools__group" role="radiogroup" aria-label="Canvas tool" onKeyDown={(event) => {if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;event.preventDefault();@@ -584,7 +584,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGenedisabled={!output || (!output.relativePath && !output.sourcePath)}onClick={(event) => templateMenu.open(event.currentTarget, [{ label: "Character sheet", icon: <Image16 />,onSelect: () => { setExtendSourceId(null); setTemplateSourceId(output!.id); },- }, { label: "Extend", icon: <Boxes16 />, disabled: !output?.width || !output?.height || Boolean(active),+ }, { label: "Zoom", icon: <Boxes16 />, disabled: !output?.width || !output?.height || Boolean(active),onSelect: () => {setTemplateSourceId(null); setExtendSourceId(output!.id);setExtendOptions({ bounds: initialExtendBounds(output!.width!, output!.height!), prompt: "", steps: template?.defaultSteps ?? 20, seed: -1 });@@ -678,7 +678,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene{boxes && scene.nodes.filter((node) => node.box).map((node) => { const box = pointer.current?.id === node.id && draftBox ? draftBox : node.box!; return <span key={node.id} className="image-box-label" style={{ left: `${box.x / 10}%`, top: `${box.y / 10}%` }}>{node.name}</span>; })}</div></div>}{(error || work?.error) && <InfoBar className="image-error" severity="error" title="Couldn’t update the image" message={error ?? work?.error ?? ""} onClose={error ? () => setError(null) : undefined} />}- <div className="image-status" role="status">{active && <ProgressBar value={work.progress * 100} aria-label="Image generation progress" />}<span>{active ? work.detail : extendMode && extendOptions ? `Extend: ${extendSize?.width ?? "-"} \u00d7 ${extendSize?.height ?? "-"} px` : templateSnapshot ? `${templateSnapshot.kind === "extend" ? "Extend" : "Character sheet"} · ${width} × ${height} px` : imageRoot ? editPlan?.error ?? `${width} × ${height} · ${editPlan?.edits.length} edits in hierarchy order` : !isTauri() ? "Image generation is available in the desktop app." : `${width} × ${height}${isMiniMaxH3 ? "" : " · Placement boxes guide the prompt"}`}</span></div>+ <div className="image-status" role="status">{active && <ProgressBar value={work.progress * 100} aria-label="Image generation progress" />}<span>{active ? work.detail : extendMode && extendOptions ? `Zoom: ${extendSize?.width ?? "-"} \u00d7 ${extendSize?.height ?? "-"} px` : templateSnapshot ? `${templateSnapshot.kind === "extend" ? "Zoom" : "Character sheet"} · ${width} × ${height} px` : imageRoot ? editPlan?.error ?? `${width} × ${height} · ${editPlan?.edits.length} edits in hierarchy order` : !isTauri() ? "Image generation is available in the desktop app." : `${width} × ${height}${isMiniMaxH3 ? "" : " · Placement boxes guide the prompt"}`}</span></div><ImageBar ref={imageResults} images={images} selectedId={scene.outputAssetId} folderPath={folderPath} onSelect={selectImage}onMenu={(id, x, y, inFamily) => { setContextMenu(null); setImageMenu({ id, x, y, inFamily, source: "bar" }); }} /></section>diff --git a/src/lib/extendImage.ts b/src/lib/extendImage.tsindex 24db5b3..fa9d412 100644--- a/src/lib/extendImage.ts+++ b/src/lib/extendImage.ts@@ -10,7 +10,7 @@ export const EXTEND_SEAM = 16;const MAX_GENERATION_SIZE = outputDimensions("2048p", "16:9");export const EXTEND_MAX_EDGE = Math.max(MAX_GENERATION_SIZE.width, MAX_GENERATION_SIZE.height);export const EXTEND_MAX_PIXELS = MAX_GENERATION_SIZE.width * MAX_GENERATION_SIZE.height;-/** Selection bounds in the Extend workspace; negative coordinates extend left/up. */+/** Selection bounds in the Zoom workspace; negative coordinates extend left/up. */export interface ExtendBounds { x: number; y: number; width: number; height: number }export interface ExtendOptions { bounds: ExtendBounds; prompt: string; steps: number; seed: number }export function extendSourceDimensions(width: number, height: number) {@@ -45,7 +45,7 @@ export function extendOutputDimensions(config: ProjectConfig, bounds: ExtendBounconst scale = Math.min(Math.sqrt(pixelBudget / (bounds.width * bounds.height)), EXTEND_MAX_EDGE / bounds.width, EXTEND_MAX_EDGE / bounds.height);const width = Math.floor(bounds.width * scale / EXTEND_GRID) * EXTEND_GRID;const height = Math.floor(bounds.height * scale / EXTEND_GRID) * EXTEND_GRID;- if (width < EXTEND_GRID || height < EXTEND_GRID) throw new Error("The Extend box is too narrow for a 32-pixel generation grid at this resolution.");+ if (width < EXTEND_GRID || height < EXTEND_GRID) throw new Error("The Zoom box is too narrow for a 32-pixel generation grid at this resolution.");return { width, height };}@@ -100,7 +100,7 @@ export function extendContext(preserved: ExtendBounds, output: { width: number;width: preserved.width - left - right, height: preserved.height - top - bottom };if (Math.ceil(context.x / EXTEND_GRID) >= Math.floor((context.x + context.width) / EXTEND_GRID)|| Math.ceil(context.y / EXTEND_GRID) >= Math.floor((context.y + context.height) / EXTEND_GRID)) {- throw new Error("Keep a larger area of the original image inside the Extend box, or increase the generation resolution.");+ throw new Error("Keep a larger area of the original image inside the Zoom box, or increase the generation resolution.");}return context;}diff --git a/src/lib/workQueue.ts b/src/lib/workQueue.tsindex 7e9ab9b..41ccced 100644--- a/src/lib/workQueue.ts+++ b/src/lib/workQueue.ts@@ -304,8 +304,8 @@ export class WorkQueue {this.publish(); this.icons.yieldToVideo(); void this.pump();}enqueueExtendImage(session: ProjectSession, template: GeneratorTemplate, sourceId: string, options: ExtendOptions) {- if (!isTauri()) throw new Error("Extend requires the desktop app.");- if (template.mode === "animate") throw new Error("Choose a prompt generator for Extend.");+ if (!isTauri()) throw new Error("Zoom requires the desktop app.");+ if (template.mode === "animate") throw new Error("Choose a prompt generator for Zoom.");const current = session.getSnapshot().config;const source = current.assets.find((asset) => asset.id === sourceId && asset.kind === "image" && !asset.imageDraft);if (!source || (!source.relativePath && !source.sourcePath)) throw new Error("Select a saved image to extend.");@@ -337,7 +337,7 @@ export class WorkQueue {imageGeneration,session, sceneId: current.imageScene?.nodes[0].id ?? "image-root", config, snapshot: JSON.stringify(current.imageScene), request, submitted: false, cancelled: false, done, finish });this.items = [...this.items, { id, kind: "image", imageAssetId: sourceId, imageDraftId: id, projectKey, folderPath: session.record.folderPath, projectName: config.name,- sceneId: this.work.get(id)!.sceneId, title: `${regenerate ? "Regenerate" : "Extend"} · ${source.name}`, submittedAt: new Date().toISOString(), status: "queued", progress: 0,+ sceneId: this.work.get(id)!.sceneId, title: `Zoom · ${source.name}`, submittedAt: new Date().toISOString(), status: "queued", progress: 0,detail: regenerate ? "Waiting to regenerate selection" : "Waiting to extend image", error: null, completionAt: null, cancelling: false, needsSave: false,settings: { frames: 1, steps: request.steps, seed: request.seed, canvasWidth: request.canvasWidth, canvasHeight: request.canvasHeight } }];session.update((current) => createTemplateImageDraft(current, id, resultName, imageGeneration, compiled.layout.output));