Skip to content

feat: Document management revamp, connector UX improvements, batch embeddings, and CI/DevOps enhancements#868

Merged
MODSetter merged 183 commits intomainfrom
dev
Mar 11, 2026
Merged

feat: Document management revamp, connector UX improvements, batch embeddings, and CI/DevOps enhancements#868
MODSetter merged 183 commits intomainfrom
dev

Conversation

@MODSetter
Copy link
Owner

@MODSetter MODSetter commented Mar 11, 2026

Summary

A major release bringing a fully revamped document management experience, significant connector UX improvements, backend performance gains through batch embeddings, and strengthened CI/DevOps pipelines.

Document Management Revamp

  • Redesigned DocumentsSidebar with docked mode, sorting, infinite scroll, and integrated search via useDocumentSearch hook
  • New DocumentsTableShell with context menus, scroll position tracking, dynamic masking, and mobile long-press support
  • Introduced RightPanel component with tabbed navigation between Sources and Inbox, including animation effects and mobile responsiveness
  • Added document mention functionality in chat with inline mention editor and chip element integration
  • Implemented document metadata viewer with Ctrl+Click functionality
  • Integrated document upload dialog directly into the Composer action bar
  • New ConnectToolsBanner component and connector tools strip in the sidebar

Connector & Integration Improvements

  • Google Picker integration replacing custom folder tree for native Drive config
  • Auto-index connectors after OAuth without requiring a separate config step, with per-connector defaults and periodic sync
  • Fixed Google Drive folder selection UX and Gmail HTML rendering (unwrap layout tables, native img)
  • Added unified drive-picker-token endpoint with GOOGLE_PICKER_API_KEY config
  • Configurable extension backend URL and login support
  • YouTube video and playlist support in document collection
  • Refactored agent tools management with new UI integration

Backend Performance & Features

  • Batch embedding utility (embed_texts) with conditional strategy — batch for API providers, sequential for local models
  • asyncio.to_thread for embed_text in FastAPI paths to avoid blocking the event loop
  • Added missing index on chunks.document_id for faster search retrieval
  • UploadDocumentAdapter refactor for file indexing and reindexing
  • Batch unread counts endpoint for notifications to reduce API calls
  • Source type and category-based filtering in the notifications API
  • Added last_login column to user table for login tracking
  • Multi-format report export support (beyond existing formats)
  • Slowapi limiter removal for test compatibility

Frontend UI/UX

  • User settings page with profile management, API key configuration, and tab navigation
  • GitHub stars badge in the navbar
  • "Learn More" section in SidebarUserProfile with links to docs
  • Compact mode for CommentComposer
  • Enhanced dark mode styling consistency across sidebar, chat, and dialog components
  • Keyboard shortcut displays in sidebar and toolbar
  • Mobile long-press support across chat and document components
  • Replaced various icons for consistency (PencilIconPen, updated lucide-react to v0.577.0)
  • Removed unused components: DocumentsTable, DashboardBreadcrumb, ChatHeader (from Thread)

Inbox & Notifications

  • Category-based filtering: unread, errors, and source type filters
  • Consolidated inbox data handling in LayoutDataProvider
  • Baseline utility functions for tracking new items in documents and inbox

CI/DevOps

  • GitHub Actions workflow for backend tests (unit + integration) with required env vars
  • Enhanced Docker build workflow with conditional checks and improved summary output
  • New workflow for building and pushing Docker images
  • Updated Docker Compose dev config: renamed services/volumes, updated port mappings to avoid conflicts
  • Upgraded to Biome v2 with Tailwind CSS parser configuration
  • Removed .dockerignore to streamline build process

Documentation

  • Restructured docs for improved user experience with new navigation
  • Updated Docker installation documentation with new installation guides
  • Added Code of Conduct document
  • New documentation URLs added to sitemap
  • Updated metadata for SurfSense branding

Test Plan

  • Verify document sidebar docked mode, sorting, infinite scroll, and search work correctly
  • Test document mention in chat composer and inline chip rendering
  • Confirm Google Picker integration works for native Drive connector config
  • Validate auto-indexing triggers correctly after OAuth connector setup
  • Test batch embedding with both API and local embedding models
  • Verify notification filtering by category (unread, errors, source type)
  • Confirm RightPanel tabbed navigation and animations on desktop and mobile
  • Test document upload via Composer action and ConnectToolsBanner
  • Run backend unit and integration test suites via the new CI workflow
  • Verify Docker Compose dev setup starts correctly with updated port mappings
  • Test user settings page (profile tab, API key tab, tab navigation via URL)
  • Confirm Gmail HTML emails render correctly (no broken layout tables)
  • Validate YouTube video/playlist document ingestion
  • Test multi-format report export
  • Verify mobile long-press behavior across chat and document components

High-level PR Summary

This major release delivers a redesigned document management experience with docked sidebar mode, infinite scroll, and integrated search, alongside significant connector UX improvements including native Google Picker integration and auto-indexing after OAuth. The backend introduces batch embeddings for performance gains (conditional strategy for API vs local models), adds missing database indexes for faster search, and implements durable background deletion for documents and search spaces via Celery. The frontend enhances collaboration with real-time document mentions in chat (both inline chips and sidebar selections), multi-format report exports (PDF, DOCX, HTML, LaTeX, EPUB, ODT, plain text), and a new user settings page with profile management and API key configuration. CI/DevOps improvements include comprehensive GitHub Actions workflows for backend testing, enhanced Docker build with digest-based multi-arch manifests, and upgraded tooling (Biome v2 with Tailwind CSS parser). Notification filtering is expanded with category-based and source-type filters, plus a batched unread counts endpoint to reduce API calls. Gmail HTML rendering is improved by unwrapping layout tables, and YouTube playlist resolution is added for document collection. The agent system prompt is now scoped to only enabled tools, with explicit messaging about disabled capabilities.

⏱️ Estimated Review Time: 3+ hours

💡 Review Order Suggestion
Order File Path
1 .github/workflows/backend-tests.yml
2 .github/workflows/docker-build.yml
3 docker/.env.example
4 docker/docker-compose.yml
5 docker/docker-compose.dev.yml
6 docker/scripts/install.sh
7 docker/scripts/install.ps1
8 surfsense_backend/alembic/versions/103_add_last_login_to_user.py
9 surfsense_backend/alembic/versions/104_add_notification_composite_indexes.py
10 surfsense_backend/alembic/versions/105_add_chunks_document_id_index.py
11 surfsense_backend/app/db.py
12 surfsense_backend/app/utils/document_converters.py
13 surfsense_backend/app/indexing_pipeline/indexing_pipeline_service.py
14 surfsense_backend/app/agents/new_chat/system_prompt.py
15 surfsense_backend/app/agents/new_chat/tools/registry.py
16 surfsense_backend/app/templates/export_helpers.py
17 surfsense_backend/app/templates/report_pdf.typst
18 surfsense_backend/app/templates/report_html.css
19 surfsense_backend/app/routes/reports_routes.py
20 surfsense_backend/app/routes/notifications_routes.py
21 surfsense_backend/app/routes/search_source_connectors_routes.py
22 surfsense_backend/app/routes/youtube_routes.py
23 surfsense_backend/app/routes/documents_routes.py
24 surfsense_backend/app/routes/new_chat_routes.py
25 surfsense_backend/app/indexing_pipeline/adapters/file_upload_adapter.py
26 surfsense_backend/app/tasks/celery_tasks/document_tasks.py
27 surfsense_backend/app/users.py
28 surfsense_backend/app/connectors/google_gmail_connector.py
29 surfsense_backend/app/connectors/composio_gmail_connector.py
30 surfsense_web/app/(home)/page.tsx
31 surfsense_web/components/layout/providers/LayoutDataProvider.tsx
32 surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
33 surfsense_web/components/layout/ui/right-panel/RightPanel.tsx
34 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
35 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx
36 surfsense_web/components/new-chat/document-mention-picker.tsx
37 surfsense_web/components/assistant-ui/inline-mention-editor.tsx
38 surfsense_web/components/assistant-ui/thread.tsx
39 surfsense_web/components/assistant-ui/assistant-message.tsx
40 surfsense_web/components/chat-comments/comment-panel-container/comment-panel-container.tsx
41 surfsense_web/components/report-panel/report-panel.tsx
42 surfsense_web/atoms/agent-tools/agent-tools.atoms.ts
43 surfsense_web/atoms/chat/mentioned-documents.atom.ts
44 surfsense_web/atoms/layout/right-panel.atom.ts
45 surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx
46 surfsense_web/app/dashboard/[search_space_id]/settings/page.tsx
47 surfsense_web/app/dashboard/[search_space_id]/user-settings/page.tsx
48 surfsense_web/app/dashboard/[search_space_id]/user-settings/components/ProfileContent.tsx
49 surfsense_web/app/dashboard/[search_space_id]/user-settings/components/ApiKeyContent.tsx
50 surfsense_web/components/homepage/navbar.tsx
51 surfsense_web/components/homepage/github-stars-badge.tsx
52 surfsense_web/app/layout.tsx
53 surfsense_web/app/sitemap.ts
54 README.md
55 README.es.md
56 README.hi.md
57 README.pt-BR.md
58 README.zh-CN.md
59 biome.json
60 skills-lock.json
61 .cursor/skills/shadcn/SKILL.md
62 .cursor/skills/vercel-react-best-practices/SKILL.md
63 .cursor/skills/web-design-guidelines/SKILL.md

