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 @@ -190,7 +190,12 @@ const ChatV2Content = () => {
190
190
} , 5000 )
191
191
192
192
setIsStreaming ( true )
193
- chatScroll . beginAutoscroll ( )
193
+
194
+ // Scroll immediately to show loading dots for better UX feedback
195
+ // Small delay ensures React has rendered the loading message
196
+ setTimeout ( ( ) => {
197
+ chatScroll . beginAutoscroll ( )
198
+ } , 10 )
194
199
195
200
const generationInfo : MessageGenerationInfo = {
196
201
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