Skip to content

feat(admin): enterprise support channels and honor SSO enforce - #3229

Open
riderx wants to merge 6 commits into
mainfrom
fix/sso-enforce-and-enterprise-channel
Open

feat(admin): enterprise support channels and honor SSO enforce#3229
riderx wants to merge 6 commits into
mainfrom
fix/sso-enforce-and-enterprise-channel

Conversation

@riderx

@riderx riderx commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary (AI generated)

  • Login only hides password when SSO is enforced. Optional SSO still shows password login plus Continue with SSO.
  • Capgo admins can set an org Slack, Discord, or Teams HTTPS channel link. Members can open it in organization settings; they cannot edit it.
  • Admin organizations page adds three charts: enterprise count vs SSO, enterprise count vs support channels, and feature adoption %.

Motivation (AI generated)

Active SSO with enforce_sso = false still forced SSO on login, so a broken SAML IdP could lock a team out. Enterprise ops also needed a dedicated support channel per org and a way to see SSO and channel adoption over time.

Business Impact (AI generated)

Stops avoidable enterprise lockouts when SSO is configured but not required. Makes it obvious which paid Enterprise orgs have SSO and a dedicated support channel, so Capgo can drive adoption of those features.

Test Plan (AI generated)

  • Playwright SSO login: optional SSO keeps password + Log in; enforced SSO hides password
  • tests/admin-org-support-channel.test.ts: 401, not_admin, admin set/clear, client write blocked, adoption trend
  • tests/admin-stats.unit.test.ts accepts enterprise_adoption
  • Admin organizations: charts show enterprise, SSO, and channel series; set/clear a channel
  • Org settings: members see Open channel when a link is set, and cannot change it
  • Login: domain with has_sso and enforce_sso: false can still sign in with password

Screenshots (AI generated)

Optional SSO still allows password login:

Optional SSO login

Enforced SSO hides password login:

Enforced SSO login

Admin enterprise charts (SSO, support channel, adoption):

Admin enterprise charts

Org settings show the Capgo-managed support channel:

Org support channel

Generated with AI

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

riderx and others added 2 commits August 28, 2026 16:37
Optional SSO hid password login and locked teams out. Admin-set
Slack/Discord/Teams links plus adoption charts stay off the
member write path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

On-demand reviews are free for the next 23 days. After that, they cost $0.25 per reviewed file.

Or wait 46 minutes for your next included review.

View limit details

Limit details: You’ve used the included review currently available. Your 65 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 42fc87a0-acc2-413b-bdc0-d228b1c265fd

📥 Commits

Reviewing files that changed from the base of the PR and between 3346033 and 2fd6c08.

📒 Files selected for processing (25)
  • cloudflare_workers/api/index.ts
  • messages/en.context.json
  • messages/en.json
  • playwright/e2e/sso-login.spec.ts
  • pr-preview/admin-enterprise-orgs.webp
  • pr-preview/login-sso-enforced.webp
  • pr-preview/login-sso-optional.webp
  • pr-preview/org-support-channel.webp
  • read_replicate/schema_replicate.catalog.json
  • read_replicate/schema_replicate.sql
  • src/pages/admin/dashboard/organizations.vue
  • src/pages/login.vue
  • src/pages/settings/organization/index.vue
  • src/stores/adminDashboard.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/private/admin_org_support_channel.ts
  • supabase/functions/_backend/private/admin_stats.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/platform_admin_access.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/functions/private/index.ts
  • supabase/migrations/20260828122104_org_support_channel.sql
  • tests/admin-org-support-channel.test.ts
  • tests/admin-stats.unit.test.ts
  • tests/organization-put-stripe-sync.unit.test.ts

Comment @coderabbitai help to get the list of available commands.

@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 11.07%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 42 untouched benchmarks
⏩ 2 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
sha256 checksum for medium bundle payload 1.3 ms 1.5 ms -11.07%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/sso-enforce-and-enterprise-channel (2fd6c08) with main (3346033)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Visual diff passed

Visual changes

Generated at 2026-08-28T14:17:24.735Z. Threshold: 0.1% pixel difference.

Route Diff % Status
login 0.000 unchanged
dashboard 37.926 changed
account-settings 0.000 unchanged
organization-credits 0.000 unchanged
apps 0.384 changed
apps-sidebar-collapsed 0.495 changed
app-overview 3.927 changed
app-dashboard-native 0.077 unchanged
app-dashboard-installs 1.416 changed
app-dashboard-active-bundle 0.492 changed
app-getting-started 0.000 unchanged
app-settings 0.000 unchanged
app-settings-access 2.381 changed
org-settings 0.000 unchanged
org-settings-team 0.000 unchanged
org-settings-billing 0.000 unchanged
channels 0.738 changed
devices 0.036 unchanged
observe 0.113 changed
observe-logs 0.000 unchanged
observe-native 0.000 unchanged
observe-compatibility 0.000 unchanged
observe-plugins 0.000 unchanged
channel-statistics 0.127 changed
api-keys-app-preview 0.000 unchanged

Commit: 2fd6c08ff85a985572f20b3d4fd038779cb01355
Download the HTML report from workflow artifacts (artifact: visual-diff-report-2fd6c08ff85a985572f20b3d4fd038779cb01355).

Open index.html from the artifact for side-by-side before/after/diff screenshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx deployed to deepsec-pr August 28, 2026 13:48 — with GitHub Actions Active
Sonar duplication on the three ChartCard blocks blocked the quality gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx deployed to deepsec-pr August 28, 2026 13:59 — with GitHub Actions Active
Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx deployed to deepsec-pr August 28, 2026 14:01 — with GitHub Actions Active
Sonar duplicated verifyAdmin against admin_credits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx deployed to deepsec-pr August 28, 2026 14:09 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@riderx
riderx marked this pull request as ready for review August 28, 2026 14:20
@riderx

riderx commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant