From 727515a3e09430751e921add513d2c470ec8a925 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 30 Jun 2025 10:30:07 +0000 Subject: [PATCH] Fix #5236: Resolve ChatView layout shifting and inconsistent spacing - Standardize AutoApproveMenu positioning with flex-shrink-0 class for both task and no-task states - Replace custom scroll-to-bottom button styling with standard VSCodeButton component - Add consistent spacing with fixed padding in action button areas - Eliminate layout shifts caused by different CSS classes between states --- webview-ui/src/components/chat/ChatView.tsx | 153 ++++++++++---------- 1 file changed, 79 insertions(+), 74 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index a4f18c870c..7789ba854d 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -1447,7 +1447,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction +
)} @@ -1474,86 +1474,91 @@ const ChatViewComponent: React.ForwardRefRenderFunction - - {showScrollToBottom ? ( -
+ {/* Fixed positioning for AutoApproveMenu to prevent layout shifts */} +
+ +
+ + {/* Consistent spacing and styling for action buttons area */} +
+ {showScrollToBottom ? ( -
{ scrollToBottomSmooth() disableAutoScrollRef.current = false }}> - -
+ +
-
- ) : ( -
- {primaryButtonText && !isStreaming && ( - + {primaryButtonText && !isStreaming && ( + - handlePrimaryButtonClick(inputValue, selectedImages)}> - {primaryButtonText} - - - )} - {(secondaryButtonText || isStreaming) && ( - - handleSecondaryButtonClick(inputValue, selectedImages)}> - {isStreaming ? t("chat:cancel.title") : secondaryButtonText} - - - )} -
- )} + t("chat:proceedAnyways.title") + ? t("chat:proceedAnyways.tooltip") + : primaryButtonText === + t("chat:proceedWhileRunning.title") + ? t("chat:proceedWhileRunning.tooltip") + : undefined + }> + handlePrimaryButtonClick(inputValue, selectedImages)}> + {primaryButtonText} + + + )} + {(secondaryButtonText || isStreaming) && ( + + handleSecondaryButtonClick(inputValue, selectedImages)}> + {isStreaming ? t("chat:cancel.title") : secondaryButtonText} + + + )} +
+ )} + )}