Skip to content

feat: revamp documents UI & some fixes#779

Closed
AnishSarkar22 wants to merge 9 commits intoMODSetter:mainfrom
AnishSarkar22:fix/documents
Closed

feat: revamp documents UI & some fixes#779
AnishSarkar22 wants to merge 9 commits intoMODSetter:mainfrom
AnishSarkar22:fix/documents

Conversation

@AnishSarkar22
Copy link
Contributor

@AnishSarkar22 AnishSarkar22 commented Feb 4, 2026

Description

  • Revamped Documents UI, now its mobile responsive as well.
  • Added real time documents architecture using electric-sql + pglite.
  • Fixed duplicate notifications key error for inbox.
  • Added skeletons for private and shared chats.

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR delivers a comprehensive revamp of the Documents UI with Notion-style design patterns and mobile responsiveness, implements real-time document synchronization using Electric-SQL with PGlite, fixes duplicate notification key errors in the inbox, and adds loading skeletons for private and shared chats. The Documents UI now features a cleaner table layout with enhanced filters, improved pagination, user attribution (created_by_name), and better mobile support. The Electric-SQL integration includes critical bug fixes for duplicate key errors caused by unstable cutoff dates and adds an onMustRefetch handler to prevent data conflicts during shape invalidation.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/app/schemas/documents.py
2 surfsense_backend/app/routes/documents_routes.py
3 surfsense_web/contracts/types/document.types.ts
4 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/types.ts
5 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/PaginationControls.tsx
6 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentTypeIcon.tsx
7 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx
8 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
9 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
10 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx
11 surfsense_web/atoms/connector-dialog/connector-dialog.atoms.ts
12 surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
13 surfsense_web/components/assistant-ui/connector-popup.tsx
14 surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
15 surfsense_web/hooks/use-inbox.ts
16 surfsense_web/lib/electric/client.ts
17 surfsense_web/components/ui/skeleton.tsx
18 surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
19 surfsense_web/components/layout/ui/sidebar/MobileSidebar.tsx
20 surfsense_web/components/layout/ui/shell/LayoutShell.tsx
21 surfsense_web/components/layout/providers/LayoutDataProvider.tsx

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Feb 4, 2026

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AnishSarkar22 AnishSarkar22 marked this pull request as ready for review February 4, 2026 14:47
Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 8c60910..5e4dce4

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (21)

surfsense_backend/app/routes/documents_routes.py
surfsense_backend/app/schemas/documents.py
surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentTypeIcon.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/PaginationControls.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/types.ts
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx
surfsense_web/atoms/connector-dialog/connector-dialog.atoms.ts
surfsense_web/atoms/documents/document-mutation.atoms.ts
surfsense_web/components/assistant-ui/connector-popup.tsx
surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
surfsense_web/components/layout/providers/LayoutDataProvider.tsx
surfsense_web/components/layout/ui/shell/LayoutShell.tsx
surfsense_web/components/layout/ui/sidebar/MobileSidebar.tsx
surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
surfsense_web/contracts/types/document.types.ts
surfsense_web/hooks/use-inbox.ts
surfsense_web/lib/electric/client.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant