File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/client/components/ChatV2 Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,12 @@ const ChatV2Content = () => {
192
192
} , 5000 )
193
193
194
194
setIsStreaming ( true )
195
- chatScroll . beginAutoscroll ( )
195
+
196
+ // Scroll immediately to show loading dots for better UX feedback
197
+ // Small delay ensures React has rendered the loading message
198
+ setTimeout ( ( ) => {
199
+ chatScroll . beginAutoscroll ( )
200
+ } , 10 )
196
201
197
202
const generationInfo : MessageGenerationInfo = {
198
203
model : acualModel ,
Original file line number Diff line number Diff line change @@ -38,10 +38,18 @@ export const useChatScroll = () => {
38
38
startTransition ( ( ) => {
39
39
isUserDisabled = false
40
40
setIsAutoScrolling ( true )
41
+ // Immediate scroll to show loading dots right away for better UX
41
42
window . scrollTo ( {
42
43
top : document . body . scrollHeight ,
43
- behavior : 'smooth ' ,
44
+ behavior : 'instant ' ,
44
45
} )
46
+ // Follow up with smooth scroll after a brief delay to maintain smooth UX
47
+ setTimeout ( ( ) => {
48
+ window . scrollTo ( {
49
+ top : document . body . scrollHeight ,
50
+ behavior : 'smooth' ,
51
+ } )
52
+ } , 50 )
45
53
} )
46
54
}
47
55
You can’t perform that action at this time.
0 commit comments