refactor: enhance DocumentsTableShell with BadgeInfo component and update sync version in client.ts

This commit is contained in:
Anish Sarkar 2026-02-06 15:18:14 +05:30
parent b41c22842f
commit f0e1d73657
2 changed files with 13 additions and 13 deletions

View file

@ -3,6 +3,7 @@
import { formatDistanceToNow } from "date-fns";
import {
AlertCircle,
BadgeInfo,
Calendar,
CheckCircle2,
ChevronDown,
@ -543,11 +544,14 @@ export function DocumentsTableShell({
</SortableHeader>
</TableHead>
)}
{columnVisibility.status && (
<TableHead className="w-20 text-center">
<span className="text-sm font-medium text-muted-foreground/70">Status</span>
</TableHead>
)}
{columnVisibility.status && (
<TableHead className="w-20">
<span className="flex items-center gap-1.5 text-sm font-medium text-muted-foreground/70">
<BadgeInfo size={14} className="opacity-60 text-muted-foreground" />
Status
</span>
</TableHead>
)}
<TableHead className="w-10">
<span className="sr-only">Actions</span>
</TableHead>

View file

@ -67,14 +67,10 @@ const pendingSyncs = new Map<string, Promise<SyncHandle>>();
// 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-";