revert: restore stable chat history scrolling
This commit is contained in:
@@ -411,9 +411,7 @@ export const useChatAutoFollow = ({
|
||||
}, [sessionIsWorking, startFollowLoop]);
|
||||
|
||||
// Replay a deferred restoreSnapshot once ChatViewport mounts.
|
||||
// useLayoutEffect ensures scroll position is set before the browser paints,
|
||||
// preventing a visible flash of content at the wrong scroll position.
|
||||
React.useLayoutEffect(() => {
|
||||
React.useEffect(() => {
|
||||
if (!containerEl) return;
|
||||
if (pendingInitialRestoreRef.current && pendingInitialRestoreRef.current === currentSessionId) {
|
||||
void restoreSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user