Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Restore the Scene title on the image editor's tree pane

Bittifecf6bbd3b64
diff --git a/src/components/workspace/ImageEditor.test.tsx b/src/components/workspace/ImageEditor.test.tsx
index 23f723d..52527a3 100644
--- a/src/components/workspace/ImageEditor.test.tsx
+++ b/src/components/workspace/ImageEditor.test.tsx
@@ -399,5 +399,6 @@ it("heads the inspector with the selected node rather than an Inspector title",
const inspector = screen.getByRole("complementary", { name: "Image node inspector" });
expect(within(inspector).getByRole("heading", { name: "Image" })).toBeInTheDocument();
expect(within(inspector).getByText("Root")).toBeInTheDocument();
- expect(screen.queryByRole("heading", { name: /^(Scene|Inspector)/ })).not.toBeInTheDocument();
+ expect(screen.queryByRole("heading", { name: /^Inspector/ })).not.toBeInTheDocument();
+ expect(screen.getByRole("heading", { name: "Scene" })).toBeInTheDocument();
});
diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsx
index 6025dc8..3c93912 100644
--- a/src/components/workspace/ImageEditor.tsx
+++ b/src/components/workspace/ImageEditor.tsx
@@ -442,7 +442,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
const rootField = (field: string) => `${editorId}-${field}`;
return <div ref={editorRoot} className="image-editor" style={{ ...treePane.style, ...inspectorPane.style }}>
<aside ref={hierarchy} className="image-tree" aria-label="Image hierarchy" onContextMenu={(event) => { if ((event.target as HTMLElement).closest("input, textarea, [contenteditable=true]")) return; event.preventDefault(); setSelection(root.id); setContextMenu({ x: event.clientX, y: event.clientY }); }} onKeyDown={treeKeys}>
- <PaneHeader actions={<>
+ <PaneHeader title="Scene" actions={<>
<button className="icon-button image-pane-button" aria-label="Undo image edit" aria-keyshortcuts="Control+Z" {...tooltipProps("Undo", "Ctrl+Z")} disabled={!undo.current.length} onClick={() => history(true)}><Undo16 aria-hidden="true" /></button>
<button className="icon-button image-pane-button" aria-label="Redo image edit" aria-keyshortcuts="Control+Y" {...tooltipProps("Redo", "Ctrl+Y")} disabled={!redo.current.length} onClick={() => history(false)}><Redo16 aria-hidden="true" /></button>
</>} />