From 221bc6942194d62a30d6b6cb17b5d5466971ef39 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Thu, 30 Apr 2026 13:38:30 +0000 Subject: [PATCH] fix: prevent bottom bar clipping in API config popover (#12237) The PopoverContent used overflow-hidden without a max-height constraint, which allowed Radix UI viewport collision avoidance to clip the bottom bar (containing the lock and settings buttons) when the popover was positioned near the bottom of the screen. Changes: - Add max-h based on --radix-popover-content-available-height CSS variable to PopoverContent so the flex layout can properly distribute space - Add max-h-inherit to the inner flex container so it respects the constraint - Add flex-shrink-0 to header, bottom bar to prevent them from shrinking - Change config list to use min-h-0 flex-1 so it shrinks instead of the bottom bar when viewport space is limited --- webview-ui/src/components/chat/ApiConfigSelector.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webview-ui/src/components/chat/ApiConfigSelector.tsx b/webview-ui/src/components/chat/ApiConfigSelector.tsx index e370296ec32..1898321fd4a 100644 --- a/webview-ui/src/components/chat/ApiConfigSelector.tsx +++ b/webview-ui/src/components/chat/ApiConfigSelector.tsx @@ -167,11 +167,11 @@ export const ApiConfigSelector = ({ align="start" sideOffset={4} container={portalContainer} - className="p-0 overflow-hidden w-[300px]"> -
+ className="p-0 overflow-hidden w-[300px] max-h-[var(--radix-popover-content-available-height,80vh)]"> +
{/* Search input or info blurb */} {listApiConfigMeta.length > 6 ? ( -
+
) : ( -
+

{t("prompts:apiConfiguration.select")}

@@ -201,7 +201,7 @@ export const ApiConfigSelector = ({ {filteredConfigs.length === 0 && searchValue ? (
{t("common:ui.no_results")}
) : ( -
+
{/* Pinned configs - sticky header */} {pinnedConfigs.length > 0 && (
+