diff --git a/src/app/studio/studio.css b/src/app/studio/studio.css index 8a2ee49..2aef548 100644 --- a/src/app/studio/studio.css +++ b/src/app/studio/studio.css @@ -31,9 +31,19 @@ display: flex; } +/* The studio surface is the frame's last elastic row, and a column of its own: + top bar, gallery, composer. It has to be told so — a plain block here left + `.ohf-shell` at its content height, which collapsed the surface to ~620px on + a 1440×900 window and stranded the bottom-pinned composer ~260px above the + real bottom edge, over a band of empty ground. As a column flex container the + shell stretches to the frame, the gallery takes what is left over it, and the + composer lands on the bottom edge at every viewport size. */ .of-studio-app > .ohf { flex: 1 1 auto; min-width: 0; + min-height: 0; + display: flex; + flex-direction: column; } .of-studio-workspace > .ohf { diff --git a/src/openhiggsfield/composer.tsx b/src/openhiggsfield/composer.tsx index 41e9bf1..5adcaba 100644 --- a/src/openhiggsfield/composer.tsx +++ b/src/openhiggsfield/composer.tsx @@ -93,7 +93,6 @@ export function Composer({ const [overlay, setOverlay] = useState(null); const [anchor, setAnchor] = useState({ x: 0, y: 0 }); const [shortcut, setShortcut] = useState(null); - const dockRef = useRef(null); const wrapRef = useRef(null); const promptRef = useRef(null); /* A run in flight is not a lock: it holds its own tile in the grid, so the @@ -120,19 +119,6 @@ export function Composer({ settings.set(model.id, { [native.key]: native.kind === "enum" ? String(next) : next }); } - /* The dock floats over the gallery, so the gallery cannot reserve its height - from layout. It reads it from here instead, and the last row keeps clearing - a composer that grew — a long prompt, a media strip, the undo receipt. */ - useEffect(() => { - const dock = dockRef.current; - if (!dock) return; - const observer = new ResizeObserver(() => { - dock.parentElement?.style.setProperty("--ohf-dock-h", `${dock.offsetHeight}px`); - }); - observer.observe(dock); - return () => observer.disconnect(); - }, []); - useEffect(() => { if (!overlay) return; const onPointerDown = (event: PointerEvent) => { @@ -225,7 +211,7 @@ export function Composer({ : `${generateLabel} · ${shortcut ?? "⌘↵"}`; return ( -
+