AI media harness for planning, generating, and editing locally
TypeScript
Keep the editable item name a heading in Generator and References
Bittide42a96b8d27
diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex 29b073d..572457a 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -594,15 +594,15 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCo<ItemHeadercolor="var(--clip-generated)"icon={<Clapperboard size={16} />}- name={<input- ref={titleInput}- className="ui-item-header__input"- value={openShot.name ?? ""}- placeholder={`Shot ${shotIndex + 1}`}- aria-label={`Rename shot ${shotIndex + 1}`}- aria-keyshortcuts="F2"- onChange={(event) => patchShot(selected, openShot.id, { name: event.target.value || null })}- />}+ name={<h2 className="generator-panel__name"><input+ ref={titleInput}+ className="ui-item-header__input"+ value={openShot.name ?? ""}+ placeholder={`Shot ${shotIndex + 1}`}+ aria-label={`Rename shot ${shotIndex + 1}`}+ aria-keyshortcuts="F2"+ onChange={(event) => patchShot(selected, openShot.id, { name: event.target.value || null })}+ /></h2>}meta={<>{`Shot ${shotIndex + 1} · ${seconds(shotEndsAt - openShot.startSeconds)} · in `}<button type="button" className="generator-panel__up" data-tooltip={`Back to ${selected.title}`} onClick={() => setSelection({ jobId: selected.id, shotId: null })}>@@ -640,14 +640,14 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCo<ItemHeadercolor="var(--clip-generated)"icon={<Sparkles size={16} />}- name={<input- ref={titleInput}- className="ui-item-header__input"- value={selected.title}- aria-label={`Rename ${selected.title}`}- aria-keyshortcuts="F2"- onChange={(event) => updateJob(selected.id, { title: event.target.value || "Untitled scene", updatedAt: new Date().toISOString() })}- />}+ name={<h2 className="generator-panel__name"><input+ ref={titleInput}+ className="ui-item-header__input"+ value={selected.title}+ aria-label={`Rename ${selected.title}`}+ aria-keyshortcuts="F2"+ onChange={(event) => updateJob(selected.id, { title: event.target.value || "Untitled scene", updatedAt: new Date().toISOString() })}+ /></h2>}meta={sceneMeta(selected, selectedShots.length, selectedIndicator)}actions={<buttontype="button"diff --git a/src/components/workspace/ReferencesView.tsx b/src/components/workspace/ReferencesView.tsxindex 4b704ff..869e8e7 100644--- a/src/components/workspace/ReferencesView.tsx+++ b/src/components/workspace/ReferencesView.tsx@@ -499,14 +499,14 @@ export function ReferencesView({ config, folderPath, onChange, onRegenerateIcon,is editable in place, and the meta line says what it is. */}{selected && <ItemHeaderchip={art(selected)}- name={<input- ref={nameInput}- className="ui-item-header__input"- value={selected.name}- aria-label="Reference name"- aria-keyshortcuts="F2"- onChange={(event) => update(selected.id, { name: event.target.value || "Untitled reference" })}- />}+ name={<h2 className="reference-inspector__name"><input+ ref={nameInput}+ className="ui-item-header__input"+ value={selected.name}+ aria-label="Reference name"+ aria-keyshortcuts="F2"+ onChange={(event) => update(selected.id, { name: event.target.value || "Untitled reference" })}+ /></h2>}meta={[selectedType === "custom" ? "Uncategorized" : referenceTypeLabel(selectedType),referenceKindLabel(selected),diff --git a/src/styles/generator.css b/src/styles/generator.cssindex c1fb06c..6bba55d 100644--- a/src/styles/generator.css+++ b/src/styles/generator.css@@ -661,6 +661,16 @@text-decoration-color: currentColor;}+/* The editable name stays the pane's heading, as it was before the item+ header: an h2 around the input, laid out as the input alone would be. */+.generator-panel__name {+ flex: 1;+ min-width: 0;+ display: flex;+ margin: 0;+ font: inherit;+}+/* An unnamed shot shows its number as the placeholder; it is the name untilone is typed, so it reads in the name's ink, not a hint's. */.generator-panel .ui-item-header__input::placeholder {diff --git a/src/styles/references.css b/src/styles/references.cssindex ddf66cd..df29acd 100644--- a/src/styles/references.css+++ b/src/styles/references.css@@ -257,6 +257,16 @@overflow-y: auto;}+/* The editable name stays the pane's heading: an h2 around the input, laid+ out as the input alone would be. */+.reference-inspector__name {+ flex: 1;+ min-width: 0;+ display: flex;+ margin: 0;+ font: inherit;+}+/* The reference's art as the item header's 28px chip: the same picture thetile shows, filling the chip, with no room for a caption. */.reference-inspector .ui-item-header__chip .reference-art {