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 { formatDistanceToNow } from "date-fns";
import { import {
AlertCircle, AlertCircle,
BadgeInfo,
Calendar, Calendar,
CheckCircle2, CheckCircle2,
ChevronDown, ChevronDown,
@ -544,8 +545,11 @@ export function DocumentsTableShell({
</TableHead> </TableHead>
)} )}
{columnVisibility.status && ( {columnVisibility.status && (
<TableHead className="w-20 text-center"> <TableHead className="w-20">
<span className="text-sm font-medium text-muted-foreground/70">Status</span> <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>
)} )}
<TableHead className="w-10"> <TableHead className="w-10">

View file

@ -67,14 +67,10 @@ const pendingSyncs = new Map<string, Promise<SyncHandle>>();
// v2: user-specific database architecture // v2: user-specific database architecture
// v3: consistent cutoff date for sync+queries, visibility refresh support // v3: consistent cutoff date for sync+queries, visibility refresh support
// v4: heartbeat-based stale notification detection with updated_at tracking // v4: heartbeat-based stale notification detection with updated_at tracking
// v5: fixed duplicate key errors (root cause: unstable cutoff dates in use-inbox.ts) // v5: fixed duplicate key errors, stable cutoff dates, onMustRefetch handler,
// - added onMustRefetch handler for server-side refetch scenarios // real-time documents table with title/created_by_id/status columns,
// - fixed getSyncCutoffDate to use stable midnight UTC timestamps // consolidated single documents sync, pending state for document queue visibility
// v6: real-time documents table - added title and created_by_id columns for live document display const SYNC_VERSION = 5;
// 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;
// Database name prefix for identifying SurfSense databases // Database name prefix for identifying SurfSense databases
const DB_PREFIX = "surfsense-"; const DB_PREFIX = "surfsense-";