Repository navigation
feat(search): connect multiple accounts per integration - #9716
Conversation
Key managed OAuth credentials on the provider's subject and tenant instead of one row per enrollment and option, so a member can connect several accounts of any OAuth integration. Reconnect stays pinned to its account, disconnecting frees the slot, and invitation links only refresh the existing account.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[High impact] The PR appears safe to merge; no new actionable issues were found. Findings
SummaryAdds multiple accounts per integration, with shared rules for adding, reconnecting, and restoring OAuth and managed MCP accounts.
|
…ector Read the signed-in account through each connector's documented identity tool during OAuth completion and key connections on it, sharing one set of account rules with OAuth providers. Notion, Granola, Fireflies, Coda, and HubSpot now allow several accounts; connectors with no identity tool stay at one.
Enforce the account limit when reconnecting a disconnected account, keep GitHub setup working when one linked account fails, and surface reconnect prompts over disconnected accounts. Identify existing managed MCP connections from their stored tokens so adding an account does not first require reconnecting.
…connect Show accounts as accounts, surface Reconnect beside an account that needs it, keep each disconnect clear about which account it removes, and hide Add account in a single account's view. Connecting from any surface now refreshes what Search can reach. Add browser coverage for several accounts and tighten the tests.
The design system Button dropped aria-label, so several Reconnect buttons on one page read the same. Restore the browser check for an app with connections unavailable and shrink the test-types baseline after removing a duplicate test.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 63 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…iew gaps Replace the managed MCP check in one atomic statement so an interrupted migration can retry. Refuse to adopt an identity another connection holds, write the Search receipt only for flows that read it, keep expired accounts labeled as such, and refresh Search's account list on disconnect.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 63 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
An address in a non-JSON identity response now needs a label naming it as the signed-in account, so an unrelated address is never stored as the identity, and markdown, punctuation, and punycode domains no longer distort it.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 63 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…migration Combine the account migrations into one. Reuse a disconnected connection's id, let a lone account reconnect when its identity tool fails, keep Find on the first connected account, and refresh an expired account added again. Group People list MCP summaries, tell same-email accounts apart, and version MCP attempts so an old instance can't overwrite tokens during a deploy.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 63 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 65 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…le-accounts-per-provider # Conflicts: # apps/sim/lib/assistant-actions/tool-permissions.integration.ts
Summary
0453: credentials are now unique per provider subject and tenant, for both OAuth and managed MCP. It builds the new indexes concurrently, then drops the old ones. Nothing used the old indexes as conflict targets, and the new ones are supersets, so the build can't fail on existing dataManaged MCP
notion-get-self,get_account_info(Granola),fireflies_get_user,whoami(Coda),get_user_details(HubSpot). Connections are now named for the accountresolveAccountWrite, so add, reconnect, and limit rules can't driftExisting users
Rollout
credential_addedfires for each added account, so subscribed workflows run for itType of Change
Testing
multiple-provider-accounts.integration.tson real Postgres: add, duplicate, per-provider limit, concurrent completion, reconnect pinning, disconnect then switch or restore, invitation links, Slack sender resolution, and the same for managed MCP including pre-existing connections. Ran on both the push and the SQL migration provisioning pathsgithub-installations.integration.ts,github-installations.test.ts, andtool-permissions.integration.ts(an approval stays on the disconnected account when a different one is added); newmember-integrations.test.tsandmcp-account-identity.test.ts. Saw the new behavior tests fail before the fixcheck:migrations,check:api-validation:strict,check:explicit-any,check:boundaries,check:client-boundary,check:comment-hygiene,check:utils,check:test-patterns,check:schema-mock,check:source-conventions,check:file-namesorg-redesignbrowser check with two accounts, one needing reconnect, including screenshots and the account chooser on Add accountcheck:auditsand the full suite run in CI, not locallyChecklist
test-auditauthoring gate)