From 5f2fede000a3f48e02ce765139f34821ccd27e59 Mon Sep 17 00:00:00 2001 From: Cole Goldsmith Date: Thu, 2 Oct 2025 10:26:38 -0500 Subject: [PATCH] styles --- frontend/components/knowledge-filter-list.tsx | 10 +++++---- .../components/knowledge-filter-panel.tsx | 3 ++- frontend/src/app/knowledge/page.tsx | 21 ++++++++++--------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/frontend/components/knowledge-filter-list.tsx b/frontend/components/knowledge-filter-list.tsx index bac0e5ca..129e8204 100644 --- a/frontend/components/knowledge-filter-list.tsx +++ b/frontend/components/knowledge-filter-list.tsx @@ -66,7 +66,7 @@ export function KnowledgeFilterList({ return ( <> -
+
Knowledge Filters @@ -76,7 +76,7 @@ export function KnowledgeFilterList({ size="sm" onClick={handleCreateNew} title="Create New Filter" - className="h-8 px-3 text-muted-foreground" + className="!h-8 w-8 px-0 text-muted-foreground" > @@ -106,12 +106,14 @@ export function KnowledgeFilterList({
{(() => { - const parsed = parseQueryData(filter.query_data) as ParsedQueryData; + const parsed = parseQueryData( + filter.query_data + ) as ParsedQueryData; const Icon = iconKeyToComponent(parsed.icon); return (
setQuery(e.target.value)} - rows={3} + rows={2} />
diff --git a/frontend/src/app/knowledge/page.tsx b/frontend/src/app/knowledge/page.tsx index f43c2065..01d8c8a7 100644 --- a/frontend/src/app/knowledge/page.tsx +++ b/frontend/src/app/knowledge/page.tsx @@ -64,7 +64,7 @@ function SearchPage() { }; // Convert TaskFiles to File format and merge with backend results - const taskFilesAsFiles: File[] = taskFiles.map(taskFile => { + const taskFilesAsFiles: File[] = taskFiles.map((taskFile) => { return { filename: taskFile.filename, mimetype: taskFile.mimetype, @@ -77,11 +77,11 @@ function SearchPage() { const backendFiles = data as File[]; - const filteredTaskFiles = taskFilesAsFiles.filter(taskFile => { + const filteredTaskFiles = taskFilesAsFiles.filter((taskFile) => { return ( taskFile.status !== "active" && !backendFiles.some( - backendFile => backendFile.filename === taskFile.filename + (backendFile) => backendFile.filename === taskFile.filename ) ); }); @@ -123,7 +123,7 @@ function SearchPage() { { field: "size", headerName: "Size", - valueFormatter: params => + valueFormatter: (params) => params.value ? `${Math.round(params.value / 1024)} KB` : "-", }, { @@ -133,13 +133,13 @@ function SearchPage() { { field: "owner", headerName: "Owner", - valueFormatter: params => + valueFormatter: (params) => params.data?.owner_name || params.data?.owner_email || "—", }, { field: "chunkCount", headerName: "Chunks", - valueFormatter: params => params.data?.chunkCount?.toString() || "-", + valueFormatter: (params) => params.data?.chunkCount?.toString() || "-", }, { field: "avgScore", @@ -201,7 +201,7 @@ function SearchPage() { try { // Delete each file individually since the API expects one filename at a time - const deletePromises = selectedRows.map(row => + const deletePromises = selectedRows.map((row) => deleteDocumentMutation.mutateAsync({ filename: row.filename }) ); @@ -267,8 +267,9 @@ function SearchPage() { />
)} + params.data.filename} + getRowId={(params) => params.data.filename} domLayout="normal" onSelectionChanged={onSelectionChanged} noRowsOverlayComponent={() => ( @@ -346,7 +347,7 @@ function SearchPage() { }? This will remove all chunks and data associated with these documents. This action cannot be undone. Documents to be deleted: -${selectedRows.map(row => `• ${row.filename}`).join("\n")}`} +${selectedRows.map((row) => `• ${row.filename}`).join("\n")}`} confirmText="Delete All" onConfirm={handleBulkDelete} isLoading={deleteDocumentMutation.isPending}