Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(chat): reset scroll state when switching conversations (#29984)
lif04ad68de7023
diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsxindex 19c7b0da521..9864dda6ae2 100644--- a/web/app/components/base/chat/chat/index.tsx+++ b/web/app/components/base/chat/chat/index.tsx@@ -222,11 +222,16 @@ const Chat: FC<ChatProps> = ({return () => container.removeEventListener('scroll', setUserScrolled)}, [])- // Reset user scroll state when a new chat starts (length <= 1)+ // Reset user scroll state when conversation changes or a new chat starts+ // Track the first message ID to detect conversation switches (fixes #29820)+ const prevFirstMessageIdRef = useRef<string | undefined>(undefined)useEffect(() => {- if (chatList.length <= 1)+ const firstMessageId = chatList[0]?.id+ // Reset when: new chat (length <= 1) OR conversation switched (first message ID changed)+ if (chatList.length <= 1 || (firstMessageId && prevFirstMessageIdRef.current !== firstMessageId))userScrolledRef.current = false- }, [chatList.length])+ prevFirstMessageIdRef.current = firstMessageId+ }, [chatList])useEffect(() => {if (!sidebarCollapseState)