Skip to content

Commit 07fd60c

Browse files
committed
Fix scroll-to-bottom button not reset on thread switch
Reset isAtEndRef and showScrollToBottom when activeThread changes so stale scroll state from a previous thread does not persist into the new one.
1 parent 1620842 commit 07fd60c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/web/src/components/ChatView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,8 @@ export default function ChatView(props: ChatViewProps) {
19681968
useEffect(() => {
19691969
setExpandedWorkGroups({});
19701970
setPullRequestDialogState(null);
1971+
isAtEndRef.current = true;
1972+
setShowScrollToBottom(false);
19711973
if (planSidebarOpenOnNextThreadRef.current) {
19721974
planSidebarOpenOnNextThreadRef.current = false;
19731975
setPlanSidebarOpen(true);

0 commit comments

Comments
 (0)