Skip to content

feat: add Azure Document Intelligence as accelerator for LlamaCloud & some UX fixes#1164

Merged
MODSetter merged 13 commits into
MODSetter:devfrom
AnishSarkar22:feat/azure-ocr
Apr 7, 2026
Merged

feat: add Azure Document Intelligence as accelerator for LlamaCloud & some UX fixes#1164
MODSetter merged 13 commits into
MODSetter:devfrom
AnishSarkar22:feat/azure-ocr

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Added Azure D.I as an internal accelerator for LlamaCloud ETL parser.
  • Added azure-ai-documentintelligence as dependency.
  • Moved the "folder watch" to have its separate button in the right document sidebar.
  • Removed unused code like DocumentsTableShell.tsx and its related code.
  • Improved the UI for document type icons in the right sidebar.
  • Updated notification for duplicate status.
  • Changed linear.svg.

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 integrates Azure Document Intelligence as an optional accelerator for the LlamaCloud ETL parser to provide faster and cheaper document processing for supported file types. When configured, Azure DI handles formats like PDF, DOCX, XLSX, PPTX, and image files, with automatic fallback to LlamaCloud on failures. The PR also improves UX by moving the folder watch feature into a dedicated dialog in the documents sidebar, refactoring file extension handling into a centralized module, adding re-scan loading indicators, improving duplicate document error messages, and fixing tooltip text wrapping.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 docker/.env.example
2 surfsense_backend/.env.example
3 surfsense_backend/app/config/__init__.py
4 surfsense_backend/pyproject.toml
5 surfsense_backend/app/utils/file_extensions.py
6 surfsense_backend/app/etl_pipeline/parsers/azure_doc_intelligence.py
7 surfsense_backend/app/etl_pipeline/etl_pipeline_service.py
8 surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py
9 surfsense_backend/app/indexing_pipeline/indexing_pipeline_service.py
10 surfsense_web/lib/supported-extensions.ts
11 surfsense_web/components/sources/FolderWatchDialog.tsx
12 surfsense_web/components/sources/DocumentUploadTab.tsx
13 surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
14 surfsense_web/components/documents/FolderNode.tsx
15 surfsense_web/components/documents/DocumentNode.tsx
16 surfsense_web/components/ui/tooltip.tsx
17 surfsense_web/lib/env-config.ts
18 surfsense_web/public/connectors/linear.svg
⚠️ Inconsistent Changes Detected
File Path Warning
surfsense_web/public/connectors/linear.svg Changes the Linear connector icon color from #222326 to #8299FF, which appears unrelated to Azure DI integration or folder watch UX improvements

Need help? Join our Discord

Analyze latest changes

@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown

@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.

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

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 5260570..3832bdb

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (24)

docker/.env.example
surfsense_backend/.env.example
surfsense_backend/app/config/__init__.py
surfsense_backend/app/etl_pipeline/etl_pipeline_service.py
surfsense_backend/app/etl_pipeline/parsers/azure_doc_intelligence.py
surfsense_backend/app/indexing_pipeline/indexing_pipeline_service.py
surfsense_backend/app/utils/file_extensions.py
surfsense_backend/pyproject.toml
surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py
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/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx
surfsense_web/components/documents/DocumentNode.tsx
surfsense_web/components/documents/FolderNode.tsx
surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx
surfsense_web/components/sources/DocumentUploadTab.tsx
surfsense_web/components/sources/FolderWatchDialog.tsx
surfsense_web/components/ui/tooltip.tsx
surfsense_web/lib/env-config.ts
surfsense_web/lib/supported-extensions.ts
surfsense_web/public/connectors/linear.svg

⏭️ Files skipped (3)
  Locations  
surfsense_backend/uv.lock
surfsense_web/components/documents/DocumentTypeIcon.tsx
surfsense_web/components/documents/DocumentsFilters.tsx

@AnishSarkar22
AnishSarkar22 marked this pull request as ready for review April 7, 2026 23:50
@MODSetter
MODSetter merged commit f87a2ef into MODSetter:dev Apr 7, 2026
13 of 16 checks passed

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

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 3832bdb..8455451

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (50)

