From 9a1ea0cd0781f0e4f1a5c2ac8fc9a46741a99e24 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Wed, 25 Jun 2025 00:02:38 +0100 Subject: [PATCH] Task attempt 84f34dec-b9ba-4430-84ce-07645c18d0ee - Final changes --- frontend/src/components/tasks/TaskDetailsPanel.tsx | 1 - .../src/components/ui/file-search-textarea.tsx | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/tasks/TaskDetailsPanel.tsx b/frontend/src/components/tasks/TaskDetailsPanel.tsx index 1340b19b..996067d1 100644 --- a/frontend/src/components/tasks/TaskDetailsPanel.tsx +++ b/frontend/src/components/tasks/TaskDetailsPanel.tsx @@ -4,7 +4,6 @@ import { X, History, Clock, - Code, ChevronDown, ChevronUp, Settings2, diff --git a/frontend/src/components/ui/file-search-textarea.tsx b/frontend/src/components/ui/file-search-textarea.tsx index 91c69b4a..c58451c1 100644 --- a/frontend/src/components/ui/file-search-textarea.tsx +++ b/frontend/src/components/ui/file-search-textarea.tsx @@ -198,7 +198,7 @@ export function FileSearchTextarea({ // Dropdown dimensions const dropdownWidth = 256 // min-w-64 = 256px const minDropdownHeight = 120 - const maxDropdownHeight = 240 // max-h-60 = 240px + const maxDropdownHeight = 400 // Increased to show more results without scrolling let finalTop = viewportTop let finalLeft = viewportLeft @@ -214,17 +214,17 @@ export function FileSearchTextarea({ finalLeft = 16 } - // Prevent going off the bottom edge - const availableSpaceBelow = window.innerHeight - viewportTop - 16 - const availableSpaceAbove = textareaRect.top + (currentLine * lineHeight) - 16 + // Prevent going off the bottom edge - use more generous spacing + const availableSpaceBelow = window.innerHeight - viewportTop - 32 + const availableSpaceAbove = textareaRect.top + (currentLine * lineHeight) - 32 if (availableSpaceBelow < minDropdownHeight && availableSpaceAbove > availableSpaceBelow) { // Position above the cursor line finalTop = textareaRect.top + paddingTop + (currentLine * lineHeight) - maxDropdownHeight - 8 - maxHeight = Math.min(maxDropdownHeight, availableSpaceAbove) + maxHeight = Math.min(maxDropdownHeight, Math.max(availableSpaceAbove, minDropdownHeight)) } else { - // Position below the cursor line - maxHeight = Math.min(maxDropdownHeight, availableSpaceBelow) + // Position below the cursor line - prioritize using available space + maxHeight = Math.min(maxDropdownHeight, Math.max(availableSpaceBelow, minDropdownHeight)) } // Ensure minimum height