diff --git a/api/core/workflow/graph/graph.py b/api/core/workflow/graph/graph.py index c1a7e43b3e..ba5a01fc94 100644 --- a/api/core/workflow/graph/graph.py +++ b/api/core/workflow/graph/graph.py @@ -130,15 +130,12 @@ class Graph: @classmethod def _build_edges( - cls, - edge_configs: list[dict[str, object]], - valid_node_ids: set[str] | None = None, + cls, edge_configs: list[dict[str, object]] ) -> tuple[dict[str, Edge], dict[str, list[str]], dict[str, list[str]]]: """ Build edge objects and mappings from edge configurations. :param edge_configs: list of edge configurations - :param valid_node_ids: optional set of valid node IDs to filter edges :return: tuple of (edges dict, in_edges dict, out_edges dict) """ edges: dict[str, Edge] = {} @@ -308,16 +305,7 @@ class Graph: if not node_configs: raise ValueError("Graph must have at least one node") - # Filter out UI-only nodes that should not participate in workflow execution - # Check both node.type (ReactFlow type) and node.data.type (business type) - ui_only_node_types = {"custom-note"} - ui_only_data_types = {"group"} - node_configs = [ - node_config - for node_config in node_configs - if node_config.get("type", "") not in ui_only_node_types - and node_config.get("data", {}).get("type", "") not in ui_only_data_types - ] + node_configs = [node_config for node_config in node_configs if node_config.get("type", "") != "custom-note"] # Parse node configurations node_configs_map = cls._parse_node_configs(node_configs) diff --git a/web/app/components/workflow/custom-group-node/custom-group-exit-port-node.tsx b/web/app/components/workflow/custom-group-node/custom-group-exit-port-node.tsx index 45af811618..fda7cab63d 100644 --- a/web/app/components/workflow/custom-group-node/custom-group-exit-port-node.tsx +++ b/web/app/components/workflow/custom-group-node/custom-group-exit-port-node.tsx @@ -4,7 +4,7 @@ import type { FC } from 'react' import { memo } from 'react' import { Handle, Position } from 'reactflow' import type { CustomGroupExitPortNodeData } from './types' -import cn from '@/utils/classnames' +import { cn } from '@/utils/classnames' type CustomGroupExitPortNodeProps = { id: string diff --git a/web/app/components/workflow/custom-group-node/custom-group-input-node.tsx b/web/app/components/workflow/custom-group-node/custom-group-input-node.tsx index 18af6f698d..90e840c472 100644 --- a/web/app/components/workflow/custom-group-node/custom-group-input-node.tsx +++ b/web/app/components/workflow/custom-group-node/custom-group-input-node.tsx @@ -4,7 +4,7 @@ import type { FC } from 'react' import { memo } from 'react' import { Handle, Position } from 'reactflow' import type { CustomGroupInputNodeData } from './types' -import cn from '@/utils/classnames' +import { cn } from '@/utils/classnames' type CustomGroupInputNodeProps = { id: string diff --git a/web/app/components/workflow/custom-group-node/custom-group-node.tsx b/web/app/components/workflow/custom-group-node/custom-group-node.tsx index f41eb4bad3..9d137a36c6 100644 --- a/web/app/components/workflow/custom-group-node/custom-group-node.tsx +++ b/web/app/components/workflow/custom-group-node/custom-group-node.tsx @@ -4,7 +4,7 @@ import type { FC } from 'react' import { memo } from 'react' import { Handle, Position } from 'reactflow' import type { CustomGroupNodeData } from './types' -import cn from '@/utils/classnames' +import { cn } from '@/utils/classnames' type CustomGroupNodeProps = { id: string diff --git a/web/app/components/workflow/nodes/group/node.tsx b/web/app/components/workflow/nodes/group/node.tsx index 0d59b3fbb5..0d891d69dd 100644 --- a/web/app/components/workflow/nodes/group/node.tsx +++ b/web/app/components/workflow/nodes/group/node.tsx @@ -4,7 +4,7 @@ import BlockIcon from '@/app/components/workflow/block-icon' import type { NodeProps } from '@/app/components/workflow/types' import type { GroupHandler, GroupMember, GroupNodeData } from './types' import type { BlockEnum } from '@/app/components/workflow/types' -import cn from '@/utils/classnames' +import { cn } from '@/utils/classnames' const MAX_MEMBER_ICONS = 12