feat: revamp documents UI & some fixes#779
feat: revamp documents UI & some fixes#779AnishSarkar22 wants to merge 9 commits intoMODSetter:mainfrom
Conversation
…ionality and improved loading states
…con for improved clarity
…nd update cleanup logic for user databases
|
@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. |
There was a problem hiding this comment.
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
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
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
onMustRefetchhandler to prevent data conflicts during shape invalidation.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
surfsense_backend/app/schemas/documents.pysurfsense_backend/app/routes/documents_routes.pysurfsense_web/contracts/types/document.types.tssurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/types.tssurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/PaginationControls.tsxsurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentTypeIcon.tsxsurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsxsurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsxsurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsxsurfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsxsurfsense_web/atoms/connector-dialog/connector-dialog.atoms.tssurfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.tssurfsense_web/components/assistant-ui/connector-popup.tsxsurfsense_web/app/dashboard/[search_space_id]/client-layout.tsxsurfsense_web/hooks/use-inbox.tssurfsense_web/lib/electric/client.tssurfsense_web/components/ui/skeleton.tsxsurfsense_web/components/layout/ui/sidebar/Sidebar.tsxsurfsense_web/components/layout/ui/sidebar/MobileSidebar.tsxsurfsense_web/components/layout/ui/shell/LayoutShell.tsxsurfsense_web/components/layout/providers/LayoutDataProvider.tsx