AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(embed): add hideReplaceConnection to hide replacing connections in embedded apps (#16878)
Abdul5d92536f369c
diff --git a/docs/embedding/embed-builder.mdx b/docs/embedding/embed-builder.mdxindex d51227c0434..bbe68a2175c 100644--- a/docs/embedding/embed-builder.mdx+++ b/docs/embedding/embed-builder.mdx@@ -71,6 +71,7 @@ Please check the [navigation](./navigation) section, as it's very important to u| embedding.initialRoute | ❌ | string | The route the iframe loads on, instead of the default page (added in [0.14.0](./sdk-changelog#07%2F27%2F2026-0-14-0)). Accepts the same routes as the [navigate method](/embedding/navigation#navigate-method). || embedding.builder.disableNavigation | ❌ | boolean \| `keep_home_button_only` | Hides the folder name, home button (if not set to [`keep_home_button_only`](./sdk-changelog#20%2F05%2F2025-0-4-0)) and delete option in the builder, by default it is false. || embedding.builder.hideFlowName | ❌ | boolean | Hides the flow name and flow actions dropdown in the builder's header, by default it is false. |+| embedding.builder.hideConnections | ❌ | boolean | Hides the Connections button in the builder's header, which lists the connections the flow uses. By default it is true, so embedded users do not see the button; set it to false to show it. (added in [0.17.0](./sdk-changelog#10%2F26%2F2026-0-17-0)) || embedding.builder.homeButtonClickedHandler | ❌ | `()=>void` | Callback that stops home button from navigating to dashboard and overrides it with this handler (added in [0.4.0](./sdk-changelog#20%2F05%2F2025-0-4-0))| embedding.builder.homeButtonIcon | ❌ | `logo` \| `back` | if set to **`back`** the tooltip shown on hovering the home button is removed (added in [0.5.0](./sdk-changelog#03%2F07%2F2025-0-5-0))| embedding.dashboard.hideSidebar | ❌ | boolean | Controls the visibility of the sidebar in the dashboard, by default it is false. |@@ -80,6 +81,7 @@ Please check the [navigation](./navigation) section, as it's very important to u| embedding.hideTables | ❌ | boolean | Hides the Tables UI in the dashboard (tree, filters, create/import buttons) and blocks direct access to the table editor route. The Tables piece used inside flows is unaffected. By default it is false. (added in [0.9.0](./sdk-changelog#04%2F21%2F2026-0-9-0)) || embedding.hideActiveUsers | ❌ | boolean | Hides the active users (presence) avatars in the builder's header and the table editor's header. When hidden, the embedded user also stops appearing in other collaborators' active-users list. By default it is false. (added in [0.12.0](./sdk-changelog#07%2F09%2F2026-0-12-0)) || embedding.hideGlobalSearch | ❌ | boolean | Hides the global search button in the dashboard sidebar and disables the `CMD+K` / `Ctrl+K` command palette, by default it is false. (added in [0.13.0](./sdk-changelog#07%2F09%2F2026-0-13-0)) |+| embedding.hideReplaceConnection | ❌ | boolean | Hides every Replace button: on the Connections page, in the builder's Connections list, and in the dialog that opens when a step switches to another connection. The builder's Connections list itself stays; use `embedding.builder.hideConnections` to hide it. By default it is false; set it to true to stop embedded users from replacing connections. (added in [0.17.0](./sdk-changelog#10%2F26%2F2026-0-17-0)) || embedding.formulasDocsUrl | ❌ | string | Where the "See All" link in the formula editor points. Leave it unset (the default) and the link is hidden entirely, so embedded users are never sent to the Activepieces docs. Set it to your own formula reference to show the link pointing there. (added in [0.15.0](./sdk-changelog#08%2F01%2F2026-0-15-0)) || embedding.analytics.gtmContainerId | ❌ | string | Loads Google Tag Manager inside the embedded app using this container id (e.g. `GTM-XXXXXXX`), so the tags you configure in GTM (analytics, session recording) run on the builder and dashboard. Scripts on your own page cannot see into the iframe, so this is the only way to track it. Off when unset. (added in [0.16.0](./sdk-changelog#09%2F10%2F2026-0-16-0)) || embedding.analytics.clarityProjectId | ❌ | string | Loads Microsoft Clarity inside the embedded app using this project id. Session recording on a large flow canvas can be heavy, so test it on a real flow before rolling out. Off when unset. (added in [0.16.0](./sdk-changelog#09%2F10%2F2026-0-16-0)) |diff --git a/docs/embedding/sdk-changelog.mdx b/docs/embedding/sdk-changelog.mdxindex 274e8ab2e6c..1bff83079d4 100644--- a/docs/embedding/sdk-changelog.mdx+++ b/docs/embedding/sdk-changelog.mdx@@ -18,6 +18,12 @@ Change log format: MM/DD/YYYY (version)+### 10/26/2026 (0.17.0)+- SDK URL: https://cdn.activepieces.com/sdk/embed/0.17.0.js+- Added `embedding.hideReplaceConnection` parameter to the [configure](./embed-builder#configure-parameters) method **(value: true | false)**. It hides every Replace button: on the Connections page, in the builder's Connections list, and in the dialog that opens when a step switches to another connection. It is false by default.+- Added `embedding.builder.hideConnections` parameter to the [configure](./embed-builder#configure-parameters) method **(value: true | false)**. It hides the Connections button in the builder's header. It is true by default, so the button only shows when you set it to false.+- This version requires an Activepieces release that includes [#17106](https://github.com/activepieces/activepieces/pull/17106).+### 09/10/2026 (0.16.0)- SDK URL: https://cdn.activepieces.com/sdk/embed/0.16.0.js- Added `embedding.analytics.gtmContainerId` and `embedding.analytics.clarityProjectId` parameters to the [configure](./embed-builder#configure-parameters) method **(value: string)**. Loads Google Tag Manager and/or Microsoft Clarity inside the embedded app so you get user-behaviour analytics on the builder; scripts on your own page cannot see into the iframe. Only ids are accepted, never script code, and the ids are validated before anything loads. Both are off when unset. This version requires an Activepieces release that includes [#15442](https://github.com/activepieces/activepieces/pull/15442).diff --git a/packages/ee/embed-sdk/package.json b/packages/ee/embed-sdk/package.jsonindex 0127e5d6025..a9b642d6fac 100644--- a/packages/ee/embed-sdk/package.json+++ b/packages/ee/embed-sdk/package.json@@ -1,6 +1,6 @@{"name": "ee-embed-sdk",- "version": "0.16.0",+ "version": "0.17.0","type": "commonjs","main": "./src/index.js","typings": "./src/index.d.ts",diff --git a/packages/ee/embed-sdk/src/index.ts b/packages/ee/embed-sdk/src/index.tsindex c49c0270230..37206c58174 100644--- a/packages/ee/embed-sdk/src/index.ts+++ b/packages/ee/embed-sdk/src/index.ts@@ -119,6 +119,7 @@ export interface ActivepiecesVendorInit {data: {hideSidebar: boolean;hideFlowNameInBuilder?: boolean;+ hideConnectionsInBuilder?: boolean;disableNavigationInBuilder: boolean | 'keep_home_button_only';hideFolders?: boolean;hideTables?: boolean;@@ -137,6 +138,7 @@ export interface ActivepiecesVendorInit {hidePageHeader?: boolean;hideActiveUsers?: boolean;hideGlobalSearch?: boolean;+ hideReplaceConnection?: boolean;formulasDocsUrl?: string;gtmContainerId?: string;clarityProjectId?: string;@@ -163,6 +165,7 @@ type EmbeddingParam = {builder?: {disableNavigation?: boolean;hideFlowName?: boolean;+ hideConnections?: boolean;homeButtonIcon: 'back' | 'logo';homeButtonClickedHandler?: (data: {route: string;@@ -179,6 +182,7 @@ type EmbeddingParam = {hideTables?: boolean;hideActiveUsers?: boolean;hideGlobalSearch?: boolean;+ hideReplaceConnection?: boolean;formulasDocsUrl?: string;analytics?: {gtmContainerId?: string;@@ -206,7 +210,7 @@ export type McpCredentials = {type RequestMethod = Required<Parameters<typeof fetch>>[1]['method'];class ActivepiecesEmbedded {- readonly _sdkVersion = "0.16.0";+ readonly _sdkVersion = "0.17.0";//used for Automatically Sync URL feature i.e /org/1234_prefix = '/';_instanceUrl = '';@@ -340,6 +344,7 @@ class ActivepiecesEmbedded {hideFolders: this._embeddingState?.hideFolders ?? false,hideTables: this._embeddingState?.hideTables ?? false,hideFlowNameInBuilder: this._embeddingState?.builder?.hideFlowName ?? false,+ hideConnectionsInBuilder: this._embeddingState?.builder?.hideConnections ?? true,jwtToken: this._jwtToken,initialRoute,fontUrl: this._embeddingState?.styling?.fontUrl,@@ -354,6 +359,7 @@ class ActivepiecesEmbedded {hidePageHeader: this._embeddingState?.dashboard?.hidePageHeader ?? false,hideActiveUsers: this._embeddingState?.hideActiveUsers ?? false,hideGlobalSearch: this._embeddingState?.hideGlobalSearch ?? false,+ hideReplaceConnection: this._embeddingState?.hideReplaceConnection ?? false,formulasDocsUrl: this._embeddingState?.formulasDocsUrl,gtmContainerId: this._embeddingState?.analytics?.gtmContainerId,clarityProjectId: this._embeddingState?.analytics?.clarityProjectId,diff --git a/packages/web/src/app/components/flow-actions-menu.tsx b/packages/web/src/app/components/flow-actions-menu.tsxindex fc084c505c6..13b3456b3f4 100644--- a/packages/web/src/app/components/flow-actions-menu.tsx+++ b/packages/web/src/app/components/flow-actions-menu.tsx@@ -332,7 +332,7 @@ const FlowActionMenu: React.FC<FlowActionMenuProps> = ({{insideBuilder &&!isRunsPage &&showsDraftOrPublishedVersion &&- !embedState.isEmbedded && (+ !embedState.hideReplaceConnection && (<PermissionNeededTooltiphasPermission={userHasPermissionToReplaceAppConnection}>diff --git a/packages/web/src/app/connections/replace-connection-for-project-dialog.tsx b/packages/web/src/app/connections/replace-connection-for-project-dialog.tsxindex cccac7ce054..0033dbd86a7 100644--- a/packages/web/src/app/connections/replace-connection-for-project-dialog.tsx+++ b/packages/web/src/app/connections/replace-connection-for-project-dialog.tsx@@ -2,7 +2,6 @@ import { t } from 'i18next';import { ChevronDown, WorkflowIcon } from 'lucide-react';import React, { useState } from 'react';import { useForm, useWatch } from 'react-hook-form';-import { useNavigate } from 'react-router-dom';import { Badge } from '@/components/ui/badge';import { Button } from '@/components/ui/button';@@ -29,6 +28,7 @@ import {} from '@/features/connections';import { flowHooks } from '@/features/flows';import { piecesHooks } from '@/features/pieces';+import { useNewWindow } from '@/lib/navigation-utils';import {ReplaceConnectionSelection,@@ -63,7 +63,7 @@ function ReplaceConnectionForProjectForm({onConnectionMerged,setDialogOpen,}: ReplaceConnectionForProjectFormProps) {- const navigate = useNavigate();+ const openNewWindow = useNewWindow();const [step, setStep] = useState<ProjectReplaceStep>(ProjectReplaceStep.CHOOSE_CONNECTIONS,);@@ -215,7 +215,7 @@ function ReplaceConnectionForProjectForm({variant="secondary"className="max-w-[280px] cursor-pointer hover:bg-gray-3/70"onClick={() =>- navigate(+ openNewWindow(`/projects/${flow.projectId}/flows/${flow.id}`,)}diff --git a/packages/web/src/app/routes/connections/index.tsx b/packages/web/src/app/routes/connections/index.tsxindex d38cc24a758..6f5819242e6 100644--- a/packages/web/src/app/routes/connections/index.tsx+++ b/packages/web/src/app/routes/connections/index.tsx@@ -40,6 +40,7 @@ import { StatusIconWithText } from '@/components/custom/status-icon-with-text';import { TextWithTooltip } from '@/components/custom/text-with-tooltip';import { PlusIcon } from '@/components/icons/plus';import { ReplaceIcon } from '@/components/icons/replace';+import { useEmbedding } from '@/components/providers/embed-provider';import { Button } from '@/components/ui/button';import {Tooltip,@@ -69,6 +70,7 @@ function AppConnectionsPage() {>([]);const [showDeleteDialog, setShowDeleteDialog] = useState(false);const { checkAccess } = useAuthorization();+ const { embedState } = useEmbedding();const userPlatformRole = userHooks.getCurrentUserPlatformRole();const location = useLocation();const { pieces } = piecesHooks.usePieces({});@@ -392,27 +394,31 @@ function AppConnectionsPage() {const toolbarButtons = useMemo(() => [- <PermissionNeededTooltip- key="replace"- hasPermission={userHasPermissionToReplaceAppConnection}- >- <ReplaceConnectionForProjectDialog- projectId={projectId}- onConnectionMerged={() => {- setRefresh(refresh + 1);- refetch();- }}- >- <AnimatedIconButton- icon={ReplaceIcon}- iconSize={16}- variant="outline"- disabled={!userHasPermissionToReplaceAppConnection}- >- {t('Replace')}- </AnimatedIconButton>- </ReplaceConnectionForProjectDialog>- </PermissionNeededTooltip>,+ ...(embedState.hideReplaceConnection+ ? []+ : [+ <PermissionNeededTooltip+ key="replace"+ hasPermission={userHasPermissionToReplaceAppConnection}+ >+ <ReplaceConnectionForProjectDialog+ projectId={projectId}+ onConnectionMerged={() => {+ setRefresh(refresh + 1);+ refetch();+ }}+ >+ <AnimatedIconButton+ icon={ReplaceIcon}+ iconSize={16}+ variant="outline"+ disabled={!userHasPermissionToReplaceAppConnection}+ >+ {t('Replace')}+ </AnimatedIconButton>+ </ReplaceConnectionForProjectDialog>+ </PermissionNeededTooltip>,+ ]),<PermissionNeededTooltipkey="new"hasPermission={userHasPermissionToWriteAppConnection}@@ -438,6 +444,7 @@ function AppConnectionsPage() {[userHasPermissionToWriteAppConnection,userHasPermissionToReplaceAppConnection,+ embedState.hideReplaceConnection,refresh,],);diff --git a/packages/web/src/app/routes/embed/index.tsx b/packages/web/src/app/routes/embed/index.tsxindex a2bcb5a35ae..e61b3a69fda 100644--- a/packages/web/src/app/routes/embed/index.tsx+++ b/packages/web/src/app/routes/embed/index.tsx@@ -134,6 +134,8 @@ const EmbedPage = React.memo(() => {isEmbedded: true,hideFlowNameInBuilder:event.data.data.hideFlowNameInBuilder ?? false,+ hideConnectionsInBuilder:+ event.data.data.hideConnectionsInBuilder ?? true,disableNavigationInBuilder:event.data.data.disableNavigationInBuilder !== false,hideFolders: event.data.data.hideFolders ?? false,@@ -159,6 +161,8 @@ const EmbedPage = React.memo(() => {hidePageHeader: event.data.data.hidePageHeader ?? false,hideActiveUsers: event.data.data.hideActiveUsers ?? false,hideGlobalSearch: event.data.data.hideGlobalSearch ?? false,+ hideReplaceConnection:+ event.data.data.hideReplaceConnection ?? false,formulasDocsUrl: event.data.data.formulasDocsUrl,gtmContainerId: event.data.data.gtmContainerId,clarityProjectId: event.data.data.clarityProjectId,diff --git a/packages/web/src/components/custom/page-header.tsx b/packages/web/src/components/custom/page-header.tsxindex 9803c1ac2a9..3223cc5178a 100644--- a/packages/web/src/components/custom/page-header.tsx+++ b/packages/web/src/components/custom/page-header.tsx@@ -24,6 +24,7 @@ export const PageHeader = ({)}><div className="flex items-center gap-1 grow min-w-0">+ {leftContent}<div className="grow min-w-0">{typeof title === 'string' ? (<h1 className="text-base font-semibold">{title}</h1>@@ -34,7 +35,6 @@ export const PageHeader = ({<span className="text-sm text-gray-11">{description}</span>)}</div>- {leftContent}</div>{rightContent}</div>diff --git a/packages/web/src/components/providers/embed-provider.tsx b/packages/web/src/components/providers/embed-provider.tsxindex 4cd12510c32..89e26b17266 100644--- a/packages/web/src/components/providers/embed-provider.tsx+++ b/packages/web/src/components/providers/embed-provider.tsx@@ -10,6 +10,7 @@ type EmbeddingState = {hideFolders: boolean;hideTables: boolean;hideFlowNameInBuilder: boolean;+ hideConnectionsInBuilder: boolean;hideExportAndImportFlow: boolean;sdkVersion?: string;predefinedConnectionName?: string;@@ -23,6 +24,7 @@ type EmbeddingState = {hidePageHeader: boolean;hideActiveUsers: boolean;hideGlobalSearch: boolean;+ hideReplaceConnection: boolean;formulasDocsUrl?: string;gtmContainerId?: string;clarityProjectId?: string;@@ -36,6 +38,7 @@ const defaultState: EmbeddingState = {hideFolders: false,hideTables: false,hideFlowNameInBuilder: false,+ hideConnectionsInBuilder: false,hideExportAndImportFlow: false,useDarkBackground: window.opener !== null,hideHomeButtonInBuilder: false,@@ -45,6 +48,7 @@ const defaultState: EmbeddingState = {hidePageHeader: false,hideActiveUsers: false,hideGlobalSearch: false,+ hideReplaceConnection: false,};const EmbeddingContext = createContext<{