Skip to content

feat(integrations): make Slack publicly available - #4823

Merged
saddlepaddle merged 1 commit into
mainfrom
slack-public-availability
May 21, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
slack-public-availability

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented May 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

Removes the internal-only `slack-integration-access` PostHog flag that gated the Slack integration. Slack now appears in the web integrations list and desktop settings for all users, alongside Linear and GitHub.

Paid access is still governed by the subscription paywall — this only removes the internal-only visibility gate.

Changes

  • Web integrations page (`integrations/page.tsx`): render Slack unconditionally; dropped the `useFeatureFlagEnabled`/`useMemo` filter.
  • Web Slack route layout (`integrations/slack/layout.tsx`): deleted — its only purpose was the server-side flag gate (returned 404 without the flag). The parent `(dashboard-legacy)` layout already redirects unauthenticated users to `/sign-in`, so the file was redundant once the gate was removed.
  • Desktop IntegrationsSettings (`IntegrationsSettings.tsx`): Slack row now gates on `isItemVisible` only, same as Linear/GitHub.
  • Shared constants (`constants.ts`): removed the now-dead `SLACK_INTEGRATION_ACCESS` flag.

Notes

  • The API connect/callback routes and the tRPC `slackRouter` never checked this flag — only org membership — so no backend changes were needed.
  • `grep` confirms zero remaining references to the flag.

Verification

  • `bun run lint` — clean (exit 0)
  • `bun run typecheck` (web, desktop, shared) — passes (exit 0)

Open in Stage

Summary by cubic

Make the Slack integration publicly available by removing the internal-only slack-integration-access gate. Slack now appears in web integrations and desktop settings for all users; the subscription paywall still controls paid access.

  • Refactors
    • Web integrations: render Slack unconditionally; removed the flag check/filter.
    • Deleted apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx (server-side flag gate); parent layout already enforces auth.
    • Desktop settings: Slack row now gates on isItemVisible only, matching Linear/GitHub.
    • Shared constants: removed SLACK_INTEGRATION_ACCESS.

Written for commit 735d15c. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • New Features

    • Slack integration is now universally available to all users without restrictions.
  • Chores

    • Removed feature-flag gating logic for Slack integration across the application.

Review Change Stack

Remove the internal-only `slack-integration-access` PostHog flag that
gated the Slack integration. Slack now shows in the web integrations
list and desktop settings for all users, alongside Linear and GitHub.
Paid access is still governed by the subscription paywall.

- web integrations page: render Slack unconditionally
- web Slack route layout: deleted (its only job was the flag gate; the
  parent (dashboard-legacy) layout already enforces auth)
- desktop IntegrationsSettings: gate Slack on isItemVisible only
- shared constants: drop the now-dead SLACK_INTEGRATION_ACCESS flag
@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6c6bfb0c-f567-4809-88c4-3ea400dc0f56

📥 Commits

Reviewing files that changed from the base of the PR and between cf3330e and 735d15c.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx
  • apps/web/src/app/(dashboard-legacy)/integrations/page.tsx
  • apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx
  • packages/shared/src/constants.ts
💤 Files with no reviewable changes (2)
  • apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx
  • packages/shared/src/constants.ts

📝 Walkthrough

Walkthrough

This PR removes Slack feature flag gating across the codebase. The SLACK_INTEGRATION_ACCESS constant is removed from shared constants, and feature flag checks are removed from desktop and web integration components, allowing visibility to be controlled solely by component-level settings.

Changes

Remove Slack Feature Flag Gating

Layer / File(s) Summary
Feature flag constant removal
packages/shared/src/constants.ts
The SLACK_INTEGRATION_ACCESS entry is removed from the FEATURE_FLAGS exported constant.
Desktop integration settings Slack visibility
apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx
Import statements remove feature flag hooks, hasSlackAccess computation is deleted, and showSlack is updated to use only isItemVisible() without feature flag gating.
Web integration page feature flag removal
apps/web/src/app/(dashboard-legacy)/integrations/page.tsx
Feature flag imports and useMemo-based filtering logic are removed; the "Featured" section now maps over the full integrations array instead of a filtered visibleIntegrations list.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A flag once guarded Slack's gleaming door,
But now it fades—permission's core,
Visibility springs from settings true,
Feature flags bid their last adieu! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary change: removing an internal-only feature flag to make the Slack integration publicly available to all users.
Description check ✅ Passed The description comprehensively covers the changes with clear sections (What, Changes, Notes, Verification) but deviates from the template structure with custom sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slack-public-availability

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ghost

ghost commented May 21, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1 Remove Slack integration feature flag constant
2 Enable Slack integration on web dashboard
3 Enable Slack integration in desktop settings
Open in Stage

Chapters generated by Stage for commit 735d15c on May 21, 2026 10:32pm UTC.

@capy-ai

capy-ai Bot commented May 21, 2026

Copy link
Copy Markdown

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes the Slack integration publicly visible by removing the PostHog slack-integration-access feature flag gate that previously restricted it to internal users. Authentication and org-membership checks remain in place via the parent layout and tRPC procedures respectively.

  • Web integrations page (page.tsx): removes the useFeatureFlagEnabled/useMemo filter, rendering Slack alongside Linear and GitHub for all authenticated users.
  • Slack route layout (slack/layout.tsx): deleted — its only purpose was the server-side flag check; the parent (dashboard-legacy)/layout.tsx still enforces session authentication.
  • Desktop settings (IntegrationsSettings.tsx): Slack row now gates on isItemVisible only, matching the pattern used by Linear and GitHub.
  • Shared constants (constants.ts): SLACK_INTEGRATION_ACCESS entry removed with zero remaining references confirmed.

