From 733e24bf003fabb1a7bb465d6dca8672846aeb48 Mon Sep 17 00:00:00 2001 From: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:15:01 -0600 Subject: [PATCH] Refactor SearchPage Component and Update Bulk Actions - Removed the clear selection functionality and associated UI elements from the SearchPage component. - Simplified the bulk actions bar by integrating a delete button and a sync button with alert functionality. - Adjusted button styles for consistency and improved user experience. - Enhanced the search input area for better accessibility and usability. --- frontend/src/app/knowledge/page.tsx | 55 ++++++++++------------------- 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/frontend/src/app/knowledge/page.tsx b/frontend/src/app/knowledge/page.tsx index 39aefa55..50f7ff56 100644 --- a/frontend/src/app/knowledge/page.tsx +++ b/frontend/src/app/knowledge/page.tsx @@ -8,7 +8,6 @@ import { Loader2, Search, Trash2, - X, } from "lucide-react"; import { AgGridReact, CustomCellRendererProps } from "ag-grid-react"; import { @@ -217,13 +216,6 @@ function SearchPage() { } }; - const clearSelection = useCallback(() => { - setSelectedRows([]); - if (gridRef.current) { - gridRef.current.api.deselectAll(); - } - }, []); - return (
- {/* Bulk Actions Bar */} - {selectedRows.length > 0 && ( -
-
- - {selectedRows.length} document - {selectedRows.length > 1 ? "s" : ""} selected - -
-
- - -
-
- )} {/* Search Input Area */}
@@ -282,12 +248,12 @@ function SearchPage() { value={queryInputText} onChange={e => setQueryInputText(e.target.value)} placeholder="Search your documents..." - className="flex-1 bg-muted/20 rounded-lg border border-border/50 px-4 py-3 h-12 focus-visible:ring-1 focus-visible:ring-ring" + className="flex-1 bg-muted/20 rounded-lg border border-border/50 px-4 py-3 focus-visible:ring-1 focus-visible:ring-ring" /> + +
{selectedFile ? (