From e0565471b02cc984773c1e98aeeb4f25ddc81f2d Mon Sep 17 00:00:00 2001 From: kzheart Date: Wed, 21 Jan 2026 08:02:13 +0800 Subject: [PATCH] fix: enable scrolling in PromptPanel when content overflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the issue where the General Prompts panel could not be scrolled when the prompt list exceeded the viewport height. Changes: - Add .prompt-panel-scroll container with overflow-y: auto - Restructure layout: header (fixed) → search (fixed) → scroll (scrollable content) - Move editor and prompt sections into scrollable container - Add bottom padding for better visual experience when scrolled to bottom Technical details: - Follows the same scrolling pattern as diff.css and file-tree.css - Uses flex: 1 + min-height: 0 + overflow-y: auto for proper flex scrolling - Keeps header and search bar fixed at top for better UX --- .../prompts/components/PromptPanel.tsx | 304 +++++++++--------- src/styles/prompts.css | 11 + 2 files changed, 164 insertions(+), 151 deletions(-) diff --git a/src/features/prompts/components/PromptPanel.tsx b/src/features/prompts/components/PromptPanel.tsx index f8b2014d7..85bd728f1 100644 --- a/src/features/prompts/components/PromptPanel.tsx +++ b/src/features/prompts/components/PromptPanel.tsx @@ -402,179 +402,181 @@ export function PromptPanel({ {hasPrompts ? `${totalCount} prompt${totalCount === 1 ? "" : "s"}` : "No prompts"} - {editor && ( -
-
+
+ + setQuery(event.target.value)} + aria-label="Filter prompts" + /> +
+
+ {editor && ( +
+
+ + +
+
+ + +