From 735d15c04b966fde912fcdda88962d8feab98311 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Thu, 21 May 2026 15:32:14 -0700 Subject: [PATCH] feat(integrations): make Slack publicly available 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 --- .../IntegrationsSettings.tsx | 13 ++----- .../(dashboard-legacy)/integrations/page.tsx | 18 +-------- .../integrations/slack/layout.tsx | 38 ------------------- packages/shared/src/constants.ts | 2 - 4 files changed, 5 insertions(+), 66 deletions(-) delete mode 100644 apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx diff --git a/apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx b/apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx index 2a9b8f2f7a6..ab80ae94c1c 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx @@ -1,8 +1,6 @@ -import { FEATURE_FLAGS } from "@superset/shared/constants"; import { Button } from "@superset/ui/button"; import { Skeleton } from "@superset/ui/skeleton"; import { useLiveQuery } from "@tanstack/react-db"; -import { useFeatureFlagEnabled } from "posthog-js/react"; import { useCallback, useEffect, useState } from "react"; import { FaGithub, FaSlack } from "react-icons/fa"; import { HiOutlineArrowTopRightOnSquare } from "react-icons/hi2"; @@ -51,10 +49,6 @@ export function IntegrationsSettings({ useState(null); const [isLoadingGithub, setIsLoadingGithub] = useState(true); - const hasSlackAccess = useFeatureFlagEnabled( - FEATURE_FLAGS.SLACK_INTEGRATION_ACCESS, - ); - const showLinear = isItemVisible( SETTING_ITEM_ID.INTEGRATIONS_LINEAR, visibleItems, @@ -93,9 +87,10 @@ export function IntegrationsSettings({ const isSlackConnected = !!slackConnection; const isGithubConnected = !!githubInstallation && !githubInstallation.suspended; - const showSlack = - hasSlackAccess && - isItemVisible(SETTING_ITEM_ID.INTEGRATIONS_SLACK, visibleItems); + const showSlack = isItemVisible( + SETTING_ITEM_ID.INTEGRATIONS_SLACK, + visibleItems, + ); const handleOpenWeb = (path: string) => { window.open(`${env.NEXT_PUBLIC_WEB_URL}${path}`, "_blank"); diff --git a/apps/web/src/app/(dashboard-legacy)/integrations/page.tsx b/apps/web/src/app/(dashboard-legacy)/integrations/page.tsx index 981e7b0a1f4..c4971b34c1b 100644 --- a/apps/web/src/app/(dashboard-legacy)/integrations/page.tsx +++ b/apps/web/src/app/(dashboard-legacy)/integrations/page.tsx @@ -1,8 +1,5 @@ "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 { SiLinear } from "react-icons/si"; import { @@ -38,19 +35,6 @@ const integrations: IntegrationCardProps[] = [ ]; export default function IntegrationsPage() { - const hasSlackAccess = useFeatureFlagEnabled( - FEATURE_FLAGS.SLACK_INTEGRATION_ACCESS, - ); - - const visibleIntegrations = useMemo( - () => - integrations.filter((i) => { - if (i.id === "slack") return hasSlackAccess; - return true; - }), - [hasSlackAccess], - ); - return (
@@ -60,7 +44,7 @@ export default function IntegrationsPage() {

- {visibleIntegrations.map((integration) => ( + {integrations.map((integration) => ( ))}
diff --git a/apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx b/apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx deleted file mode 100644 index 5e4c9895856..00000000000 --- a/apps/web/src/app/(dashboard-legacy)/integrations/slack/layout.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { auth } from "@superset/auth/server"; -import { FEATURE_FLAGS } from "@superset/shared/constants"; -import { headers } from "next/headers"; -import { notFound } from "next/navigation"; -import { PostHog } from "posthog-node"; - -import { env } from "@/env"; - -const posthog = new PostHog(env.NEXT_PUBLIC_POSTHOG_KEY, { - host: env.NEXT_PUBLIC_POSTHOG_HOST, - flushAt: 1, - flushInterval: 0, -}); - -export default async function SlackIntegrationLayout({ - children, -}: { - children: React.ReactNode; -}) { - const session = await auth.api.getSession({ - headers: await headers(), - }); - - if (!session?.user) { - notFound(); - } - - const hasAccess = await posthog.getFeatureFlag( - FEATURE_FLAGS.SLACK_INTEGRATION_ACCESS, - session.user.id, - ); - - if (!hasAccess) { - notFound(); - } - - return <>{children}; -} diff --git a/packages/shared/src/constants.ts b/packages/shared/src/constants.ts index 3ff8af57234..1bcd4c27b6d 100644 --- a/packages/shared/src/constants.ts +++ b/packages/shared/src/constants.ts @@ -73,8 +73,6 @@ export const FEATURE_FLAGS = { WEB_AGENTS_UI_ACCESS: "web-agents-ui-access", /** Gates access to GitHub integration (currently buggy, internal only). */ GITHUB_INTEGRATION_ACCESS: "github-integration-access", - /** Gates access to Slack integration (internal only). */ - SLACK_INTEGRATION_ACCESS: "slack-integration-access", /** Gates access to Cloud features (environment variables, sandboxes). */ CLOUD_ACCESS: "cloud-access", /** When enabled, blocks remote agent execution on the desktop (e.g., for enterprise orgs). */