From 9d9dac0bd01c3db58d79c7ab0008a7c6cf028fd0 Mon Sep 17 00:00:00 2001 From: stroblme Date: Fri, 16 Oct 2026 10:50:23 +0200 Subject: [PATCH] Chat panel follows its tail by scrolling its own body (SidePanel body gets data-slot side-panel-body) instead of scrollIntoView, which scrolls every ancestor --- frontend/src/components/Chat/ChatPanel.tsx | 5 ++++- frontend/src/components/Flow/SidePanel.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Chat/ChatPanel.tsx b/frontend/src/components/Chat/ChatPanel.tsx index 63ef012..dc46e40 100644 --- a/frontend/src/components/Chat/ChatPanel.tsx +++ b/frontend/src/components/Chat/ChatPanel.tsx @@ -179,7 +179,10 @@ export function ChatPanel() { const tailLength = tail && "text" in tail ? tail.text.length : 0 // biome-ignore lint/correctness/useExhaustiveDependencies: scroll when the list or a streamed answer grows, not on every render. useEffect(() => { - bottom.current?.scrollIntoView({ block: "end" }) + // Only the panel's body moves: `scrollIntoView` would scroll every + // ancestor too, which is how the logs panel slid the code editor away. + const body = bottom.current?.closest("[data-slot=side-panel-body]") + body?.scrollTo({ top: body.scrollHeight }) }, [shown.length, tailLength, waiting]) const send = async () => { diff --git a/frontend/src/components/Flow/SidePanel.tsx b/frontend/src/components/Flow/SidePanel.tsx index c2636ea..78703b2 100644 --- a/frontend/src/components/Flow/SidePanel.tsx +++ b/frontend/src/components/Flow/SidePanel.tsx @@ -252,6 +252,7 @@ export function SidePanel({