Skip to content

Commit dcbb7a6

Browse files
fix: remove 500-message limit to prevent scrollbar jumping in long conversations (#7064)
- Removed array slicing logic that limited messages to 500 - This eliminates array index shifting that caused Virtuoso to lose scroll position - Virtuoso is designed to efficiently handle large lists through virtualization - Fixes the scrollbar jumping issue reported in #7063 and #7052 Co-authored-by: Roo Code <[email protected]>
1 parent a203a90 commit dcbb7a6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,11 +897,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
897897
useMount(() => textAreaRef.current?.focus())
898898

899899
const visibleMessages = useMemo(() => {
900-
const currentMessageCount = modifiedMessages.length
901-
const startIndex = Math.max(0, currentMessageCount - 500)
902-
const recentMessages = modifiedMessages.slice(startIndex)
903-
904-
const newVisibleMessages = recentMessages.filter((message: ClineMessage) => {
900+
// Remove the 500-message limit to prevent array index shifting
901+
// Virtuoso is designed to efficiently handle large lists through virtualization
902+
const newVisibleMessages = modifiedMessages.filter((message: ClineMessage) => {
905903
if (everVisibleMessagesTsRef.current.has(message.ts)) {
906904
const alwaysHiddenOnceProcessedAsk: ClineAsk[] = [
907905
"api_req_failed",

0 commit comments

Comments
 (0)