Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(slack): expose Pipedream OAuth connections in production (#8052)

teo1354e61e054c
diff --git a/apps/web/src/features/settings/connections/ConnectedView.tsx b/apps/web/src/features/settings/connections/ConnectedView.tsx
index 023ec44029..e247051a17 100644
--- a/apps/web/src/features/settings/connections/ConnectedView.tsx
+++ b/apps/web/src/features/settings/connections/ConnectedView.tsx
@@ -6,7 +6,7 @@ import { IntegrationRow, SettingsCard, SettingsSection } from '../primitives';
import { LeftoverRow } from './leftover-row';
import type { ConnectionsModel } from './model';
import { isConnectionsEmpty } from './model';
-import { availableStarters, providerIcon } from './provider-meta';
+import { EMPTY_STARTERS, providerIcon } from './provider-meta';
import { useConnectionsView } from './view-state';
export function ConnectedView(props: { model: ConnectionsModel }) {
@@ -86,7 +86,7 @@ function EmptyConnected() {
<>
<SettingsSection title="Start with a connection">
<SettingsCard>
- <For each={availableStarters()}>
+ <For each={EMPTY_STARTERS}>
{(item) => (
<button
type="button"
diff --git a/apps/web/src/features/settings/connections/ConnectionsPage.test.tsx b/apps/web/src/features/settings/connections/ConnectionsPage.test.tsx
index 7dbfcaf648..ae5878798b 100644
--- a/apps/web/src/features/settings/connections/ConnectionsPage.test.tsx
+++ b/apps/web/src/features/settings/connections/ConnectionsPage.test.tsx
@@ -161,7 +161,7 @@ describe('Slack channel import handoff', () => {
startImport();
await screen.findByRole('button', { name: 'Connecting Slack…' });
expect(mocks.connect).toHaveBeenCalledExactlyOnceWith({
- appSlug: 'slack',
+ appSlug: 'slack_v2',
serverName: 'Slack',
});
expect(mocks.discover).not.toHaveBeenCalled();
diff --git a/apps/web/src/features/settings/connections/DiscoverView.tsx b/apps/web/src/features/settings/connections/DiscoverView.tsx
index e812dd8ebe..6ce105f348 100644
--- a/apps/web/src/features/settings/connections/DiscoverView.tsx
+++ b/apps/web/src/features/settings/connections/DiscoverView.tsx
@@ -17,7 +17,7 @@ import { IntegrationRow, SettingsCard, SettingsSection } from '../primitives';
import { AddCustomMcpDialog } from './add-custom-mcp-dialog';
import type { ConnectionsModel } from './model';
import {
- availableStarters,
+ EMPTY_STARTERS,
PIPEDREAM_BROWSE_HIDDEN_SLUGS,
providerIcon,
} from './provider-meta';
@@ -42,7 +42,7 @@ export function DiscoverView(props: { model: ConnectionsModel }) {
const featured = createMemo(() => {
const query = catalog.searchInput().trim().toLowerCase();
- return availableStarters().filter((item) => {
+ return EMPTY_STARTERS.filter((item) => {
const haystack = `${item.name} ${item.note}`.toLowerCase();
return !query || haystack.includes(query);
});
diff --git a/apps/web/src/features/settings/connections/provider-meta.tsx b/apps/web/src/features/settings/connections/provider-meta.tsx
index 5f17003d0a..fe6a0c5144 100644
--- a/apps/web/src/features/settings/connections/provider-meta.tsx
+++ b/apps/web/src/features/settings/connections/provider-meta.tsx
@@ -1,4 +1,3 @@
-import { pipedreamAppAvailableInEnv } from '@core/component/AI/constant/mcpServers';
import { SLACK_PIPEDREAM_SLUGS } from '@core/pipedream/slugs';
import GithubIcon from '@icon/mcp-github.svg';
import LinearIcon from '@icon/mcp-linear.svg';
@@ -43,9 +42,6 @@ export const PIPEDREAM_BROWSE_HIDDEN_SLUGS: ReadonlySet<string> = new Set([
'cursor',
]);
-export const availableStarters = () =>
- EMPTY_STARTERS.filter((item) => pipedreamAppAvailableInEnv(item.id));
-
export function isPipedreamBrowseHidden(appSlug: string): boolean {
return PIPEDREAM_BROWSE_HIDDEN_SLUGS.has(appSlug);
}
diff --git a/apps/web/src/features/slack-import/slack-import.test.tsx b/apps/web/src/features/slack-import/slack-import.test.tsx
index 2dfe4a09a3..d1272ff17d 100644
--- a/apps/web/src/features/slack-import/slack-import.test.tsx
+++ b/apps/web/src/features/slack-import/slack-import.test.tsx
@@ -105,7 +105,7 @@ describe('Slack import production boundary', () => {
await screen.findByText('Mounted import');
host.props!.onConnect!();
expect(host.requestConnect).toHaveBeenCalledWith(
- 'slack',
+ 'slack_v2',
'import-slack-channels'
);
expect(host.openSettings).toHaveBeenCalledWith('Connections');
diff --git a/apps/web/src/lib/core/component/AI/constant/mcpServers.ts b/apps/web/src/lib/core/component/AI/constant/mcpServers.ts
index fb565ef70c..610e3aa039 100644
--- a/apps/web/src/lib/core/component/AI/constant/mcpServers.ts
+++ b/apps/web/src/lib/core/component/AI/constant/mcpServers.ts
@@ -1,6 +1,5 @@
import { DEV_MODE_ENV } from '@core/constant/featureFlags';
import {
- isSlackPipedreamSlug,
SLACK_CONNECT_SLUG,
SLACK_PIPEDREAM_SLUGS,
} from '@core/pipedream/slugs';
@@ -105,15 +104,6 @@ export const PIPEDREAM_ICON_MAP: Map<string, SvgIcon> = new Map([
]),
]);
-/**
- * Whether a Pipedream catalog app should be offered in this environment.
- * Mirrors the gating in {@link QUICK_CONNECT_SERVERS} (Slack is dev-only).
- */
-export function pipedreamAppAvailableInEnv(appSlug: string): boolean {
- if (DEV_MODE_ENV) return true;
- return !isSlackPipedreamSlug(appSlug);
-}
-
const SERVER_NAME_ICON_MAP: Map<string, SvgIcon> = new Map(
QUICK_CONNECT_SERVERS.map((s) => [s.server_name.toLowerCase(), s.icon])
);
diff --git a/apps/web/src/lib/core/pipedream/catalog.ts b/apps/web/src/lib/core/pipedream/catalog.ts
index e2b3c2d335..bc39eabc10 100644
--- a/apps/web/src/lib/core/pipedream/catalog.ts
+++ b/apps/web/src/lib/core/pipedream/catalog.ts
@@ -1,4 +1,3 @@
-import { pipedreamAppAvailableInEnv } from '@core/component/AI/constant/mcpServers';
import { toast } from '@core/component/Toast/Toast';
import { queryReadyGate } from '@queries/gate';
import {
@@ -42,11 +41,7 @@ export function createPipedreamCatalogSearch(
if (!queryReadyGate(query)) return [];
return (query.data?.pages ?? [])
.flatMap((page) => page.servers)
- .filter(
- (entry) =>
- pipedreamAppAvailableInEnv(entry.app_slug) &&
- !exclude().has(entry.app_slug)
- );
+ .filter((entry) => !exclude().has(entry.app_slug));
};
return { searchInput, onSearchInput, search, query, entries };
diff --git a/apps/web/src/lib/core/pipedream/slugs.test.ts b/apps/web/src/lib/core/pipedream/slugs.test.ts
index 9a44e8d48c..4999cf97c6 100644
--- a/apps/web/src/lib/core/pipedream/slugs.test.ts
+++ b/apps/web/src/lib/core/pipedream/slugs.test.ts
@@ -9,9 +9,9 @@ import {
} from './slugs';
describe('Pipedream slugs', () => {
- it('keeps the documented fallback connect slug first', () => {
+ it('uses the OAuth connector for new connections and preserves alias priority', () => {
expect(SLACK_PIPEDREAM_SLUGS).toEqual(['slack', 'slack_v2']);
- expect(SLACK_CONNECT_SLUG).toBe(SLACK_PIPEDREAM_SLUGS[0]);
+ expect(SLACK_CONNECT_SLUG).toBe('slack_v2');
});
it.each(SLACK_PIPEDREAM_SLUGS)('recognizes %s as Slack', (slug) => {
diff --git a/apps/web/src/lib/core/pipedream/slugs.ts b/apps/web/src/lib/core/pipedream/slugs.ts
index bf2089b363..a78f16984a 100644
--- a/apps/web/src/lib/core/pipedream/slugs.ts
+++ b/apps/web/src/lib/core/pipedream/slugs.ts
@@ -1,6 +1,7 @@
-// Keep the connect slug first, per docs/SLACK_LIVE_CHANNEL_IMPORT.md.
+// Match the backend's selection order for existing Slack connections.
export const SLACK_PIPEDREAM_SLUGS = ['slack', 'slack_v2'] as const;
-export const SLACK_CONNECT_SLUG = SLACK_PIPEDREAM_SLUGS[0];
+// Pipedream's OAuth Slack connector; `slack` remains a legacy connection alias.
+export const SLACK_CONNECT_SLUG = 'slack_v2';
export function isSlackPipedreamSlug(slug: string): boolean {
return SLACK_PIPEDREAM_SLUGS.some((alias) => alias === slug);
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 52eab0112b..3d23d2011e 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -2619,7 +2619,9 @@ With `pipedream-mcp` enabled, Connections (in Agents or Settings) has `Connected
tabs. Connected groups GitHub, Linear, Notion, and Slack tool grants by provider,
lists other catalog connections alongside them, and puts custom MCP servers in
a separate section. Discover offers featured providers, a searchable catalog,
-and `Add custom MCP`. Slack discovery retains its development-only gate.
+and `Add custom MCP`. Pipedream Slack OAuth is available in production and
+development from the featured Slack provider. Connecting Slack here grants tool
+access; channel import is a separate action where the user chooses channels.
Provider Back returns to the tab that opened it; navigation is local to each
Connections page and starts at Connected on a fresh visit.
diff --git a/docs/SLACK_LIVE_CHANNEL_IMPORT.md b/docs/SLACK_LIVE_CHANNEL_IMPORT.md
index 47dd0844de..210ce3a323 100644
--- a/docs/SLACK_LIVE_CHANNEL_IMPORT.md
+++ b/docs/SLACK_LIVE_CHANNEL_IMPORT.md
@@ -21,7 +21,9 @@ Pipedream compatibility. Live verification remains a release prerequisite.
## Slug decision
-Canonical slug: `slack` (unverified fallback; retain until dev evidence supports `slack_v2`).
+New-connection slug: `slack_v2`, the OAuth app slug published in
+[Pipedream's Slack connector metadata](https://pipedream.com/apps/slack-v2).
+Existing connections retain the selection order `slack`, then `slack_v2`.
| Evidence | `slack` | `slack_v2` |
| --- | --- | --- |
@@ -30,11 +32,10 @@ Canonical slug: `slack` (unverified fallback; retain until dev evidence supports
| Hosted Connect UI account slug | Unknown | Unknown |
| Dev `pipedream_mcp_connections.app_slug` rows | Not queried | Not queried |
-Do not migrate existing rows or change the new-connection slug based on the
-synthetic tool names. Treat both slugs as potential Slack aliases. Switch the
-canonical slug to `slack_v2` only after verifying that it exists and that accounts
-created by hosted Connect use it. Account app slugs and action-name prefixes are
-separate facts; a `slack_v2-*` tool name alone is not that evidence.
+Do not migrate existing rows based on synthetic tool names. Both slugs remain
+recognized Slack connection aliases. The new-connection slug comes from
+Pipedream's published app metadata, not action-name prefixes. The authenticated
+API and hosted Connect observations in the table remain unverified.
## Tool contract: provisional, not observed
@@ -152,7 +153,7 @@ that production handling is implemented by this documentation-only task.
text, and other user content with synthetic values while preserving structure
and cross-fixture identity relationships. If arrays must be sampled to meet
the size budget, document sampling separately from upstream truncation.
- Update the evidence tables, exact tool schemas, and canonical-slug decision.
+ Update the evidence tables and exact tool schemas.
## Verified behaviour
@@ -245,8 +246,8 @@ gates, not successful observations:
Any connected team member may import; the importer owns the new channel.
- This is channel shape only: no messages, files, ongoing membership sync, or
invitation flow. The ZIP-archive feature's authorization and behavior remain
- separate. MCP compatibility and canonical new-connection slug remain
- provisional until the live checks above succeed.
+ separate. New connections use the slug in Pipedream's published metadata;
+ live MCP compatibility remains provisional until the checks above succeed.
## Fixture checks