From a47091231c889942246fbd9b5c5f942cd46fd2e7 Mon Sep 17 00:00:00 2001 From: Ammar Date: Sun, 19 Oct 2025 20:53:20 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Fix=20auto-scroll=20when=20Pinne?= =?UTF-8?q?dTodoList=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include todos in auto-scroll effect dependencies so scroll position adjusts when TODO list appears/changes, not just when messages update. --- src/components/AIView.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/AIView.tsx b/src/components/AIView.tsx index 120f477b0..841f90f07 100644 --- a/src/components/AIView.tsx +++ b/src/components/AIView.tsx @@ -345,12 +345,18 @@ const AIViewInner: React.FC = ({ void window.api.workspace.openTerminal(namedWorkspacePath); }, [namedWorkspacePath]); - // Auto-scroll when messages update (during streaming) + // Auto-scroll when messages or todos update (during streaming) useEffect(() => { if (workspaceState && autoScroll) { performAutoScroll(); } - }, [workspaceState?.messages, autoScroll, performAutoScroll, workspaceState]); + }, [ + workspaceState?.messages, + workspaceState?.todos, + autoScroll, + performAutoScroll, + workspaceState, + ]); // Scroll to bottom when workspace loads or changes useEffect(() => {