From fa33d16db74bc75d42b50a96f26ccd2be739ce43 Mon Sep 17 00:00:00 2001 From: GoggleHe Date: Sun, 31 May 2026 02:56:05 +0800 Subject: [PATCH 1/2] fix(cli): auto-scroll to bottom on turn end (#2378) When the user scrolls up during a streaming turn, the chat-scroll-store sets pinned=false and the viewport stays at the user's position. On turn end, nothing re-pinned the viewport, so the user had to manually scroll down or press End to see the final answer. Add chatScroll.jumpToBottom() after setBusy(false) in the main turn execution path so the viewport always settles on the final output. --- src/cli/ui/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli/ui/App.tsx b/src/cli/ui/App.tsx index 5f410619b..da529d083 100644 --- a/src/cli/ui/App.tsx +++ b/src/cli/ui/App.tsx @@ -3616,6 +3616,9 @@ function AppInner({ setSummary(loop.stats.summary()); busyRef.current = false; setBusy(false); + // Re-pin after turn end so scrolled-up users still land on the + // final answer without needing to press End manually. + chatScroll.jumpToBottom(); submittingRef.current = false; qq.clearTurnReply(); telegram.clearTurnReply(); From 7c70a413c66fc7b33b27a62d215a6a6fd3df58d3 Mon Sep 17 00:00:00 2001 From: GoggleHe Date: Sun, 31 May 2026 03:26:51 +0800 Subject: [PATCH 2/2] fix(cli): add chatScroll to handleSubmit deps --- src/cli/ui/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli/ui/App.tsx b/src/cli/ui/App.tsx index da529d083..438b9cd7b 100644 --- a/src/cli/ui/App.tsx +++ b/src/cli/ui/App.tsx @@ -3700,6 +3700,7 @@ function AppInner({ generateCurrentSessionTitle, switchWorkspaceRoot, system, + chatScroll, ], );