Skip to content

fix(knowledge): let Slack enter per-member access, and resolve its provider in one place - #7453

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/cubic-release-findings
Sep 3, 2026
Merged

fix(knowledge): let Slack enter per-member access, and resolve its provider in one place#7453
waleedlatif1 merged 2 commits into
stagingfrom
fix/cubic-release-findings

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Slack could not be put into per-member access. ConnectorAccessField renders nothing when groupOptions.supported is 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

connectorMemberGroupProvider resolved through getCredentialGroupStandardOAuthProviderFromProviderId, which covers only CREDENTIAL_GROUP_STANDARD_OAUTH_PROVIDER_IDS. Slack is not in that set — it is collected through a custom bot app, so it is added separately to CREDENTIAL_GROUP_PROVIDER_IDS. The resolver threw, a catch turned that into null, and supported went false. Slack declares permissionScopedListing, so this hid the feature from the connector that has it.

The server never had the bug: provisionKnowledgeConnectorMembersBinding already 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 both try/catch blocks: 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

  • Bug fix

Testing

  • New registry-driven test asserting every permission-scoped connector resolves to a credential-group provider, driven by the existing canConnectPersonally predicate rather than a fresh copy of it.
  • Verified the test fails without the fix, on slack alone (1 failed / 30 passed) — checked both before and after the shared-resolver refactor.
  • Full suite, bun run check:audits (45), bunx turbo run type-check (26/26), bun run lint (26/26), bun run docs-manifest:check.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 3, 2026 9:15pm UTC

Request Review

…findings

# Conflicts:
#	.agents/skills/ship/SKILL.md
#	apps/docs/content/docs/cli/troubleshooting.mdx
@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR centralizes credential-group provider resolution and enables Slack’s per-member knowledge access configuration.

  • Adds a nullable resolver covering standard OAuth and custom Slack providers.
  • Aligns client support detection with server-side member provisioning.
  • Adds registry-driven coverage for permission-scoped connectors.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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
Loading

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/sta..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 2276031 into staging Sep 3, 2026
31 of 32 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/cubic-release-findings branch September 3, 2026 21:33
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.

1 participant