.github/workflows/desktop-release.yml
package.json
surfsense_backend/alembic/versions/120_add_vision_llm_configs_table.py
surfsense_backend/app/agents/autocomplete/__init__.py
surfsense_backend/app/agents/autocomplete/autocomplete_agent.py
surfsense_backend/app/app.py
surfsense_backend/app/celery_app.py
surfsense_backend/app/config/__init__.py
surfsense_backend/app/config/global_llm_config.example.yaml
surfsense_backend/app/config/vision_model_list_fallback.json
surfsense_backend/app/db.py
surfsense_backend/app/etl_pipeline/etl_pipeline_service.py
surfsense_backend/app/routes/__init__.py
surfsense_backend/app/routes/search_spaces_routes.py
surfsense_backend/app/routes/vision_llm_routes.py
surfsense_backend/app/schemas/__init__.py
surfsense_backend/app/schemas/new_llm_config.py
surfsense_backend/app/schemas/vision_llm.py
surfsense_backend/app/services/llm_service.py
surfsense_backend/app/services/vision_autocomplete_service.py
surfsense_backend/app/services/vision_llm_router_service.py
surfsense_backend/app/services/vision_model_list_service.py
surfsense_backend/pyproject.toml
surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py
surfsense_backend/tests/unit/utils/test_file_extensions.py
surfsense_backend/uv.lock
surfsense_desktop/.env
surfsense_desktop/electron-builder.yml
surfsense_desktop/package.json
surfsense_desktop/pnpm-lock.yaml
surfsense_desktop/scripts/build-electron.mjs
surfsense_desktop/src/ipc/channels.ts
surfsense_desktop/src/ipc/handlers.ts
surfsense_desktop/src/main.ts
surfsense_desktop/src/modules/active-search-space.ts
surfsense_desktop/src/modules/analytics.ts
surfsense_desktop/src/modules/autocomplete/index.ts
surfsense_desktop/src/modules/platform.ts
surfsense_desktop/src/modules/quick-ask.ts
surfsense_desktop/src/modules/shortcuts.ts
surfsense_desktop/src/modules/tray.ts
surfsense_desktop/src/modules/window.ts
surfsense_desktop/src/preload.ts
surfsense_web/.env.example
surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx
surfsense_web/app/dashboard/layout.tsx
surfsense_web/app/desktop/login/page.tsx
surfsense_web/app/desktop/permissions/page.tsx
surfsense_web/app/desktop/suggestion/page.tsx

⏭️ Files skipped (42)
  Locations  
surfsense_web/app/desktop/suggestion/suggestion.css
surfsense_web/app/layout.tsx
surfsense_web/atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts
surfsense_web/atoms/vision-llm-config/vision-llm-config-query.atoms.ts
surfsense_web/components/TokenHandler.tsx
surfsense_web/components/UserDropdown.tsx
surfsense_web/components/assistant-ui/assistant-message.tsx
surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx
surfsense_web/components/assistant-ui/inline-mention-editor.tsx
surfsense_web/components/assistant-ui/thread.tsx
surfsense_web/components/desktop/shortcut-recorder.tsx
surfsense_web/components/documents/DocumentNode.tsx
surfsense_web/components/documents/FolderNode.tsx
surfsense_web/components/homepage/hero-section.tsx
surfsense_web/components/layout/providers/LayoutDataProvider.tsx
surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx
surfsense_web/components/new-chat/chat-header.tsx
surfsense_web/components/new-chat/model-selector.tsx
surfsense_web/components/platform-gate.tsx
surfsense_web/components/settings/llm-role-manager.tsx
surfsense_web/components/settings/search-space-settings-dialog.tsx
surfsense_web/components/settings/user-settings-dialog.tsx
surfsense_web/components/settings/vision-model-manager.tsx
surfsense_web/components/shared/vision-config-dialog.tsx
surfsense_web/components/sources/DocumentUploadTab.tsx
surfsense_web/components/sources/FolderWatchDialog.tsx
surfsense_web/contexts/platform-context.tsx
surfsense_web/contracts/enums/vision-providers.ts
surfsense_web/contracts/types/new-llm-config.types.ts
surfsense_web/hooks/use-folder-sync.ts
surfsense_web/hooks/use-platform.ts
surfsense_web/lib/apis/vision-llm-config-api.service.ts
surfsense_web/lib/auth-utils.ts
surfsense_web/lib/query-client/cache-keys.ts
surfsense_web/lib/supported-extensions.ts
surfsense_web/messages/en.json
surfsense_web/messages/es.json
surfsense_web/messages/hi.json
surfsense_web/messages/pt.json
surfsense_web/messages/zh.json
surfsense_web/types/window.d.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.

2 participants