Skip to content

Commit ea87e3c

Browse files
ivicacclaude
andcommitted
797 client - Filter nested cluster element slots by element's own name
The clusterElementClusterElementTypes map is keyed by the cluster element's own name (the third segment of its type, e.g. 'search', 'vectorStore'), not by the parent slot key (e.g. 'tools'). Both the placeholder-creation recursion and the handle renderer were passing the parent slot key and falling back to showing every type. Forward the element's own name so slot filtering actually applies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 50aab9f commit ea87e3c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

client/src/pages/platform/cluster-element-editor/utils/createClusterElementsNodes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default function createClusterElementNodes({
8787
clusterElements: element.clusterElements,
8888
clusterRootId: element.name,
8989
currentRootComponentDefinition: nestedClusterRootDefinition,
90-
nestedClusterRootElementType: clusterElementTypeName,
90+
nestedClusterRootElementType: element.type?.split('/')[2] || clusterElementTypeName,
9191
nestedClusterRootsDefinitions,
9292
});
9393

@@ -147,7 +147,8 @@ export default function createClusterElementNodes({
147147
clusterElements: clusterElementValue.clusterElements,
148148
clusterRootId: clusterElementValue.name,
149149
currentRootComponentDefinition: nestedClusterRootDefinition,
150-
nestedClusterRootElementType: clusterElementTypeName,
150+
nestedClusterRootElementType:
151+
clusterElementValue.type?.split('/')[2] || clusterElementTypeName,
151152
nestedClusterRootsDefinitions,
152153
});
153154

client/src/pages/platform/workflow-editor/nodes/WorkflowNode.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ const WorkflowNode = ({data, id}: {data: NodeDataType; id: string}) => {
587587

588588
return getFilteredClusterElementTypes({
589589
clusterRootComponentDefinition: nestedClusterRootDefinition || mainClusterRootComponentDefinition,
590-
currentClusterElementsType: data.clusterElementType,
590+
currentClusterElementsType: (data.clusterElementName as string) || data.clusterElementType,
591591
isNestedClusterRoot,
592592
operationName: data.operationName,
593593
});
@@ -598,6 +598,7 @@ const WorkflowNode = ({data, id}: {data: NodeDataType; id: string}) => {
598598
mainClusterRootComponentDefinition,
599599
nestedClusterRootsComponentDefinitions,
600600
data.componentName,
601+
data.clusterElementName,
601602
data.clusterElementType,
602603
data.operationName,
603604
]);

0 commit comments

Comments
 (0)