fix: respect manual chat scroll position

Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
This commit is contained in:
chaitin committed 2026-05-03 06:53:00 +00:00
1 parent 476ae0e94b
commit 9e06ae5261
1 file changed
+4 -2
@@ -852,7 +852,9 @@ export default function TaskDetailPage() {
if (previousLiveEndedCycleIdRef.current === latestCompletedLiveCycleId) return
previousLiveEndedCycleIdRef.current = latestCompletedLiveCycleId
scheduleChatScrollToBottom("smooth", { forceAutoScroll: true })
if (!shouldAutoScrollChatRef.current) return
scheduleChatScrollToBottom("smooth")
}, [latestCompletedLiveCycleId, scheduleChatScrollToBottom])
React.useEffect(() => {
@@ -862,7 +864,7 @@ export default function TaskDetailPage() {
previousRunningMessagesSignatureRef.current = runningMessagesSignature
if (!shouldAutoScrollChatRef.current) return
scheduleChatScrollToBottom("smooth")
scheduleChatScrollToBottom("auto")
}, [historyLoading, runningMessagesSignature, scheduleChatScrollToBottom])
const detailHeader = (