Confidence Score: 4/5

Safe to merge — the change is well-scoped, correctly removes the visibility gate, and leaves authentication and org-membership checks intact.

The flag removal is clean with no remaining references. The deleted layout's auth check was genuinely redundant. The only nit is the now-unnecessary "use client" directive left on the integrations page after the hooks were removed.

apps/web/src/app/(dashboard-legacy)/integrations/page.tsx has an orphaned "use client" directive worth cleaning up.

Important Files Changed

Filename Overview
apps/web/src/app/(dashboard-legacy)/integrations/page.tsx Drops the useFeatureFlagEnabled/useMemo filter so all integrations render unconditionally; "use client" directive is now unused overhead since no hooks remain.
apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx Deleted — this file's only job was the server-side PostHog flag gate; authentication is still enforced by the parent (dashboard-legacy)/layout.tsx.
apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx Removes hasSlackAccess guard; Slack row now gates on isItemVisible only, consistent with Linear and GitHub rows.
packages/shared/src/constants.ts Removes the SLACK_INTEGRATION_ACCESS feature flag constant; clean removal with no remaining references confirmed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User visits /integrations] --> B["(dashboard-legacy)/layout.tsx\nChecks session → redirect to /sign-in if none"]
    B --> C[IntegrationsPage\nRenders all integrations unconditionally\n✅ Slack now always visible]

    C --> D[User clicks Slack card]
    D --> E["/integrations/slack\n(no layout.tsx gate)"]
    E --> F[SlackIntegrationPage\nChecks org membership via tRPC]
    F -->|No org| G[Show 'join org' message]
    F -->|Has org| H[Render ConnectionControls]
    H --> I[Connect → API OAuth flow\nStill checks org membership]

    style E fill:#f0f4ff,stroke:#5E6AD2
    style C fill:#e6ffe6,stroke:#238636
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/web/src/app/(dashboard-legacy)/integrations/page.tsx:1-3
After removing `useFeatureFlagEnabled` and `useMemo`, this component uses no React hooks and no browser-only APIs. The `"use client"` directive now forces the entire page (including the static `integrations` constant with JSX icon nodes) to be included in the client bundle unnecessarily. Dropping it lets Next.js render the page on the server, reducing JS sent to the browser. `IntegrationCard` already carries its own `"use client"` boundary, so mouse-hover interactivity is unaffected.

```suggestion
import { FaGithub, FaSlack } from "react-icons/fa";
```

Reviews (1): Last reviewed commit: "feat(integrations): make Slack publicly ..." | Re-trigger Greptile

Comment on lines 1 to 3
"use client";

import { FEATURE_FLAGS } from "@superset/shared/constants";
import { useFeatureFlagEnabled } from "posthog-js/react";
import { useMemo } from "react";
import { FaGithub, FaSlack } from "react-icons/fa";

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.

P2 After removing useFeatureFlagEnabled and useMemo, this component uses no React hooks and no browser-only APIs. The "use client" directive now forces the entire page (including the static integrations constant with JSX icon nodes) to be included in the client bundle unnecessarily. Dropping it lets Next.js render the page on the server, reducing JS sent to the browser. IntegrationCard already carries its own "use client" boundary, so mouse-hover interactivity is unaffected.

Suggested change
"use client";
import { FEATURE_FLAGS } from "@superset/shared/constants";
import { useFeatureFlagEnabled } from "posthog-js/react";
import { useMemo } from "react";
import { FaGithub, FaSlack } from "react-icons/fa";
import { FaGithub, FaSlack } from "react-icons/fa";
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/app/(dashboard-legacy)/integrations/page.tsx
Line: 1-3

Comment:
After removing `useFeatureFlagEnabled` and `useMemo`, this component uses no React hooks and no browser-only APIs. The `"use client"` directive now forces the entire page (including the static `integrations` constant with JSX icon nodes) to be included in the client bundle unnecessarily. Dropping it lets Next.js render the page on the server, reducing JS sent to the browser. `IntegrationCard` already carries its own `"use client"` boundary, so mouse-hover interactivity is unaffected.

```suggestion
import { FaGithub, FaSlack } from "react-icons/fa";
```

How can I resolve this? If you propose a fix, please make it concise.

@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

Re-trigger cubic

@github-actions

github-actions Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit 4db4c8e into main May 21, 2026
17 checks passed
MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request May 25, 2026
Remove the internal-only `slack-integration-access` PostHog flag that
gated the Slack integration. Slack now shows in the web integrations
list and desktop settings for all users, alongside Linear and GitHub.
Paid access is still governed by the subscription paywall.

- web integrations page: render Slack unconditionally
- web Slack route layout: deleted (its only job was the flag gate; the
  parent (dashboard-legacy) layout already enforces auth)
- desktop IntegrationsSettings: gate Slack on isItemVisible only
- shared constants: drop the now-dead SLACK_INTEGRATION_ACCESS flag

This branch was previously deployed

1 inactive deployment
preview — 735d15c0 Deployed May 21, 2026 by saddlepaddle via Deploy Admin #5681
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