From c5359ba0ce78b2474ff69be1c10760d51cfe4049 Mon Sep 17 00:00:00 2001 From: kiwina Date: Mon, 2 Jun 2025 03:58:10 +0800 Subject: [PATCH] Virtuoso footer re-rendering issue The Virtuoso component has a inner footer component that serves only as a bottom spacer, after investigation this component keeps re-rendering, beccause its unnecessary it was removed and the spaccing added to the component itselve --- webview-ui/src/components/chat/ChatView.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 6dffaa7368..d114701e18 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -1415,10 +1415,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction
, // Add empty padding at the bottom - }} + className="scrollable grow overflow-y-scroll mb-[5px]" // increasing top by 3_000 to prevent jumping around when user collapses a row increaseViewportBy={{ top: 3_000, bottom: Number.MAX_SAFE_INTEGER }} // hack to make sure the last message is always rendered to get truly perfect scroll to bottom animation when new messages are added (Number.MAX_SAFE_INTEGER is safe for arithmetic operations, which is all virtuoso uses this value for in src/sizeRangeSystem.ts) data={groupedMessages} // messages is the raw format returned by extension, modifiedMessages is the manipulated structure that combines certain messages of related type, and visibleMessages is the filtered structure that removes messages that should not be rendered