Skip to content

Conversation

@CREDO23
Copy link
Contributor

@CREDO23 CREDO23 commented Jan 6, 2026

Description

  • Support multiple connectors of the same type per search space

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 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, and connector_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
Order File Path
1 surfsense_backend/alembic/versions/57_allow_multiple_connectors_per_type.py
2 surfsense_backend/app/utils/connector_naming.py
3 surfsense_backend/app/routes/search_source_connectors_routes.py
4 surfsense_backend/app/routes/google_gmail_add_connector_route.py
5 surfsense_backend/app/routes/google_drive_add_connector_route.py
6 surfsense_backend/app/routes/google_calendar_add_connector_route.py
7 surfsense_backend/app/routes/slack_add_connector_route.py
8 surfsense_backend/app/routes/notion_add_connector_route.py
9 surfsense_backend/app/routes/linear_add_connector_route.py
10 surfsense_backend/app/routes/jira_add_connector_route.py
11 surfsense_backend/app/routes/confluence_add_connector_route.py
12 surfsense_backend/app/routes/discord_add_connector_route.py
13 surfsense_backend/app/routes/airtable_add_connector_route.py

Need help? Join our Discord

Analyze latest changes

…tors of same type per search space (idempotent)
…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
@vercel
Copy link

vercel bot commented Jan 6, 2026

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

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

CREDO23 added 14 commits January 6, 2026 19:38
…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
@CREDO23 CREDO23 force-pushed the sur-66-feature-support-multiple-connectors-of-the-same-type-per branch from b597ce8 to 5f0013c Compare January 7, 2026 12:03
@CREDO23 CREDO23 marked this pull request as ready for review January 7, 2026 13:24
@MODSetter MODSetter merged commit b53ea56 into MODSetter:dev Jan 7, 2026
2 of 6 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