Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
revert(onboarding): remove connector catalog step (#5949)
Eric Hayes692ae7a611a2
diff --git a/apps/web/src/features/setup/flow/ConnectorCatalogStep.tsx b/apps/web/src/features/setup/flow/ConnectorCatalogStep.tsxdeleted file mode 100644index d86ab610b3..0000000000--- a/apps/web/src/features/setup/flow/ConnectorCatalogStep.tsx+++ /dev/null@@ -1,216 +0,0 @@-import { useAnalytics } from '@app/lib/analytics/analytics-context';-import { PipedreamConnectorIcon } from '@core/pipedream/ConnectorIcon';-import {- createPipedreamCatalogConnect,- createPipedreamCatalogSearch,-} from '@core/pipedream/catalog';-import ArrowUpRightIcon from '@phosphor/arrow-up-right.svg';-import SpinnerIcon from '@phosphor/spinner-gap.svg';-import { usePipedreamConnectionsQuery } from '@queries/pipedream-connectors';-import type { PipedreamCatalogEntryResponse } from '@service-cognition/client';-import { Button, cn, Layer } from '@ui';-import { createMemo, For, Show } from 'solid-js';-import { StatusDot } from '../../settings/integration-ui';-import { ContinueButton, SkipButton } from './shared';--/** One connectable app: click to run Pipedream's hosted Connect UI. */-function CatalogRow(props: {- entry: PipedreamCatalogEntryResponse;- onConnected: (entry: PipedreamCatalogEntryResponse) => void;-}) {- const { connect, busy } = createPipedreamCatalogConnect({- entry: () => props.entry,- onConnected: (entry) => props.onConnected(entry),- });-- return (- <Layer depth={2}>- <button- type="button"- title={props.entry.description ?? props.entry.display_name}- onClick={() => void connect()}- class={cn(- 'group flex h-11 w-full items-center gap-2.5 rounded-xl border border-ink/[0.05] bg-surface px-3.5 text-sm',- 'cursor-default outline-none hover:border-ink/10 focus-visible:ring-1 focus-visible:ring-accent/50'- )}- >- <span class="flex size-4 shrink-0 items-center justify-center [&_svg]:size-4">- <PipedreamConnectorIcon- appSlug={props.entry.app_slug}- iconUrl={props.entry.icon_url}- class="size-4"- />- </span>- <span class="min-w-0 truncate font-medium text-ink">- {props.entry.display_name}- </span>- <span class="ml-auto shrink-0">- <Show- when={busy()}- fallback={- <span class="flex items-center gap-1 text-xs font-medium text-ink-muted group-hover:text-ink">- Connect- <ArrowUpRightIcon class="size-3 shrink-0" />- </span>- }- >- <span class="flex items-center gap-1.5 text-xs text-ink-muted">- <SpinnerIcon class="size-3 shrink-0 animate-spin" />- Connecting…- </span>- </Show>- </span>- </button>- </Layer>- );-}--/** An app connected on this step — the list's feedback that it landed. */-function ConnectedRow(props: { appSlug: string; name: string }) {- return (- <Layer depth={2}>- <div class="flex h-11 w-full items-center gap-2.5 rounded-xl border border-ink/[0.05] bg-surface px-3.5 text-sm">- <span class="flex size-4 shrink-0 items-center justify-center [&_svg]:size-4">- <PipedreamConnectorIcon appSlug={props.appSlug} class="size-4" />- </span>- <span class="min-w-0 truncate font-medium text-ink">{props.name}</span>- <span class="ml-auto flex shrink-0 items-center gap-1.5 text-xs text-ink-muted">- <StatusDot state="connected" />- Connected- </span>- </div>- </Layer>- );-}--/**- * The catch-all connector step: everything Pipedream can connect, searchable- * and ranked by popularity, for the tools that don't get a dedicated step.- * Only reachable on the Pipedream stack — the native stack has no catalog to- * browse, just the fixed presets the earlier steps already offered.- */-export function ConnectorCatalogStep(props: {- /** Slugs handled by their own step, left out to avoid re-offering them. */- curatedSlugs: readonly string[];- onContinue: () => void;- onSkip: () => void;-}) {- const analytics = useAnalytics();- // Poll: connecting finishes inside the Connect UI iframe, so nothing else- // would flip these rows.- const connectionsQuery = usePipedreamConnectionsQuery({- refetchInterval: 4_000,- neverSuspend: true,- });-- const curated = createMemo(() => new Set(props.curatedSlugs));- /** Connected here, i.e. everything outside the curated steps' remit. */- const connected = createMemo(() =>- (connectionsQuery.data ?? []).filter(- (connection) => !curated().has(connection.app_slug)- )- );- const exclude = createMemo(- () =>- new Set([- ...curated(),- ...(connectionsQuery.data ?? []).map((c) => c.app_slug),- ])- );-- const catalog = createPipedreamCatalogSearch(exclude);- const query = catalog.query;-- const onConnected = (entry: PipedreamCatalogEntryResponse) => {- analytics.track('onboarding_v4_connector_connected', {- connector: entry.app_slug,- });- void connectionsQuery.refetch();- };-- return (- <div class="flex flex-col gap-3">- <Show when={connected().length > 0}>- <div class="flex flex-col gap-2">- <For each={connected()}>- {(connection) => (- <ConnectedRow- appSlug={connection.app_slug}- name={connection.server_name}- />- )}- </For>- </div>- </Show>-- <input- type="search"- placeholder="Search 2,000+ tools…"- value={catalog.searchInput()}- onInput={(e) => catalog.onSearchInput(e.currentTarget.value)}- class="w-full rounded-lg border border-edge bg-surface px-4 py-3 text-sm text-ink transition-colors placeholder:text-ink-placeholder focus:border-accent focus:outline-none"- />-- <Show- when={!query.isError}- fallback={- <div class="flex flex-col items-center gap-2 py-6 text-center text-sm text-ink-muted">- Couldn't load the connector catalog.- <Button- variant="base"- size="sm"- depth={3}- onClick={() => void query.refetch()}- >- Retry- </Button>- </div>- }- >- <div class="flex max-h-64 flex-col gap-2 overflow-y-auto">- <For each={catalog.entries()}>- {(entry) => <CatalogRow entry={entry} onConnected={onConnected} />}- </For>-- <Show when={query.isFetching && catalog.entries().length === 0}>- <p class="py-6 text-center text-sm text-ink-muted">- Loading connectors…- </p>- </Show>-- <Show- when={- !query.isFetching &&- catalog.entries().length === 0 &&- catalog.search().trim()- }- >- <p class="py-6 text-center text-sm text-ink-muted">- No connectors found for "{catalog.search().trim()}".- </p>- </Show>-- <Show when={query.hasNextPage}>- <Button- variant="base"- size="sm"- depth={3}- class="self-center"- disabled={query.isFetchingNextPage}- onClick={() => void query.fetchNextPage()}- >- {query.isFetchingNextPage ? 'Loading…' : 'Load more'}- </Button>- </Show>- </div>- </Show>-- <Show- when={connected().length > 0}- fallback={<SkipButton onClick={props.onSkip} />}- >- <ContinueButton onClick={props.onContinue} />- </Show>- </div>- );-}diff --git a/apps/web/src/features/setup/flow/OnboardingFlow.tsx b/apps/web/src/features/setup/flow/OnboardingFlow.tsxindex 319b303c80..1c98d4a4f5 100644--- a/apps/web/src/features/setup/flow/OnboardingFlow.tsx+++ b/apps/web/src/features/setup/flow/OnboardingFlow.tsx@@ -1,7 +1,6 @@import { useAnalytics } from '@app/lib/analytics/analytics-context';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { FEATURED_MCP_SERVERS } from '@core/component/AI/constant/mcpServers';-import { usePipedreamMcpFlag } from '@core/pipedream/flag';import LogoIcon from '@icon/macro-logo.svg';import { authKeys } from '@queries/auth/keys';import { useCompleteTutorialMutation } from '@queries/auth/tutorial';@@ -29,12 +28,10 @@ import type { ModuleLogo, ModuleState } from '../Module';import { MODULE_LOGOS } from '../moduleLogos';import { BrandHandoff, type BrandHandoffSource } from './BrandHandoff';import { BuildingStep, type ConnectedTools } from './BuildingStep';-import { ConnectorCatalogStep } from './ConnectorCatalogStep';import { ConnectorStep } from './ConnectorStep';import { createFlowFinish } from './createFlowFinish';import { EmailStep } from './EmailStep';import {- ONBOARDING_CATALOG_STEP_KEY,ONBOARDING_CONNECTORS_FEATURE_FLAG,type OnboardingConnectorServerName,resolveOnboardingConnectorNames,@@ -145,11 +142,8 @@ const CONNECTOR_COPY: Record<string, ConnectorStepCopy> = {function buildSteps(connectorNames: readonly OnboardingConnectorServerName[],connectedTools: () => ConnectedTools,- onBuildingDone: (source: BrandHandoffSource | null) => void,- /** Whether to offer the searchable catalog after the curated connectors. */- includeCatalog: boolean+ onBuildingDone: (source: BrandHandoffSource | null) => void): StepDef[] {- const curatedSlugs: string[] = [];const connectorSteps: StepDef[] = connectorNames.flatMap((name) => {const server = FEATURED_MCP_SERVERS.find((candidate) => candidate.server_name === name@@ -157,7 +151,6 @@ function buildSteps(const copy = CONNECTOR_COPY[name];if (!server || !copy) return [];const logo = connectorLogo(name);- curatedSlugs.push(server.app_slug);return [{key: `connect-${name.toLowerCase()}`,@@ -191,25 +184,6 @@ function buildSteps(),},...connectorSteps,- // Only on the Pipedream stack: the native stack has no catalog to- // browse, just the presets the curated steps already offered.- ...(includeCatalog- ? [- {- key: ONBOARDING_CATALOG_STEP_KEY,- title: 'Connect anything else',- subtitle:- "Macro's agent can work in any of these tools. Connect the ones your team lives in — you can add more later in Settings.",- render: (controls: StepControls) => (- <ConnectorCatalogStep- curatedSlugs={curatedSlugs}- onContinue={controls.next}- onSkip={controls.skip}- />- ),- } satisfies StepDef,- ]- : []),{key: 'team',title: 'Macro is meant for teams',@@ -354,14 +328,12 @@ function FlowContent() {};const connectorConfig = useFeatureFlag(ONBOARDING_CONNECTORS_FEATURE_FLAG);- const pipedreamMcp = usePipedreamMcpFlag();const steps = createMemo(() => {const config = connectorConfig();return buildSteps(resolveOnboardingConnectorNames(config.enabled, config.payload),connectedTools,- startBrandHandoff,- pipedreamMcp()+ startBrandHandoff);});diff --git a/apps/web/src/features/setup/flow/onboardingConnectorConfig.test.ts b/apps/web/src/features/setup/flow/onboardingConnectorConfig.test.tsindex 7d63f18534..1f5f6d63ec 100644--- a/apps/web/src/features/setup/flow/onboardingConnectorConfig.test.ts+++ b/apps/web/src/features/setup/flow/onboardingConnectorConfig.test.ts@@ -1,6 +1,5 @@import { describe, expect, it } from 'vitest';import {- ONBOARDING_CATALOG_STEP_KEY,ONBOARDING_CONNECTORS,resolveOnboardingConnectorNames,resolveOnboardingStepIndex,@@ -66,7 +65,6 @@ describe('resolveOnboardingStepIndex', () => {'connect-notion','connect-slack','connect-github',- ONBOARDING_CATALOG_STEP_KEY,'team','building','summary',@@ -106,28 +104,4 @@ describe('resolveOnboardingStepIndex', () => {it('falls back safely for an unknown saved step', () => {expect(resolveOnboardingStepIndex(fullStepList, 'unknown')).toBe(0);});-- // The catalog step only exists on the Pipedream stack. A session that saved- // it and came back without it must fall forward, not restart the flow —- // which is what an unranked step key would do (indexOf -1 → step 0).- it('falls forward to team when the catalog step is absent', () => {- const withoutCatalog = fullStepList.filter(- (key) => key !== ONBOARDING_CATALOG_STEP_KEY- );- const index = resolveOnboardingStepIndex(- withoutCatalog,- ONBOARDING_CATALOG_STEP_KEY- );-- expect(withoutCatalog[index]).toBe('team');- });-- it('resumes into the catalog step when it is present', () => {- const index = resolveOnboardingStepIndex(- fullStepList,- ONBOARDING_CATALOG_STEP_KEY- );-- expect(fullStepList[index]).toBe(ONBOARDING_CATALOG_STEP_KEY);- });});diff --git a/apps/web/src/features/setup/flow/onboardingConnectorConfig.ts b/apps/web/src/features/setup/flow/onboardingConnectorConfig.tsindex 3e08e0e698..c0c1187294 100644--- a/apps/web/src/features/setup/flow/onboardingConnectorConfig.ts+++ b/apps/web/src/features/setup/flow/onboardingConnectorConfig.ts@@ -8,13 +8,9 @@ export const ONBOARDING_CONNECTORS = [{ key: 'github', serverName: 'GitHub' },] as const;-/** The catch-all catalog step, after every curated connector step. */-export const ONBOARDING_CATALOG_STEP_KEY = 'connect-more';-const ONBOARDING_STEP_ORDER = ['email',...ONBOARDING_CONNECTORS.map(({ key }) => `connect-${key}`),- ONBOARDING_CATALOG_STEP_KEY,'team','building','summary',