Need help? Join our Discord

AnishSarkar22 and others added 30 commits February 28, 2026 01:38
- Updated the `resetBatchGate` function to accept a parameter for immediate resolution, enhancing batch processing control.
- Changed the return type of the `useQuery` hook in `useComments` to specify `GetCommentsResponse`, improving type safety and clarity.
- Adjusted the initial batch gate invocation to resolve immediately, streamlining the comments fetching process.
…-out functionality

- Replaced the existing announcement card and empty state components with imports from the new announcements directory.
- Introduced state management for the announcements sidebar in the LayoutDataProvider.
- Updated navigation items to handle announcements sidebar toggling.
- Integrated AnnouncementsSidebar into the LayoutShell for both mobile and desktop views.
- Enhanced sidebar handling to improve user experience when navigating announcements.
add configurable extension backend url and login support
… job execution and integrating Docker metadata action for improved tagging and manifest creation
…and improve tagging logic for better handling of version tags
…ps and implementing a new DocumentsSidebar for better document management
…connector dialog comment in dashboard layout
…rts and buttons, and streamline type toggle functionality
…ashboard layout by eliminating unused component references
…actions and improve document tooltip display
…ntsTableShell with infinite scroll functionality for improved document loading
…d update DocumentsSidebar for improved search functionality
…dapter-class

refactor: Migrate document reindexing to `UploadDocumentAdapter` with unified indexing pipeline
Feat: added Announcements sidebar when logged in
… DocumentsSidebar for improved search and pagination handling
…ll by adding separate scroll references for desktop and mobile views
…buttons and enhancing search input functionality, while updating DocumentsSidebar for improved spacing
… by replacing icons for improved clarity and optimizing loading state management in useDocuments hook
…s by removing unused column visibility state and optimizing document loading logic in useDocuments hook
…s for current sort state, enhancing performance and clarity
AnishSarkar22 and others added 28 commits March 10, 2026 18:24
…te UI components for improved layout and user experience
…mposio-google-drive-connector

[Perf] Batch embedding, non-blocking search, chunks index & Google Drive UX fix
…urces and Report; update report panel handling in dashboard chat page for improved user experience
… width adjustments; refactor ReportPanelContent to streamline loading state handling
…ges; implement version tagging and multi-platform support for backend and web services
…mations and layout handling; integrate motion effects for smoother transitions
…r components; adjust sidebar behavior based on device type and improve right panel handling
fix: enhance docker build CI pipeline, update docker ports & docker docs
…ndling

- Add check_permission to drive-picker-token endpoint (IDOR fix)
- Use get_composio_service singleton + asyncio.to_thread to avoid blocking the event loop
- Sanitize error detail in 500 response to prevent internal info leakage
- Dispose picker on unmount to prevent orphaned overlay
- Surface error state on Google Picker Action.ERROR instead of silently closing
Resolve 3 conflicts:
- connector-popup.tsx: keep Picker modal coordination (pickerOpen state)
- google-drive-config.tsx: keep Google Picker, discard upstream folder tree
- composio-drive-config.tsx: accept upstream collapsible folder tree UX
[Improvement] UX for connectors: Google drive Picker, auto-index with default configs
- Added endpoint to list agent tools with metadata, excluding hidden tools.
- Updated NewChatRequest and RegenerateRequest schemas to include disabled tools.
- Integrated disabled tools management in the NewChatPage and Composer components.
- Improved tool instructions and visibility in the system prompt.
- Refactored tool registration to support hidden tools and default enabled states.
- Enhanced document chunk creation to handle strict zip behavior.
- Cleaned up imports and formatting across various files for consistency.
@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surf-sense-frontend Ready Ready Preview, Comment Mar 11, 2026 0:39am

Request Review

@MODSetter MODSetter merged commit 5571e8a into main Mar 11, 2026
11 of 17 checks passed
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.

5 participants