From cb377ba00e8c71f50843be58086095ed1994b143 Mon Sep 17 00:00:00 2001 From: stroblme Date: Fri, 16 Oct 2026 10:39:09 +0200 Subject: [PATCH] Logs panel follows its tail by scrolling its own list: scrollIntoView scrolled every ancestor too, so with the code editor expanded each new line slid the whole editor up to bring the hidden dock into view --- frontend/src/components/Flow/LogsPanel.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Flow/LogsPanel.tsx b/frontend/src/components/Flow/LogsPanel.tsx index 04cf798..58f40e7 100644 --- a/frontend/src/components/Flow/LogsPanel.tsx +++ b/frontend/src/components/Flow/LogsPanel.tsx @@ -102,9 +102,13 @@ function OpenLogsPanel({ const bottom = useRef(null) // Follow the tail, which is where a running flow puts what just happened. + // Only the list moves: `scrollIntoView` would scroll every ancestor too, and + // with the code editor expanded the dock sits below the canvas, so the whole + // editor slid up to bring this line into view. // biome-ignore lint/correctness/useExhaustiveDependencies: a new line is what scrolls. useEffect(() => { - bottom.current?.scrollIntoView({ block: "end" }) + const viewport = bottom.current?.closest("[data-slot=scroll-area-viewport]") + viewport?.scrollTo({ top: viewport.scrollHeight }) }, [lines.length]) // Escape still closes it, like everything else floating over this canvas.