Skip to content

Conversation

@MODSetter
Copy link
Owner

@MODSetter MODSetter commented Nov 4, 2025

Description

  • Increased task time limits in celery_app.py for longer processing times.
  • Enhanced pagination logic in NotionHistoryConnector to handle large result sets.
  • Implemented batch commits every 10 documents across various indexers (Airtable, ClickUp, Confluence, Discord, GitHub, Google Calendar, Gmail, JIRA, Linear, Luma, Notion, Slack) to improve performance and reduce database load.

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 implements performance optimizations across the backend indexing system by introducing batch commits every 10 documents for all connector indexers (Airtable, ClickUp, Confluence, Discord, GitHub, Google Calendar, Gmail, JIRA, Linear, Luma, Notion, Slack) to reduce database load. It also increases Celery task time limits from 1 hour to 8 hours to accommodate longer-running indexing operations, and enhances the Notion connector's pagination logic to properly handle large result sets. Additionally, the frontend receives updates to the chat connector selector UI to support both indexed document types and live search connectors.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/app/celery_app.py
2 surfsense_backend/app/connectors/notion_history.py
3 surfsense_backend/app/tasks/connector_indexers/airtable_indexer.py
4 surfsense_backend/app/tasks/connector_indexers/clickup_indexer.py
5 surfsense_backend/app/tasks/connector_indexers/confluence_indexer.py
6 surfsense_backend/app/tasks/connector_indexers/discord_indexer.py
7 surfsense_backend/app/tasks/connector_indexers/github_indexer.py
8 surfsense_backend/app/tasks/connector_indexers/google_calendar_indexer.py
9 surfsense_backend/app/tasks/connector_indexers/google_gmail_indexer.py
10 surfsense_backend/app/tasks/connector_indexers/jira_indexer.py
11 surfsense_backend/app/tasks/connector_indexers/linear_indexer.py
12 surfsense_backend/app/tasks/connector_indexers/luma_indexer.py
13 surfsense_backend/app/tasks/connector_indexers/notion_indexer.py
14 surfsense_backend/app/tasks/connector_indexers/slack_indexer.py
15 surfsense_web/components/chat/ChatInputGroup.tsx
16 surfsense_web/app/dashboard/page.tsx
17 surfsense_web/app/(home)/login/GoogleLoginButton.tsx
18 surfsense_web/components/sidebar/app-sidebar.tsx
⚠️ Inconsistent Changes Detected
File Path Warning
surfsense_web/app/(home)/login/GoogleLoginButton.tsx Minor formatting/whitespace change (comment alignment) unrelated to the performance optimization and batch commit focus of this PR
surfsense_web/app/dashboard/page.tsx Code formatting change (Link component attribute formatting) that appears to be unrelated to the batch commit and performance improvements
surfsense_web/components/sidebar/app-sidebar.tsx Import reordering and code formatting changes that are unrelated to the core performance optimization and batch commit implementation
surfsense_web/components/chat/ChatInputGroup.tsx Adds significant new functionality for live search connectors in the chat UI, which appears to be a separate feature enhancement unrelated to the backend batch commit performance optimization focus

Need help? Join our Discord

Analyze latest changes

…y_app.py

- Increased task time limits in celery_app.py for longer processing times.
- Enhanced pagination logic in NotionHistoryConnector to handle large result sets.
- Implemented batch commits every 10 documents across various indexers (Airtable, ClickUp, Confluence, Discord, GitHub, Google Calendar, Gmail, JIRA, Linear, Luma, Notion, Slack) to improve performance and reduce database load.
- Updated final commit logging for clarity on total documents processed.
@vercel
Copy link

vercel bot commented Nov 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
surf-sense-frontend Ready Ready Preview Comment Nov 4, 2025 0:02am

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 57fd82f..a3a5b13

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (18)

surfsense_backend/app/celery_app.py
surfsense_backend/app/connectors/notion_history.py
surfsense_backend/app/tasks/connector_indexers/airtable_indexer.py
surfsense_backend/app/tasks/connector_indexers/clickup_indexer.py
surfsense_backend/app/tasks/connector_indexers/confluence_indexer.py
surfsense_backend/app/tasks/connector_indexers/discord_indexer.py
surfsense_backend/app/tasks/connector_indexers/github_indexer.py
surfsense_backend/app/tasks/connector_indexers/google_calendar_indexer.py
surfsense_backend/app/tasks/connector_indexers/google_gmail_indexer.py
surfsense_backend/app/tasks/connector_indexers/jira_indexer.py
surfsense_backend/app/tasks/connector_indexers/linear_indexer.py
surfsense_backend/app/tasks/connector_indexers/luma_indexer.py
surfsense_backend/app/tasks/connector_indexers/notion_indexer.py
surfsense_backend/app/tasks/connector_indexers/slack_indexer.py
surfsense_web/app/(home)/login/GoogleLoginButton.tsx
surfsense_web/app/dashboard/page.tsx
surfsense_web/components/chat/ChatInputGroup.tsx
surfsense_web/components/sidebar/app-sidebar.tsx

@MODSetter MODSetter merged commit e31d61d into main Nov 4, 2025
7 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.

2 participants