-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[Feature] Support multiple connectors of the same type per search space #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support multiple connectors of the same type per search space #669
Conversation
…tors of same type per search space (idempotent)
…unique identifier extraction
… duplicate checks, update docstrings)
…or Google connector OAuth callbacks (consistent comments, identifier extraction)
…ndly names for Slack & Notion OAuth connectors
…ar, Jira, and Discord connector OAuth callbacks
…ng for Airtable and Confluence connector OAuth flows
|
@CREDO23 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.
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 ba54e1d..d75df7e
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (13)
• surfsense_backend/alembic/versions/57_allow_multiple_connectors_per_type.py
• surfsense_backend/app/routes/airtable_add_connector_route.py
• surfsense_backend/app/routes/confluence_add_connector_route.py
• surfsense_backend/app/routes/discord_add_connector_route.py
• surfsense_backend/app/routes/google_calendar_add_connector_route.py
• surfsense_backend/app/routes/google_drive_add_connector_route.py
• surfsense_backend/app/routes/google_gmail_add_connector_route.py
• surfsense_backend/app/routes/jira_add_connector_route.py
• surfsense_backend/app/routes/linear_add_connector_route.py
• surfsense_backend/app/routes/notion_add_connector_route.py
• surfsense_backend/app/routes/search_source_connectors_routes.py
• surfsense_backend/app/routes/slack_add_connector_route.py
• surfsense_backend/app/utils/connector_naming.py
…iple accounts - Create ConnectorAccountsListView component to show all connected accounts for a connector type - Add state management in use-connector-dialog for viewing connector accounts list - Update AllConnectorsTab to show accounts list when OAuth connector is connected - Update connector-popup.tsx to render the new accounts list view - Add 'accounts' view to connector popup URL schema - Display connected accounts in 2-column grid layout - Add 'Add Account' button with dashed border in header
Backend: - Add connectorId to OAuth redirect URLs in all 10 connector routes - Enables frontend to identify the specific connector created Frontend: - Update OAuth success handler to use connectorId for finding new connector - Set connectorId in URL when transitioning to configure view - Add connectorId support in URL sync effect for page refresh - Consolidate handleAddAccountOAuth into handleConnectOAuth - Update indexing config view to show connector type and display name
Active Connectors tab: - Group OAuth connectors by type (Gmail, Google Drive, etc.) - Show account count badge on grouped cards - Show most recent last indexed date across all accounts - Show non-OAuth connectors individually with active task messages All Connectors tab: - Show most recent last indexed date for OAuth connector types - Check if any account is indexing for OAuth types Accounts List View: - Remove document count from individual account cards - Back button returns to previous tab (not always All Connectors) General: - Update handleViewAccountsList to use (connectorType, connectorTitle) signature - Consistent behavior for viewing accounts from both tabs
b597ce8 to
5f0013c
Compare
Description
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR enables users to add multiple connectors of the same type (e.g., multiple Gmail or Slack accounts) within a single search space. The implementation removes the database-level unique constraint on
search_space_id,user_id, andconnector_type, introduces a new utility for generating unique connector names based on account identifiers (like email addresses or workspace names), and updates all connector routes to always create new connectors instead of checking for and updating existing ones.⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
surfsense_backend/alembic/versions/57_allow_multiple_connectors_per_type.pysurfsense_backend/app/utils/connector_naming.pysurfsense_backend/app/routes/search_source_connectors_routes.pysurfsense_backend/app/routes/google_gmail_add_connector_route.pysurfsense_backend/app/routes/google_drive_add_connector_route.pysurfsense_backend/app/routes/google_calendar_add_connector_route.pysurfsense_backend/app/routes/slack_add_connector_route.pysurfsense_backend/app/routes/notion_add_connector_route.pysurfsense_backend/app/routes/linear_add_connector_route.pysurfsense_backend/app/routes/jira_add_connector_route.pysurfsense_backend/app/routes/confluence_add_connector_route.pysurfsense_backend/app/routes/discord_add_connector_route.pysurfsense_backend/app/routes/airtable_add_connector_route.py