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.