diff --git a/components/chat.tsx b/components/chat.tsx index f8866f1..10ef099 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -2026,11 +2026,23 @@ function DockOverlay({ if (!el) return; const measure = () => { setSbInset(Math.round((el.offsetWidth - el.clientWidth) / 2)); - setDockMaxH(Math.max(el.clientHeight - 32, 160)); + const block = blockRef.current; + const question = block?.querySelector("[data-dock-scroll-area]"); + // The height budget belongs to the whole dock, including answer + // controls, stats, and padding. Only the question may consume the + // remaining space; otherwise the overlay grows behind the header. + const chrome = block && question ? block.offsetHeight - question.offsetHeight : 0; + setDockMaxH(Math.max(el.clientHeight - 32 - chrome, 0)); }; measure(); + const observer = new ResizeObserver(measure); + observer.observe(el); + if (blockRef.current) observer.observe(blockRef.current); window.addEventListener("resize", measure); - return () => window.removeEventListener("resize", measure); + return () => { + observer.disconnect(); + window.removeEventListener("resize", measure); + }; }, [scrollRef]); // GROWTH MUTE (owner round, 2026-10-05 — the generation churn): during a diff --git a/components/practice-dock.tsx b/components/practice-dock.tsx index 4c53b59..3ade8f4 100644 --- a/components/practice-dock.tsx +++ b/components/practice-dock.tsx @@ -105,7 +105,7 @@ export function PracticeDock({ problemCallId, input, expanded, onExpand, onSubmi cards' label row — owner round, 2026-10-05) + the statement, markdown + LaTeX rendered, capped by the measured column (--dock-max-h; the old fixed 40vh cut long problems short). */} -
+
Problem
{input.statement} diff --git a/components/question-dock.tsx b/components/question-dock.tsx index 08f5d23..56b3298 100644 --- a/components/question-dock.tsx +++ b/components/question-dock.tsx @@ -564,7 +564,7 @@ function QuestionDockForm({ {/* Question area — scrolls internally if very tall; the bottom row stays put. Capped by the measured column (--dock-max-h; the old fixed 55dvh cut long questions short — owner round, 2026-10-05). */} -
+
{toolName === "probe" ? "Probe"