From f0e1d73657d88546d9f4e3b3a6e968a42a927892 Mon Sep 17 00:00:00 2001
From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com>
Date: Fri, 6 Feb 2026 15:18:14 +0530
Subject: [PATCH] refactor: enhance DocumentsTableShell with BadgeInfo
component and update sync version in client.ts
---
.../(manage)/components/DocumentsTableShell.tsx | 14 +++++++++-----
surfsense_web/lib/electric/client.ts | 12 ++++--------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
index d5ee00dfb..ee08e0baf 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
@@ -3,6 +3,7 @@
import { formatDistanceToNow } from "date-fns";
import {
AlertCircle,
+ BadgeInfo,
Calendar,
CheckCircle2,
ChevronDown,
@@ -543,11 +544,14 @@ export function DocumentsTableShell({
)}
- {columnVisibility.status && (
-
- Status
-
- )}
+ {columnVisibility.status && (
+
+
+
+ Status
+
+
+ )}
Actions
diff --git a/surfsense_web/lib/electric/client.ts b/surfsense_web/lib/electric/client.ts
index 9d596a261..c8bbd60fa 100644
--- a/surfsense_web/lib/electric/client.ts
+++ b/surfsense_web/lib/electric/client.ts
@@ -67,14 +67,10 @@ const pendingSyncs = new Map>();
// v2: user-specific database architecture
// v3: consistent cutoff date for sync+queries, visibility refresh support
// v4: heartbeat-based stale notification detection with updated_at tracking
-// v5: fixed duplicate key errors (root cause: unstable cutoff dates in use-inbox.ts)
-// - added onMustRefetch handler for server-side refetch scenarios
-// - fixed getSyncCutoffDate to use stable midnight UTC timestamps
-// v6: real-time documents table - added title and created_by_id columns for live document display
-// v7: removed use-documents-electric.ts - consolidated to single documents sync to prevent conflicts
-// v8: added status column for real-time document processing status (ready/processing/failed)
-// v9: added pending state for accurate document queue visibility
-const SYNC_VERSION = 11;
+// v5: fixed duplicate key errors, stable cutoff dates, onMustRefetch handler,
+// real-time documents table with title/created_by_id/status columns,
+// consolidated single documents sync, pending state for document queue visibility
+const SYNC_VERSION = 5;
// Database name prefix for identifying SurfSense databases
const DB_PREFIX = "surfsense-";