fix(knowledge): let Slack enter per-member access, and resolve its provider in one place - #7453
Merged
Merged
Conversation
…ovider in one place
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…findings # Conflicts: # .agents/skills/ship/SKILL.md # apps/docs/content/docs/cli/troubleshooting.mdx
Contributor
Greptile SummaryThis PR centralizes credential-group provider resolution and enables Slack’s per-member knowledge access configuration.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/credential-groups/providers.ts | Adds the shared nullable all-provider resolver and reuses it from the existing throwing lookup. |
| apps/sim/app/workspace/[workspaceId]/knowledge/[id]/hooks/use-connector-member-group-options.ts | Uses the shared resolver so Slack is recognized as supporting per-member access. |
| apps/sim/lib/knowledge/connectors/member-provisioning.ts | Replaces local exception conversion with the shared nullable provider lookup while retaining validation behavior. |
| apps/sim/app/workspace/[workspaceId]/knowledge/[id]/hooks/use-connector-member-group-options.test.ts | Adds registry-driven checks that permission-scoped connectors resolve to credential-group providers. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Permission-scoped connector] --> B[Shared provider resolver]
B -->|Provider found| C[Client enables per-member access]
B -->|Provider found| D[Server provisions or selects member binding]
B -->|No provider| E[Unsupported or validation response]
C --> F[Credential-group options]
D --> F
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/sta..." | Re-trigger Greptile
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slack could not be put into per-member access.
ConnectorAccessFieldrenders nothing whengroupOptions.supportedis false, and it was false for Slack — so the one connector that crawls per member had no way to be configured for it.The bug, and the drift underneath it
connectorMemberGroupProviderresolved throughgetCredentialGroupStandardOAuthProviderFromProviderId, which covers onlyCREDENTIAL_GROUP_STANDARD_OAUTH_PROVIDER_IDS. Slack is not in that set — it is collected through a custom bot app, so it is added separately toCREDENTIAL_GROUP_PROVIDER_IDS. The resolver threw, acatchturned that intonull, andsupportedwent false. Slack declarespermissionScopedListing, so this hid the feature from the connector that has it.The server never had the bug:
provisionKnowledgeConnectorMembersBindingalready resolved through the all-provider function. The two sides were answering "can this connector sync per member?" independently, and the client copy drifted — so fixing only the client would leave it free to drift again.Both now call one non-throwing
findCredentialGroupProviderFromProviderId, which is where the choice of which provider set counts is made. That also removes bothtry/catchblocks: each was converting a throw back into the ordinary "no provider" answer, and that is what made the client's failure silent — a renamed provider id would have degraded to the same blank field with no log.Type of Change
Testing
canConnectPersonallypredicate rather than a fresh copy of it.slackalone (1 failed / 30 passed) — checked both before and after the shared-resolver refactor.bun run check:audits(45),bunx turbo run type-check(26/26),bun run lint(26/26),bun run docs-manifest:check.Checklist