RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Revert "fix(web): file list total count doesn't match displayed rows (#17747)" (#18856)
chanx3c9a7810fbb5
diff --git a/web/src/pages/files/files-table.tsx b/web/src/pages/files/files-table.tsxindex bbfc2b67ba..9250251fa3 100644--- a/web/src/pages/files/files-table.tsx+++ b/web/src/pages/files/files-table.tsx@@ -107,8 +107,8 @@ export function FilesTable({// Sort files with skills folder first, then by time// Filter out the skills folder on the Python backend- const { sortedFiles, hiddenCount } = useMemo(() => {- if (!files) return { sortedFiles: [] as IFile[], hiddenCount: 0 };+ const sortedFiles = useMemo(() => {+ if (!files) return [];// Filter out skills folder if feature is disabledconst filteredFiles = isSkillsEnabled@@ -119,7 +119,7 @@ export function FilesTable({return !isSkills;});- const sorted = [...filteredFiles].sort((a, b) => {+ return [...filteredFiles].sort((a, b) => {const aIsSkills =isFolderType(a.type) && a.name.toLowerCase() === 'skills';const bIsSkills =@@ -132,18 +132,8 @@ export function FilesTable({// Then sort by create_time desc (newest first)return (b.create_time || 0) - (a.create_time || 0);});-- return {- sortedFiles: sorted,- hiddenCount: files.length - filteredFiles.length,- };}, [files, isSkillsEnabled]);- // Keep the displayed total consistent with the rows actually shown:- // client-side filtered rows (e.g. the skills folder when the feature is- // disabled) are still included in the server-side total.- const displayTotal = Math.max((total ?? 0) - hiddenCount, 0);-const columns: ColumnDef<IFile>[] = [{id: 'select',@@ -333,7 +323,7 @@ export function FilesTable({rowSelection,pagination: currentPagination,},- rowCount: displayTotal,+ rowCount: total ?? 0,debugTable: true,});@@ -397,7 +387,7 @@ export function FilesTable({<footer className="flex items-center justify-end pb-5 mt-4"><RAGFlowPagination{...pick(pagination, 'current', 'pageSize')}- total={displayTotal}+ total={total}onChange={(page, pageSize) => {setPagination({ page, pageSize });}}