5561 client - Keep agent cluster elements on action toggle and move the Stream response label - #5573
Merged
Merged
Conversation
…saves Toggling the AI Agent action re-saved the cluster root from a node-data copy that carried no clusterElements, so saveWorkflowDefinition wrote the root back with them stripped. Carry the definition's clusterElements through the updated root node data, and fall back to the existing definition task's clusterElements when the incoming task has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Follow-ups to #5568 on the simple AI Agent editor.
Keep the agent cluster elements when the action toggle saves
Toggling the AI Agent action (chat <-> streamChat) re-saved the cluster root from a node-data copy that carried no
clusterElements, andsaveWorkflowDefinitionreplaces a cluster root'sclusterElementswholesale — so the agent's model, tools and memory were silently stripped from the definition on every toggle.Two changes, either of which alone leaves a hole:
useAiAgentStreamResponsenow carriesrootTask.clusterElements(read from the definition, not from the seeded-oncerootClusterElementNodeData) into the updated root node data.saveWorkflowDefinitionfalls back to the existing definition task'sclusterElementswhen the incoming task has none. Note this uses??, not||, so an explicit empty map still clears the elements — that distinction is covered by a test.Move the Stream response toggle below a standalone label
The title and the switch shared a row; the title is now a standalone heading with the switch on its own row below it.
Tests
Regression coverage added for all three behaviours, including the explicit-empty-map case that distinguishes
??from||.npm run check(lint + typecheck + tests): 357 test files, 3831 tests passed.Scope note
These commits were lifted off a longer-running branch. Two related follow-ups could not come along, because the code they touch is not on
masteryet:clusterElementsfix applied touseAiAgentSkills, whose hook does not exist onmaster.layoutUtils, which targets a version ofgetClusterElementsLayoutElementsthat has diverged substantially from the one onmaster.Both will need to ride along with the branches that introduce their prerequisites.
🤖 Generated with Claude Code