From 693d408c4a49185023080ba55f97888a64d6bae6 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 13 Nov 2025 19:31:09 -0800 Subject: [PATCH] filter out templates that have custom nodes when not on cloud (temporary) (#6690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Templates are being added that have custom nodes. As a temporary measure, filter these out on local. In a followup, add a UX to allow local users to do something like opt-in to use these or to show these on the condition that the user has these custom nodes installed. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6690-filter-out-templates-that-have-custom-nodes-when-not-on-cloud-temporary-2ab6d73d3650819981c0e9b26d34acff) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown Co-authored-by: GitHub Action --- .../templates/repositories/workflowTemplatesStore.ts | 12 +++++++++++- src/platform/workflow/templates/types/template.ts | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/platform/workflow/templates/repositories/workflowTemplatesStore.ts b/src/platform/workflow/templates/repositories/workflowTemplatesStore.ts index a1076c88d2..5ea52c8ede 100644 --- a/src/platform/workflow/templates/repositories/workflowTemplatesStore.ts +++ b/src/platform/workflow/templates/repositories/workflowTemplatesStore.ts @@ -237,7 +237,17 @@ export const useWorkflowTemplatesStore = defineStore( } ) - return allTemplates + // TODO: Temporary filtering of custom node templates on local installations + // Future: Add UX that allows local users to opt-in to templates with custom nodes, + // potentially conditional on whether they have those specific custom nodes installed. + // This would provide better template discovery while respecting local user workflows. + const filteredTemplates = isCloud + ? allTemplates + : allTemplates.filter( + (template) => !template.requiresCustomNodes?.length + ) + + return filteredTemplates }) /** diff --git a/src/platform/workflow/templates/types/template.ts b/src/platform/workflow/templates/types/template.ts index 426dd12cff..25a209e854 100644 --- a/src/platform/workflow/templates/types/template.ts +++ b/src/platform/workflow/templates/types/template.ts @@ -27,6 +27,11 @@ export interface TemplateInfo { * Whether this template uses open source models. When false, indicates partner/API node templates. */ openSource?: boolean + /** + * Array of custom node package IDs required for this template (from Custom Node Registry). + * Templates with this field will be hidden on local installations temporarily. + */ + requiresCustomNodes?: string[] } export interface WorkflowTemplates {