AI media harness for planning, generating, and editing locally
TypeScript
Refine project popup
Bitti07301809526d
diff --git a/src/App.test.tsx b/src/App.test.tsxindex 74e43ac..f35ee9e 100644--- a/src/App.test.tsx+++ b/src/App.test.tsx@@ -110,8 +110,8 @@ describe("project library controls", () => {render(<App />);await screen.findByText("Northern Light — Brand Film");fireEvent.click(screen.getByRole("button", { name: "New project" }));- const shape = screen.getByRole("combobox", { name: /Video shape/ }) as HTMLSelectElement;- const size = screen.getByRole("combobox", { name: /Frame size/ }) as HTMLSelectElement;+ const shape = screen.getByRole("combobox", { name: /Aspect Ratio/ }) as HTMLSelectElement;+ const size = screen.getByRole("combobox", { name: /Resolution/ }) as HTMLSelectElement;// The ladder the user asked for, in pixels rather than a name for them.expect([...size.options].map((option) => option.textContent)).toEqual([@@ -131,7 +131,7 @@ describe("project library controls", () => {"416 × 736", "544 × 960", "640 × 1152", "768 × 1376 (default)", "1088 × 1920", "1344 × 2432",]);- // And the summary line beside the collapsed panel says the same numbers.+ // The settings header says the same numbers as the always-visible fields.fireEvent.change(size, { target: { value: "544p" } });expect(document.querySelector(".composer__options-value")!.textContent).toBe("Vertical 9:16 · 544 × 960 · 30 seconds");diff --git a/src/components/PromptComposer.tsx b/src/components/PromptComposer.tsxindex e125ed1..656bbc7 100644--- a/src/components/PromptComposer.tsx+++ b/src/components/PromptComposer.tsx@@ -1,4 +1,4 @@-import { ChevronDown, Clapperboard, Clock3, ImagePlus, Monitor, Sparkles, Undo2, WandSparkles, X } from "lucide-react";+import { Clapperboard, Clock3, ImagePlus, Monitor, Sparkles, Undo2, WandSparkles, X } from "lucide-react";import { useEffect, useRef, useState } from "react";import { chooseInitialReferenceImages, isTauri } from "../lib/persistence";import { outputDimensions, resolutionLabel } from "../lib/export";@@ -141,17 +141,15 @@ export function PromptComposer({ busy, onCreate, onClose }: PromptComposerProps){referenceError && <small role="alert">{referenceError}</small>}</div>}- <details className="composer__options">- <summary>+ <section className="composer__options">+ <div className="composer__options-head"><span className="composer__options-title">Video settings</span><span className="composer__options-value">{aspectRatioLabels[aspectRatio]} · {resolutionLabel(resolution, aspectRatio)} · {durationLabel(duration)}</span>- <ChevronDown className="composer__options-chevron" size={17} />- </summary>+ </div><div className="composer__options-body">- <p className="composer__options-note">These are already set to sensible defaults. Change them only if you want something different.</p><div className="composer__options-grid"><label>- <span><Monitor size={15} /> Video shape</span>+ <span><Monitor size={15} /> Aspect Ratio</span><select value={aspectRatio} onChange={(event) => setAspectRatio(event.target.value as AspectRatio)}><option value="16:9">Widescreen 16:9</option><option value="9:16">Vertical 9:16</option>@@ -164,7 +162,7 @@ export function PromptComposer({ busy, onCreate, onClose }: PromptComposerProps)are relabelled when the shape above changes, because 768p is1376×768 widescreen and 768×1376 vertical. */}<label>- <span><Clapperboard size={15} /> Frame size</span>+ <span><Clapperboard size={15} /> Resolution</span><select value={resolution} onChange={(event) => setResolution(event.target.value as Resolution)}>{PROJECT_RESOLUTIONS.map((option) => {const { width, height } = outputDimensions(option, aspectRatio);@@ -180,7 +178,7 @@ export function PromptComposer({ busy, onCreate, onClose }: PromptComposerProps)</label></div></div>- </details>+ </section><div className="composer__actions"><buttondiff --git a/src/styles/library.css b/src/styles/library.cssindex e1ab789..2402c14 100644--- a/src/styles/library.css+++ b/src/styles/library.css@@ -66,6 +66,7 @@max-height: calc(100dvh - var(--space-7) * 2);margin: 0 auto;position: relative;+ overflow-x: hidden;overflow-y: auto;border: 1px solid var(--accent-line);border-radius: var(--radius-xl);@@ -224,32 +225,16 @@border-top: 1px solid var(--line);}-.composer__options > summary {+.composer__options-head {min-height: var(--control-md);display: flex;align-items: center;gap: var(--space-3);padding: var(--space-2) var(--space-5);- list-style: none;- cursor: pointer;color: var(--text-muted);font-size: var(--text-xs);}-.composer__options > summary::-webkit-details-marker {- display: none;-}--/* base.css gives focus rings to buttons/fields; <summary> is not in that list. */-.composer__options > summary:focus-visible {- outline: var(--focus-ring-width) solid var(--focus-ring-color);- outline-offset: -2px;-}--.composer__options > summary:hover {- color: var(--text-secondary);-}-.composer__options-title {font-weight: var(--weight-semibold);color: var(--text-secondary);@@ -262,26 +247,8 @@white-space: nowrap;}-.composer__options-chevron {- flex: 0 0 auto;- margin-left: auto;- transition: transform 0.18s ease;-}--.composer__options[open] .composer__options-chevron {- transform: rotate(180deg);-}-.composer__options-body {- padding: 0 var(--space-5) var(--space-5);-}--.composer__options-note {- max-width: 68ch;- margin: 0 0 var(--space-4);- color: var(--text-faint);- font-size: var(--text-xs);- line-height: var(--leading-normal);+ padding: var(--space-2) var(--space-5) var(--space-5);}.composer__options-grid {