Skip to content

feat(credential-groups): complete managed account enrollment - #6729

Merged
TheodoreSpeaks merged 12 commits into
stagingfrom
fix/credential-group-reconnect-label
Aug 15, 2026
Merged

feat(credential-groups): complete managed account enrollment#6729
TheodoreSpeaks merged 12 commits into
stagingfrom
fix/credential-group-reconnect-label

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • complete optional public account enrollment with reconnect and completion flows
  • add managed Slack user authorization to custom bot setup
  • simplify Credential Group navigation, People rows, and credential cleanup

Type of Change

  • Bug fix
  • New feature

Testing

  • 16 focused Vitest tests passing
  • bun run lint
  • bun run lint:check
  • bun run type-check
  • bun run check:audits

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 Aug 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 15, 2026 8:42am

Request Review

@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes touch public enrollment completion, enrollment deletion with credential cascade, and Slack OAuth manifest URLs—important for auth and data lifecycle, though behavior is covered by updated tests.

Overview
Public enrollment no longer requires every account to be connected before submit. Completing posts to the same API but redirects to a new Accounts connected page (/credential-groups/complete) instead of the invite URL with submitted or incomplete query flags. The enroll UI always shows Submit, drops the post-submit success toast, and labels OAuth links Reconnect when an account is already linked.

Workspace People management replaces Revoke with Delete: the enrollment row is removed (managed credentials cascade) rather than marked revoked. Status chips on people rows are removed; group settings listing hides revoked enrollments and uses a safer encoded pagination cursor.

Configuration treats credential options as optional by default (including Slack managed-user setup). The Slack custom-bot modal adds a Managed user authorization capability that wires Credential Group OAuth redirect URLs into the app manifest.

Workflow canvas resolves dynamic dropdown IDs (e.g. credential group names) via useDynamicSubBlockOptionDisplayName, and the Credential Groups block gets purple identity styling in tags and icons. Settings navigation reorders the credential-groups section.

Reviewed by Cursor Bugbot for commit c3f455a. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR completes optional managed-account enrollment, adds Slack managed-user authorization, simplifies Credential Group membership management, and improves dynamic block-option labels. The pagination repair now survives deletion of its boundary row, but its replacement cursor can silently paginate from an unrelated or fabricated boundary.

  • Adds optional enrollment completion and reconnect flows.
  • Adds managed Slack user authorization to custom bot manifests.
  • Replaces enrollment revocation with deletion and credential cleanup.
  • Introduces self-contained keyset cursors and dynamic workflow-block label hydration.

Confidence Score: 4/5

The PR is not yet safe to merge because credential-group pagination can silently omit valid people when given a foreign or modified cursor.

The new self-contained cursor is used directly as a keyset boundary without establishing that it belongs to the current workspace, credential group, and stable filter identity, allowing successful responses that begin at an unrelated position.

Files Needing Attention: apps/sim/lib/credential-groups/enrollments.ts

Important Files Changed

Filename Overview
apps/sim/lib/credential-groups/enrollments.ts Adds deletion, optional completion, and self-contained pagination cursors; cursor boundaries are not validated against the requested result set.
apps/sim/lib/credential-groups/application/manage-groups.ts Filters settings enrollment pages to active, non-deleted lifecycle statuses.
apps/sim/app/credential-groups/enroll/[token]/page.tsx Allows optional account submission and labels existing connections as reconnect actions.
apps/sim/lib/credential-groups/slack-managed-users.ts Implements the managed Slack user authorization integration.
apps/sim/hooks/queries/dynamic-subblock-options.ts Resolves and caches display labels for persisted dynamic dropdown option IDs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Invite[Credential Group invitation] --> Enroll[Recipient enrollment]
  Enroll --> OAuth[Optional account connections]
  OAuth --> Complete[Complete enrollment]
  Complete --> Done[Completion page]
  Admin[Workspace administrator] --> People[People list]
  People --> Cursor[Self-contained pagination cursor]
  People --> Delete[Delete enrollment]
  Delete --> Cleanup[Managed credentials removed]
Loading

Reviews (4): Last reviewed commit: "fix(credential-groups): hydrate canvas l..." | Re-trigger Greptile

Comment thread apps/sim/lib/credential-groups/application/manage-groups.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 51afa70. Configure here.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a18cbf3. Configure here.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks
TheodoreSpeaks merged commit b198080 into staging Aug 15, 2026
23 of 24 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the fix/credential-group-reconnect-label branch August 15, 2026 08:37
Comment thread apps/sim/lib/credential-groups/enrollments.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c3f455a. Configure here.

Comment thread apps/sim/blocks/blocks/credential-group.ts
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