Session switch: land at the bottom instantly with the question dock open
- Chat now remounts per session (key={chat.id}): fresh StickToBottom,
fresh DockOverlay (no cross-session morph from the previous shell
height), fresh useChat.
- Conversation initial="instant" (was "smooth"): the mount scroll to
bottom is a jump, not a slide.
- DockOverlay skips the pending-question scroll/expand effect for the
session's INITIAL pending question (dock starts expanded; the initial
scroll positions us) — previously it fired a second smooth
scrollToBottom right after the library's initial scroll (the visible
'pause, then the quiz pops and pushes everything up').
- The dock-variant fade/rise no longer plays for the session's opening
variant; reserved for mid-session transitions.
Verified live: client-side switch settles at d=1px from the bottom within
one frame of content swap, dock open from the first frame, both
directions (quiz session, plain session).
This commit is contained in:
@@ -17,6 +17,7 @@ export default async function ChatPage({
|
||||
if (!chat) notFound();
|
||||
return (
|
||||
<Chat
|
||||
key={chat.id}
|
||||
chatId={chat.id}
|
||||
title={chat.title}
|
||||
initialMessages={chat.messages as TeacherUIMessage[]}
|
||||
|
||||
Reference in New Issue
Block a user