AI media harness for planning, generating, and editing locally
TypeScript
Add bounded sliders and editable effect values
Bitti59077667e838
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex adbc439..3f4d0fb 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,6 +4,8 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an## What's new+- **Inspector sliders and editable effect values.** Numeric settings such as Steps, sigma shifts, CFG, placement and clip transforms now pair draggable sliders with compact number fields. Timeline and generation effect values can also be typed directly, with defined ranges, reset support and synchronized controls. Seed remains a plain number field.+- **Agent frame inspection.** Agents can view timeline frames, generated scenes and shots, stored scene takes, image/video references and specific generated images. Motions are rendered at the requested time, both directly and in timeline layers. Captures respect scene offsets and reference trims, without changing playback or selection.- **Scene generation history.** Each Video scene has a thumbnail strip on its right with up to four completed takes and a separate Draft for edits. Select a take to restore its shots, prompts and scene settings, or right-click and choose Make Primary to use its video on the timeline. Duplicate creates a new scene with independent copies of the selected scene's settings and shots.diff --git a/src/components/workspace/CharacterSheetSettings.tsx b/src/components/workspace/CharacterSheetSettings.tsxindex 3deab12..38e0586 100644--- a/src/components/workspace/CharacterSheetSettings.tsx+++ b/src/components/workspace/CharacterSheetSettings.tsx@@ -1,3 +1,4 @@+import { SliderNumberInput, GENERATION_STEPS_RANGE } from "./SliderNumberInput";import { imageSettings } from "../../lib/imageSettings";import { useMemo, useState } from "react";import { CHARACTER_SHEET_HEIGHTS, CHARACTER_SHEET_ORDER, CHARACTER_SHEET_VIEWS, characterSheetDimensions, characterSheetViewIndices, characterSheetViews, compileCharacterSheet, emptyCharacterSheetOptions, type CharacterSheetOptions } from "../../lib/characterSheet";@@ -47,8 +48,8 @@ export function CharacterSheetSettings({ config, source, references, missingLabe<PropRow label="Resolution" htmlFor="character-sheet-resolution" tooltip="Width follows the selected view proportions."><ComboBox id="character-sheet-resolution" aria-label="Character sheet resolution" value={options.height} disabled={busy}options={CHARACTER_SHEET_HEIGHTS.map((height) => ({ value: height, label: `${height} px high` }))} onChange={(height) => update("height", height)} /></PropRow><p className="image-inspector__caption">Sheet size: {indices.reduce((width, index) => width + dimensions[index].width, 0)} × {dimensions[0].height} px.</p>- <PropRow label="Steps" htmlFor="character-sheet-steps" tooltip="All selected views use the same step count."><input id="character-sheet-steps" className="text-field" type="number" min="2" max="1000" step="1" required disabled={busy}- value={Number.isNaN(options.steps) ? "" : options.steps} onChange={(event) => update("steps", event.target.valueAsNumber)} /></PropRow>+ <PropRow label="Steps" htmlFor="character-sheet-steps" tooltip="All selected views use the same step count."><SliderNumberInput id="character-sheet-steps" aria-label="Steps" {...GENERATION_STEPS_RANGE} required disabled={busy}+ value={options.steps ?? defaultSteps} onCommit={(steps) => update("steps", steps)} /></PropRow><PropRow label="Seed" htmlFor="character-sheet-seed" tooltip="Use -1 for a random seed. All selected views use the same seed."><input id="character-sheet-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) => update("seed", event.target.valueAsNumber)} /></PropRow><div className="image-inspector__area"><span tabIndex={0} data-tooltip="Use the prompt and references for clothing and other details. Leave it blank to keep the source appearance.">Prompt</span>diff --git a/src/components/workspace/ClipEffects.test.tsx b/src/components/workspace/ClipEffects.test.tsxindex f4f412f..df78fd3 100644--- a/src/components/workspace/ClipEffects.test.tsx+++ b/src/components/workspace/ClipEffects.test.tsx@@ -43,6 +43,24 @@ async function inTauri(answers: Record<string, (args: unknown) => unknown>, bodyconst CUBE = "LUT_3D_SIZE 2\n0 0 0\n1 0 0\n0 1 0\n1 1 0\n0 0 1\n1 0 1\n0 1 1\n1 1 1";describe("clip effects", () => {+ it("accepts typed effect values, enforces bounds, and resets both controls", () => {+ render(<Harness />);+ add("Basic Corrections");+ const number = screen.getByRole("spinbutton", { name: "Exposure value" }) as HTMLInputElement;+ fireEvent.change(number, { target: { value: "-1.3" } });+ expect(saved().colorCorrection.exposure).toBe(-1.3);+ expect((screen.getByRole("slider", { name: "Exposure" }) as HTMLInputElement).value).toBe("-1.3");+ fireEvent.change(number, { target: { value: "9" } });+ fireEvent.blur(number);+ expect(saved().colorCorrection.exposure).toBe(4);+ fireEvent.click(screen.getByRole("button", { name: "Reset exposure" }));+ expect(number.value).toBe("0");+ add("Transition");+ const duration = screen.getByRole("spinbutton", { name: "Transition duration value" });+ fireEvent.change(duration, { target: { value: "725.5" } });+ fireEvent.blur(duration);+ expect(saved().transition.durationMs).toBe(726);+ });it("selects backdrop presets, keeps matte levels valid, and bypasses without losing controls", () => {render(<Harness />);add("Chroma key");diff --git a/src/components/workspace/ClipEffects.tsx b/src/components/workspace/ClipEffects.tsxindex 9fbb4e3..897f74b 100644--- a/src/components/workspace/ClipEffects.tsx+++ b/src/components/workspace/ClipEffects.tsx@@ -4,7 +4,8 @@ import { DEFAULT_CLIP_CHROMA_KEY, DEFAULT_CLIP_LOOK, type TimelineClip } from ".import { CREATIVE_LOOKS, DEFAULT_CREATIVE, DEFAULT_WHEELS, isEffectOn, parseCube } from "../../lib/effectSettings";import { readLutFile } from "../../lib/exportPipeline";import { inTauri, pickFile } from "../../lib/nativeShell";-import { Checkbox, ComboBox, Flyout, PropRow, Slider, tooltipProps, useContextMenu } from "../ui";+import { Checkbox, ComboBox, Flyout, PropRow, tooltipProps, useContextMenu } from "../ui";+import { SliderNumberInput } from "./SliderNumberInput";import { CurveEditor } from "./CurveEditor";import { GradingWheel } from "./GradingWheel";import { ColorSwatch } from "./ColorPicker";@@ -32,9 +33,9 @@ type EffectDefinition = {/** One numeric parameter as an inspector row: the label scrubs, the slider* drags, the value reads in tabular figures, and Reset appears once it moves* off its default. */-function Param({ label, value, min = 0, max = 100, step = 1, suffix = "%", defaultValue, ariaLabel, disabled, format, onChange }: {+function Param({ label, value, min = 0, max = 100, step = 1, suffix = "%", defaultValue, ariaLabel, disabled, integer, onChange }: {label: string; value: number; min?: number; max?: number; step?: number; suffix?: string; defaultValue: number;- ariaLabel?: string; disabled?: boolean; format?: (value: number) => string; onChange: (value: number) => void;+ ariaLabel?: string; disabled?: boolean; integer?: boolean; onChange: (value: number) => void;}) {return <PropRowlabel={label}@@ -44,8 +45,8 @@ function Param({ label, value, min = 0, max = 100, step = 1, suffix = "%", defauresetLabel={`Reset ${label.toLowerCase()}`}scrub={disabled ? undefined : { value, onChange, step, min, max }}>- <Slider aria-label={ariaLabel ?? label} min={min} max={max} step={step} value={value} disabled={disabled} onChange={(next) => onChange(next)} />- <span className="clip-effect__value">{format ? format(value) : `${value}${suffix}`}</span>+ <SliderNumberInput aria-label={`${ariaLabel ?? label} value`} sliderLabel={ariaLabel ?? label} minimum={min} maximum={max}+ step={step} suffix={suffix} integer={integer} value={value} disabled={disabled} onCommit={onChange} /></PropRow>;}@@ -119,7 +120,7 @@ const EFFECTS: readonly EffectDefinition[] = [{ value: "wipe-left", label: "Wipe from left" }, { value: "wipe-right", label: "Wipe from right" },]} /></PropRow>- <Param label="Duration" ariaLabel="Transition duration" value={transition.durationMs} min={100} max={3000} step={100} suffix=" ms" defaultValue={500}+ <Param label="Duration" ariaLabel="Transition duration" value={transition.durationMs} min={100} max={3000} step={100} suffix=" ms" integer defaultValue={500}disabled={disabled || transition.type === "cut"} onChange={(durationMs) => update({ transition: { ...transition, durationMs } })} /></>;},diff --git a/src/components/workspace/ExtendSettings.tsx b/src/components/workspace/ExtendSettings.tsxindex edde066..22c78ef 100644--- a/src/components/workspace/ExtendSettings.tsx+++ b/src/components/workspace/ExtendSettings.tsx@@ -1,3 +1,4 @@+import { SliderNumberInput, GENERATION_STEPS_RANGE } from "./SliderNumberInput";import { useMemo } from "react";import { alignExtendBounds, compileExtendImage, initialExtendBounds, EXTEND_GRID, EXTEND_MAX_EDGE, type ExtendOptions } from "../../lib/extendImage";import { PROJECT_RESOLUTIONS, type ProjectAsset, type ProjectConfig } from "../../lib/project";@@ -33,16 +34,15 @@ 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={`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;+ <SliderNumberInput id={`extend-${field}`} aria-label={`Zoom ${field}`} integer step={field === "x" || field === "y" ? 1 : EXTEND_GRID} minimum={field === "x" || field === "y" ? -8192 : EXTEND_GRID} maximum={field === "x" || field === "y" ? 8192 : EXTEND_MAX_EDGE} required disabled={busy}+ value={options.bounds[field]} onCommit={(value) => {const bounds = { ...options.bounds, [field]: value };onChange({ ...options, bounds: field === "width" || field === "height" ? alignExtendBounds(bounds, field === "width" ? "e" : "s") : { ...bounds, [field]: Math.round(value) } });}} /></PropRow>)}<button type="button" className="secondary-button" disabled={busy} onClick={() => onChange({ ...options, bounds: initialExtendBounds(source.width!, source.height!) })}>Reset box</button>- <PropRow label="Steps" htmlFor="extend-steps"><input id="extend-steps" className="text-field" type="number" min="2" max="1000" step="1" required disabled={busy}- value={Number.isNaN(options.steps) ? "" : options.steps} onChange={(event) => onChange({ ...options, steps: event.target.valueAsNumber })} /></PropRow>+ <PropRow label="Steps" htmlFor="extend-steps"><SliderNumberInput id="extend-steps" aria-label="Steps" {...GENERATION_STEPS_RANGE} required disabled={busy}+ value={options.steps} onCommit={(steps) => onChange({ ...options, steps })} /></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="Zoom prompt" value={options.prompt} onChange={(prompt) => onChange({ ...options, prompt })}diff --git a/src/components/workspace/GenerationEffects.test.tsx b/src/components/workspace/GenerationEffects.test.tsxindex e9b5a4b..ef8d67c 100644--- a/src/components/workspace/GenerationEffects.test.tsx+++ b/src/components/workspace/GenerationEffects.test.tsx@@ -18,10 +18,19 @@ it("adds, edits, bypasses, resets and removes generation effects", () => {fireEvent.click(screen.getByRole("button", { name: "Color steering" }));fireEvent.change(screen.getByRole("slider", { name: "Color strength" }), { target: { value: "1.2" } });expect(saved().color.strength).toBe(1.2);+ const number = screen.getByRole("spinbutton", { name: "Color strength value" });+ fireEvent.change(number, { target: { value: "0.76" } });+ expect(saved().color.strength).toBe(0.76);+ expect(screen.getByRole("slider", { name: "Color strength" })).toHaveValue("0.76");+ fireEvent.change(number, { target: { value: "3" } });+ fireEvent.blur(number);+ expect(saved().color.strength).toBe(2);+ fireEvent.change(number, { target: { value: "1.2" } });fireEvent.click(screen.getByRole("checkbox", { name: "Enable Color steering" }));expect(saved().color.strength).toBe(1.2);expect(activeGenerationEffects(saved())).toBeUndefined();expect(screen.getByRole("slider", { name: "Color strength" })).toBeDisabled();+ expect(number).toBeDisabled();fireEvent.click(screen.getByRole("button", { name: "Reset Color steering" }));expect(saved().color.strength).toBe(0.35);fireEvent.click(screen.getByRole("checkbox", { name: "Limit to a region" }));diff --git a/src/components/workspace/GenerationEffects.tsx b/src/components/workspace/GenerationEffects.tsxindex 26397ad..6699ac1 100644--- a/src/components/workspace/GenerationEffects.tsx+++ b/src/components/workspace/GenerationEffects.tsx@@ -1,5 +1,6 @@import { useEffect, useRef, useState, type KeyboardEvent } from "react";-import { Checkbox, ComboBox, Flyout, PropRow, PropSection, Slider, tooltipProps } from "../ui";+import { Checkbox, ComboBox, Flyout, PropRow, PropSection, tooltipProps } from "../ui";+import { SliderNumberInput } from "./SliderNumberInput";import { Add16, ChevronDown12, Delete14, Reset16 } from "../ui/icons";import { GENERATION_EFFECTS, GENERATION_EFFECT_DEFAULTS, generationEffectsSchema, type GenerationEffectId, type GenerationEffects as Settings } from "../../lib/generationEffects";@@ -33,8 +34,7 @@ export function GenerationEffects({ value, onChange, supported, disabled = falseconst inactive = locked || effects[id]?.enabled === false;const change = (next: number) => { if (!inactive) set(id, { [field]: next }); };return <PropRow key={field} label={label} value={settings[field]} defaultValue={initial} onReset={inactive ? undefined : () => change(initial)} scrub={inactive ? undefined : { value: settings[field], onChange: change, step: 0.01, min, max }}>- <Slider aria-label={label} min={min} max={max} step={0.01} value={settings[field]} disabled={inactive} onChange={change} />- <span className="clip-effect__value">{settings[field].toFixed(2)}</span>+ <SliderNumberInput aria-label={`${label} value`} sliderLabel={label} minimum={min} maximum={max} step={0.01} value={settings[field]} disabled={inactive} onCommit={change} /></PropRow>;};return <PropSection title="Effects" tooltip={supported ? "Applied during generation. The first use prepares a reusable calibration for your VAE." : "This model does not support generation effects. Bypass or remove existing effects to generate."} persistKey="generation.effects" summary={present.length ? `${present.length}` : "None"}>@@ -74,7 +74,11 @@ export function GenerationEffects({ value, onChange, supported, disabled = false<p className="clip-effect__note">Steps start at 0. Leave the last step empty to apply through completion.</p><Checkbox label="Limit to a region" checked={!!effects.region} disabled={locked} onChange={(enabled) => update({ ...effects, region: enabled ? { x: 0, y: 0, width: 100, height: 100, invert: false } : undefined })} />{effects.region && <>- {(["x", "y", "width", "height"] as const).map((field) => <PropRow key={field} label={`${field[0].toUpperCase()}${field.slice(1)} (%)`}><input className="text-field" aria-label={`Effect region ${field}`} type="number" min={field === "x" || field === "y" ? 0 : 0.1} max={100} step={0.1} disabled={locked} value={effects.region![field]} onChange={(e) => update({ ...effects, region: { ...effects.region!, [field]: Number(e.target.value) } })} /></PropRow>)}+ {(["x", "y", "width", "height"] as const).map((field) => <PropRow key={field} label={`${field[0].toUpperCase()}${field.slice(1)} (%)`}>+ <SliderNumberInput aria-label={`Effect region ${field}`} minimum={field === "x" || field === "y" ? 0 : 0.1}+ maximum={Number((100 - effects.region![field === "x" ? "width" : field === "y" ? "height" : field === "width" ? "x" : "y"]).toFixed(4))} step={0.1}+ disabled={locked} value={effects.region![field]} onCommit={(value) => update({ ...effects, region: { ...effects.region!, [field]: value } })} />+ </PropRow>)}<Checkbox label="Apply outside region" checked={effects.region.invert} disabled={locked} onChange={(invert) => update({ ...effects, region: { ...effects.region!, invert } })} /></>}</>}diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex 0e975b3..de4c1f1 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -1,5 +1,6 @@import { activeGenerationEffects } from "../../lib/generationEffects";import { GenerationEffects } from "./GenerationEffects";+import { SliderNumberInput, GENERATION_STEPS_RANGE, CFG_RANGE } from "./SliderNumberInput";import { applyLassoStroke } from "../../lib/imageLasso";import { EditBox16 } from "../ui/icons";import { useEffect, useId, useMemo, useRef, useState, useSyncExternalStore, type CSSProperties, type DragEvent, type KeyboardEvent as ReactKeyboardEvent, type PointerEvent } from "react";@@ -828,12 +829,10 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGeneonChange={(event) => { if (template) commit({ ...scene, negativePrompts: { ...scene.negativePrompts, [template.modelType]: event.target.value } }); }} /></div>}<PropSection title="Image generation" persistKey="image.generation" summary={`${generationStepsForTemplate(scene.steps, template)} steps`}>- <PropRow label="Steps" htmlFor={rootField("steps")}><input id={rootField("steps")} className="text-field" type="number" min="2" max="1000" value={scene.steps} onChange={(event) => { const value = Number(event.target.value); if (Number.isInteger(value) && value >= 2 && value <= 1000) commit({ ...scene, steps: value }); }} /></PropRow>+ <PropRow label="Steps" htmlFor={rootField("steps")}><SliderNumberInput id={rootField("steps")} aria-label="Steps" {...GENERATION_STEPS_RANGE} disabled={active} value={scene.steps} onCommit={(steps) => commit({ ...scene, steps })} /></PropRow>{model.cfg && template && <PropRow label="CFG" htmlFor={rootField("cfg")} tooltip="Classifier-free guidance. 1 uses only the positive prompt; higher values strengthen guidance." value={scene.cfgScales?.[template.modelType] ?? model.cfg.default} defaultValue={model.cfg.default} onReset={active ? undefined : () => commit({ ...scene, cfgScales: { ...scene.cfgScales, [template.modelType]: model.cfg!.default } })}>- <input id={rootField("cfg")} className="text-field" type="number" min="0" max={3.4028234663852886e38} step="0.1" disabled={active} value={scene.cfgScales?.[template.modelType] ?? model.cfg.default} onChange={(event) => {- const value = event.target.valueAsNumber;- if (Number.isFinite(value) && value >= 0 && value <= 3.4028234663852886e38) commit({ ...scene, cfgScales: { ...scene.cfgScales, [template.modelType]: value } });- }} />+ <SliderNumberInput id={rootField("cfg")} aria-label="CFG" {...CFG_RANGE} disabled={active} value={scene.cfgScales?.[template.modelType] ?? model.cfg.default}+ onCommit={(value) => commit({ ...scene, cfgScales: { ...scene.cfgScales, [template.modelType]: value } })} /></PropRow>}<PropRow label="Seed" htmlFor={rootField("seed")} tooltip="-1 picks a random seed"><input id={rootField("seed")} className="text-field" type="number" min="-1" max={Number.MAX_SAFE_INTEGER} value={scene.seed} onChange={(event) => { const value = Number(event.target.value); if (Number.isSafeInteger(value) && value >= -1) commit({ ...scene, seed: value }); }} /></PropRow>{generatedImage && <UsedImageSeed id={rootField("used-seed")} seed={usedSeed} onError={setError} />}@@ -854,7 +853,10 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene{!isMiniMaxH3 && selected.kind !== "root" && <PropSection title="Placement (0–1000)" persistKey="image.placement"><label className="image-check"><input type="checkbox" disabled={Boolean(selected.lasso)} checked={Boolean(selected.box)} onChange={(event) => patchNode({ box: event.target.checked ? { x: 250, y: 250, width: 500, height: 500 } : null })} />Explicit placement</label>{selected.box && (["x", "y", "width", "height"] as const).map((field) => <PropRow key={field} label={field === "x" ? "X" : field === "y" ? "Y" : field === "width" ? "Width" : "Height"} htmlFor={rootField(field)}>- <input id={rootField(field)} className="text-field" type="number" min={field === "x" || field === "y" ? 0 : 1} max="1000" disabled={Boolean(selected.lasso) && (field === "width" || field === "height")} value={selected.box![field]} onChange={(event) => { const value = Number(event.target.value); const box = { ...selected.box!, [field]: value }; if (Number.isFinite(value) && box.x >= 0 && box.y >= 0 && box.width > 0 && box.height > 0 && box.x + box.width <= 1000 && box.y + box.height <= 1000) commit(resizeImageNode(scene, selected.id, box)); }} />+ <SliderNumberInput id={rootField(field)} aria-label={field === "x" ? "X" : field === "y" ? "Y" : field === "width" ? "Width" : "Height"}+ minimum={field === "x" || field === "y" ? 0 : 1} maximum={1000 - selected.box![field === "x" ? "width" : field === "y" ? "height" : field === "width" ? "x" : "y"]}+ disabled={Boolean(selected.lasso) && (field === "width" || field === "height")} value={selected.box![field]}+ onCommit={(value) => commit(resizeImageNode(scene, selected.id, { ...selected.box!, [field]: value }))} /></PropRow>)}</PropSection>}{!isMiniMaxH3 && (!imageRoot || selected.colors.length > 0) && <PropSection title="Color palette" persistKey="image.palette">diff --git a/src/components/workspace/ImageExportView.tsx b/src/components/workspace/ImageExportView.tsxindex 63fb46c..b9328c8 100644--- a/src/components/workspace/ImageExportView.tsx+++ b/src/components/workspace/ImageExportView.tsx@@ -1,10 +1,11 @@+import { SliderNumberInput } from "./SliderNumberInput";import { imageSettings } from "../../lib/imageSettings";import { invoke } from "@tauri-apps/api/core";import { useState } from "react";import { closestExportAspectRatio, exportSizeChoices } from "../../lib/export";import type { ProjectConfig } from "../../lib/project";import { isTauri } from "../../lib/persistence";-import { ComboBox, EmptyState, InfoBar, ProgressBar, PropRow, PropSection, Slider, Splitter, tooltipProps, usePaneSize } from "../ui";+import { ComboBox, EmptyState, InfoBar, ProgressBar, PropRow, PropSection, Splitter, tooltipProps, usePaneSize } from "../ui";import { Image32 } from "../ui/icons";import { ImageBar } from "./ImageBar";import { ReferenceImage } from "./ReferenceImage";@@ -124,8 +125,7 @@ export function ImageExportView({ config, folderPath }: { config: ProjectConfig;options={[...UPSCALERS]} onChange={(value) => setUpscaler(value as Upscaler)} /></PropRow>{preferences.format === "jpg" && <PropRow label="Quality" value={preferences.quality} defaultValue={DEFAULT_QUALITY} onReset={exporting ? undefined : () => choose({ quality: DEFAULT_QUALITY })} resetLabel="Reset quality">- <Slider aria-label="JPG quality" min={1} max={100} step={1} value={preferences.quality} disabled={exporting} onChange={(quality) => choose({ quality })} />- <span className="export-quality__value">{preferences.quality}</span>+ <SliderNumberInput aria-label="JPG quality value" sliderLabel="JPG quality" minimum={1} maximum={100} integer suffix="%" value={preferences.quality} disabled={exporting} onCommit={(quality) => choose({ quality })} /></PropRow>}</PropSection><div className="export-messages">diff --git a/src/components/workspace/MotionInspector.tsx b/src/components/workspace/MotionInspector.tsxindex c6631b6..5f4c41a 100644--- a/src/components/workspace/MotionInspector.tsx+++ b/src/components/workspace/MotionInspector.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from "react";import { motionOverride, motionOverrideSchema, motionSchema, type Motion } from "../../lib/motion";import { PropSection, PropRow } from "../ui";+import { SliderNumberInput } from "./SliderNumberInput";export function MotionInspector({ motion, selectedId, onSelect, onChange, disabled = false, onRenderReference, rendering = false }: {motion: Motion; selectedId: string | null; onSelect: (id: string | null) => void; onChange: (motion: Motion) => void;@@ -18,8 +19,8 @@ export function MotionInspector({ motion, selectedId, onSelect, onChange, disablconst edit = node ? motionOverride(motion, node.id) : null;return <><PropSection title="Motion" persistKey="motion.document">- <PropRow label="Duration"><input className="text-field" type="number" aria-label="Motion duration" min={0.1} max={600} step={0.1} disabled={disabled}- value={motion.duration} onChange={(e) => change({ ...motion, duration: Number(e.target.value) })} /><span>s</span></PropRow>+ <PropRow label="Duration"><SliderNumberInput aria-label="Motion duration" minimum={0.1} maximum={600} step={0.1} suffix="s" disabled={disabled}+ value={motion.duration} onCommit={(duration) => change({ ...motion, duration })} /></PropRow><button className="secondary-button" disabled={rendering || !onRenderReference} onClick={onRenderReference}>{rendering ? "Rendering reference…" : "Render as reference video"}</button></PropSection><PropSection title="Elements" persistKey="motion.elements">@@ -44,12 +45,14 @@ export function MotionInspector({ motion, selectedId, onSelect, onChange, disabl</PropSection><PropSection title="Parameters" persistKey="motion.parameters">{motion.parameters.length === 0 && <p className="settings-description">The agent can expose movement, timing, color and text controls here.</p>}- {motion.parameters.map((p) => <PropRow key={p.id} label={p.label}><input className="text-field" aria-label={p.label} disabled={disabled}+ {motion.parameters.map((p) => <PropRow key={p.id} label={p.label}>{p.type === "number" && p.min !== undefined && p.max !== undefined ?+ <SliderNumberInput aria-label={p.label} minimum={p.min} maximum={p.max} step={p.step ?? 0.01} value={Number(p.value)} disabled={disabled}+ onCommit={(value) => change({ ...motion, parameters: motion.parameters.map(item => item.id === p.id ? { ...item, value } : item) })} /> : <input className="text-field" aria-label={p.label} disabled={disabled}type={p.type === "boolean" ? "checkbox" : p.type === "number" ? "number" : "text"}min={p.min} max={p.max} step={p.step ?? "any"} checked={p.type === "boolean" ? Boolean(p.value) : undefined}value={p.type === "boolean" ? undefined : String(p.value)} onChange={(e) => change({ ...motion, parameters: motion.parameters.map((item) => item.id !== p.id ? item : {...item, value: p.type === "boolean" ? e.target.checked : p.type === "number" ? Number(e.target.value) : e.target.value,- }) })} /></PropRow>)}+ }) })} />}</PropRow>)}</PropSection><PropSection title="JavaScript" persistKey="motion.source"><textarea className="text-field motion-source" aria-label="Motion JavaScript source" spellCheck={false} disabled={disabled} value={source} onChange={(e) => setSource(e.target.value)} />diff --git a/src/components/workspace/ReferencesView.tsx b/src/components/workspace/ReferencesView.tsxindex 2be57b8..0c623d0 100644--- a/src/components/workspace/ReferencesView.tsx+++ b/src/components/workspace/ReferencesView.tsx@@ -1,5 +1,6 @@import { Add16, Audio22, ArrowDown12, ArrowUp12, ChevronLeft16, ChevronRight16, Copy16, CursorClick32, Delete14, Delete16, Export16, FolderOpen16, GridView16, GridView16Filled, ImageAdd14, ImageAdd16, Images32, ListView16, ListView16Filled, OpenExternal16, Refresh16, Refresh20, Rename16, Search16, TextFile14, TextFile16, TextFile24 } from "../ui/icons";import { invoke } from "@tauri-apps/api/core";+import { SliderNumberInput } from "./SliderNumberInput";import { useEffect, useMemo, useRef, useState, useSyncExternalStore, type KeyboardEvent, type MouseEvent } from "react";import { isReferenceDescribed, projectItemPath, referenceImages, sceneFrameInputs, type ProjectConfig, type ProjectReference, type ProjectReferenceImage } from "../../lib/project";import { activeReferenceRefmods, isVideoReference } from "../../lib/project";@@ -683,14 +684,10 @@ export function ReferencesView({ config, folderPath, onChange, onRegenerateIcon,<section className="reference-refmods" aria-label="Refmod attachments">{selected.refmods!.map((refmod) => <div key={refmod.id}><b data-tooltip={refmod.name}>{refmod.name}</b>- <PropRow label="Strength" htmlFor={`${refmod.id}-strength`} tooltip="Strength 0 turns a refmod off."><input id={`${refmod.id}-strength`} className="text-field" aria-label={`${refmod.name} strength`} type="number" min={0} max={1} step={0.05} value={refmod.strength} onChange={(event) => {- const strength = Number(event.target.value);- if (event.target.value && Number.isFinite(strength) && strength >= 0 && strength <= 1) update(selected.id, { iconRelativePath: undefined, refmods: selected.refmods!.map((entry) => entry.id === refmod.id ? { ...entry, strength } : entry) });- }} /></PropRow>- <PropRow label="Copies" htmlFor={`${refmod.id}-copies`} tooltip="More copies use more GPU memory."><input id={`${refmod.id}-copies`} className="text-field" aria-label={`${refmod.name} copies`} type="number" min={1} max={10} step={1} value={refmod.copies} onChange={(event) => {- const copies = Number(event.target.value);- if (Number.isInteger(copies) && copies >= 1 && copies <= 10) update(selected.id, { iconRelativePath: undefined, refmods: selected.refmods!.map((entry) => entry.id === refmod.id ? { ...entry, copies } : entry) });- }} /></PropRow>+ <PropRow label="Strength" htmlFor={`${refmod.id}-strength`} tooltip="Strength 0 turns a refmod off."><SliderNumberInput id={`${refmod.id}-strength`} aria-label={`${refmod.name} strength`} minimum={0} maximum={1} step={0.05} value={refmod.strength}+ onCommit={(strength) => update(selected.id, { iconRelativePath: undefined, refmods: selected.refmods!.map((entry) => entry.id === refmod.id ? { ...entry, strength } : entry) })} /></PropRow>+ <PropRow label="Copies" htmlFor={`${refmod.id}-copies`} tooltip="More copies use more GPU memory."><SliderNumberInput id={`${refmod.id}-copies`} aria-label={`${refmod.name} copies`} minimum={1} maximum={10} integer value={refmod.copies}+ onCommit={(copies) => update(selected.id, { iconRelativePath: undefined, refmods: selected.refmods!.map((entry) => entry.id === refmod.id ? { ...entry, copies } : entry) })} /></PropRow></div>)}</section></PropSection>}diff --git a/src/components/workspace/SceneEditor.tsx b/src/components/workspace/SceneEditor.tsxindex 541b690..4a5631c 100644--- a/src/components/workspace/SceneEditor.tsx+++ b/src/components/workspace/SceneEditor.tsx@@ -1,6 +1,6 @@import { GenerationEffects } from "./GenerationEffects";import { generatorModel } from "../../lib/generatorModels";-import { DEFAULT_VIDEO_SIGMA_SHIFT, DEFAULT_AUDIO_SIGMA_SHIFT, MIN_SIGMA_SHIFT, MAX_SIGMA_SHIFT } from "../../lib/sampling";+import { DEFAULT_VIDEO_SIGMA_SHIFT, DEFAULT_AUDIO_SIGMA_SHIFT } from "../../lib/sampling";import { sigmaShiftOverridesForTemplate, type GeneratorTemplate } from "../../lib/settings";import { Audio16, Dismiss12, Image16, ImageAdd16, Text16, Video16 } from "../ui/icons";import { BACKDROP_OPTIONS, type BackdropColor } from "../../lib/backdrop";@@ -29,7 +29,6 @@ import {sceneGenerationReferences,splitActionText,DEFAULT_SPEECH_LANGUAGE,- MAX_GENERATION_STEPS,SCENE_MIN_SECONDS,SPEECH_LANGUAGES,type GenerationJob,@@ -47,6 +46,7 @@ import {type ShotTagSelection,} from "../../lib/shot-tags";import { CommittedNumberInput } from "./CommittedNumberInput";+import { SliderNumberInput, GENERATION_STEPS_RANGE, SIGMA_SHIFT_RANGE } from "./SliderNumberInput";import { DEFAULT_CONTINUATION_OVERLAP, MAX_CONTINUATION_OVERLAP } from "../../lib/project";import { PromptTextField } from "./PromptTextField";import { ReferenceIcon } from "./ReferenceIcon";@@ -513,12 +513,10 @@ export function SceneInspector({ job, shots, references, folderPath = "", scenes<div role="region" aria-label="Generation" className="scene-settings"><PropSection title="Generation" persistKey="generator.generation" summary={`${effectiveSteps ?? sceneGenerationSteps(job, defaultSteps)} steps`}><PropRow label="Steps" htmlFor={`${id}-steps`}>- <CommittedNumberInput+ <SliderNumberInputid={`${id}-steps`}className="text-field"- minimum={2}- maximum={MAX_GENERATION_STEPS}- step={1}+ {...GENERATION_STEPS_RANGE}value={sceneGenerationSteps(job, defaultSteps)}integerdisabled={disabled}@@ -551,7 +549,7 @@ export function SceneInspector({ job, shots, references, folderPath = "", scenes{job.audioSteps != null && <><SceneSigmaShift stream="video" job={job} template={template} disabled={disabled} onChange={onChange} /><PropRow label="Audio steps" htmlFor={`${id}-audio-steps`}>- <CommittedNumberInput id={`${id}-audio-steps`} className="text-field" minimum={2} maximum={MAX_AUDIO_GENERATION_STEPS} step={1}+ <SliderNumberInput id={`${id}-audio-steps`} {...GENERATION_STEPS_RANGE}value={job.audioSteps} integer disabled={disabled} aria-label="Audio step count" onCommit={(value) => onChange({ audioSteps: value })} /></PropRow><SceneSigmaShift stream="audio" job={job} template={template} disabled={disabled} onChange={onChange} />@@ -654,7 +652,7 @@ function SceneSigmaShift({ stream, job, template, disabled, onChange }: {const fallback = stream === "audio" ? DEFAULT_AUDIO_SIGMA_SHIFT : template?.mode === "animate" ? 3 : DEFAULT_VIDEO_SIGMA_SHIFT;const label = `${stream === "video" ? "Video" : "Audio"} sigma shift`;return <PropRow label={label} htmlFor={id} tooltip={override !== undefined ? "Set by active LoRAs. Edit the override in LoRA settings." : "Controls the distribution of denoising timesteps."}>- <CommittedNumberInput id={id} className="text-field" aria-label={label} minimum={MIN_SIGMA_SHIFT} maximum={MAX_SIGMA_SHIFT} step={0.1}+ <SliderNumberInput id={id} aria-label={label} {...SIGMA_SHIFT_RANGE}value={override ?? job[key] ?? template?.[key] ?? fallback} disabled={disabled || override !== undefined} onCommit={(value) => onChange({ [key]: value })} /></PropRow>;}diff --git a/src/components/workspace/SliderNumberInput.test.tsx b/src/components/workspace/SliderNumberInput.test.tsxnew file mode 100644index 0000000..2f36788--- /dev/null+++ b/src/components/workspace/SliderNumberInput.test.tsx@@ -0,0 +1,48 @@+// @vitest-environment jsdom+import "@testing-library/jest-dom/vitest";+import { useState } from "react";+import { cleanup, fireEvent, render, screen } from "@testing-library/react";+import { afterEach, expect, it, vi } from "vitest";+import { SliderNumberInput, GENERATION_STEPS_RANGE, SIGMA_SHIFT_RANGE } from "./SliderNumberInput";++afterEach(cleanup);+it("synchronizes dragging, keyboard edits and range enforcement without erasing partial input", () => {+ const changed = vi.fn();+ function Harness() {+ const [value, set] = useState(12);+ return <SliderNumberInput aria-label="Sigma" {...SIGMA_SHIFT_RANGE} value={value} onCommit={next => { set(next); changed(next); }} />;+ }+ render(<Harness />);+ const bar = screen.getByRole("slider", { name: "Sigma slider" });+ const field = screen.getByRole("spinbutton", { name: "Sigma" });+ fireEvent.change(bar, { target: { value: "8.5" } });+ expect(field).toHaveValue(8.5);+ fireEvent.change(field, { target: { value: "" } });+ expect(field).toHaveValue(null);+ expect(bar).toHaveValue("8.5");+ fireEvent.change(field, { target: { value: "3.7" } });+ expect(bar).toHaveValue("3.7");+ fireEvent.change(field, { target: { value: "999" } });+ expect(changed).toHaveBeenLastCalledWith(3.7);+ fireEvent.blur(field);+ expect(field).toHaveValue(100);+ expect(bar).toHaveValue("100");+ fireEvent.change(field, { target: { value: "-1" } });+ fireEvent.blur(field);+ expect(field).toHaveValue(0.1);+});++it("keeps integer controls integral and both controls disabled together", () => {+ const changed = vi.fn();+ const view = render(<SliderNumberInput aria-label="Steps" {...GENERATION_STEPS_RANGE} value={20} onCommit={changed} />);+ const field = screen.getByRole("spinbutton");+ fireEvent.change(field, { target: { value: "4.5" } });+ expect(changed).not.toHaveBeenCalled();+ fireEvent.blur(field);+ expect(changed).toHaveBeenLastCalledWith(5);+ view.rerender(<SliderNumberInput aria-label="Steps" {...GENERATION_STEPS_RANGE} value={20} disabled onCommit={changed} />);+ expect(field).toBeDisabled();+ expect(screen.getByRole("slider")).toBeDisabled();+ expect(field).toHaveAttribute("min", "2");+ expect(field).toHaveAttribute("max", "1000");+});diff --git a/src/components/workspace/SliderNumberInput.tsx b/src/components/workspace/SliderNumberInput.tsxnew file mode 100644index 0000000..d988110--- /dev/null+++ b/src/components/workspace/SliderNumberInput.tsx@@ -0,0 +1,29 @@+import type { ComponentProps, CSSProperties } from "react";+import { Slider } from "../ui";+import { CommittedNumberInput } from "./CommittedNumberInput";++/** One bounded value, editable by dragging or typing. Keep number widths large+ * enough for the range, sign and fractional precision without crowding the bar. */+export function SliderNumberInput({ minimum, maximum, value, step = 1, sliderLabel, suffix, disabled, onCommit, ...input }: Omit<ComponentProps<typeof CommittedNumberInput>, "step"> & {+ step?: number;+ sliderLabel?: string;+ suffix?: string;+}) {+ const label = input["aria-label"] ?? "Value";+ const precision = Math.min(6, String(step).split(".")[1]?.length ?? 0);+ const digits = Math.max(String(minimum.toFixed(precision)).length, String(maximum.toFixed(precision)).length, String(value).length);+ const range = `${minimum} to ${maximum}`;+ const change = (next: number) => { if (!disabled) onCommit(next); };+ return <div className="slider-number" style={{ "--number-width": `${Math.max(4, digits)}ch` } as CSSProperties}>+ <Slider aria-label={sliderLabel ?? `${label} slider`} min={minimum} max={maximum} step={step}+ value={value} disabled={disabled} title={range} onChange={change} />+ <CommittedNumberInput {...input} className={`text-field slider-number__input ${input.className ?? ""}`}+ minimum={minimum} maximum={maximum} step={step} value={value} disabled={disabled} title={input.title ?? range} onCommit={change} />+ {suffix && <span className="slider-number__unit" aria-hidden="true">{suffix.trim()}</span>}+ </div>;+}++/** Inspector editing ranges; persisted projects and engine limits stay intact. */+export const GENERATION_STEPS_RANGE = { minimum: 2, maximum: 1000, step: 1, integer: true } as const;+export const SIGMA_SHIFT_RANGE = { minimum: 0.1, maximum: 100, step: 0.1 } as const;+export const CFG_RANGE = { minimum: 0, maximum: 30, step: 0.1 } as const;diff --git a/src/components/workspace/TimelineView.tsx b/src/components/workspace/TimelineView.tsxindex fb35573..31fdf43 100644--- a/src/components/workspace/TimelineView.tsx+++ b/src/components/workspace/TimelineView.tsx@@ -43,7 +43,7 @@ import { MediaThumbnail, type MeasuredMedia } from "./MediaThumbnail";import { ProgramMonitor } from "./ProgramMonitor";import { sceneShape, STATUS_BADGE } from "./sceneStatus";import { ShotThumbnail } from "./ShotThumbnail";-import { CommittedNumberInput } from "./CommittedNumberInput";+import { SliderNumberInput } from "./SliderNumberInput";import { TimelineClipThumbnails } from "./TimelineClipThumbnails";import { TimelineClipWaveform } from "./TimelineClipWaveform";@@ -1521,7 +1521,7 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {<PropRow label="Speed" htmlFor="clip-speed" value={clipPlaybackRate(selected)} defaultValue={1}onReset={speedDisabled ? undefined : () => changeSpeed(100)}tooltip="100% is normal speed. Changes duration while keeping the same source range and moving later clips on this track. Audio pitch changes with speed.">- <CommittedNumberInput id="clip-speed" className="text-field" aria-label="Clip speed" minimum={MIN_CLIP_SPEED * 100} maximum={MAX_CLIP_SPEED * 100} step={1}+ <SliderNumberInput id="clip-speed" className="text-field" aria-label="Clip speed" minimum={MIN_CLIP_SPEED * 100} maximum={MAX_CLIP_SPEED * 100} step={1}value={Number((clipPlaybackRate(selected) * 100).toFixed(2))} disabled={speedDisabled} onCommit={changeSpeed} /><span className="inspector-unit">%</span></PropRow>@@ -1556,7 +1556,7 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {onReset={visualControlsDisabled ? undefined : () => updateTransform(key, fallback)}scrub={visualControlsDisabled ? undefined : { value, onChange: (next) => updateTransform(key, next), min: minimum, max: maximum, step: 1 }}>- <CommittedNumberInput id={`clip-${key}`} className="text-field" aria-label={label} minimum={minimum} maximum={maximum} step="1" value={value} disabled={visualControlsDisabled} onCommit={(next) => updateTransform(key, next)} />+ <SliderNumberInput id={`clip-${key}`} className="text-field" aria-label={label} minimum={minimum} maximum={maximum} step={1} value={value} disabled={visualControlsDisabled} onCommit={(next) => updateTransform(key, next)} /><span className="inspector-unit">{unit}</span></PropRow>;})}diff --git a/src/styles/ui.css b/src/styles/ui.cssindex 813c7a0..3bbad39 100644--- a/src/styles/ui.css+++ b/src/styles/ui.css@@ -830,6 +830,36 @@margin: 0;}+.slider-number {+ display: flex;+ align-items: center;+ gap: var(--space-1);+ flex: 1;+ min-width: 0;+}++.slider-number > .ui-slider {+ flex: 1 1 0;+ width: 0;+ min-width: 24px;+}++.ui-prop-row__value .slider-number > .slider-number__input.text-field {+ flex: none;+ width: calc(var(--number-width) + 12px);+ min-width: 0;+ height: var(--control-sm);+ padding-inline: 5px;+ text-align: right;+ font-variant-numeric: tabular-nums;+}++.slider-number__unit {+ flex: none;+ color: var(--text-secondary);+ font-size: var(--text-xs);+}+.ui-prop-row__reset,.ui-prop-row__reset-spacer {width: 20px;