You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DYN-10964: Add transient changed by assistant node highlight - #17360
This PR aims to address DYN-10964.
This is the Dynamo side of DYN-10798.
After an AI assistant creates, edits, or moves nodes, those nodes are highlighted on the canvas so the user can see what changed. The highlight is separate from warning and error states. It is not saved in the .dyn file, and clearing it does not mark the graph unsaved
Dynamo does not turn the highlight on. DynamoMCP marks the nodes it touched. A later edit by the user clears the highlight on that node only. An edit that happens while an AI call is still in progress does not change the highlight
A separate PR on DynamoMCP side to follow once this is merged
Changes:
NodeModel.IsRecentlyModifiedByAI stores the highlight. It is ignored by file save and by undo
WorkspaceModel.IsAiEditInProgress tells Dynamo that an AI call is in progress. While it is true, a node edit does not clear the highlight. While it is false, a user edit clears it. The flag never turns the highlight on
the canvas draws the highlight zoomed in and zoomed out, and it stays visible when the node also has a warning or error.
the canvas context menu Clear AI Highlights clears every highlight without marking the graph unsaved
new public members are listed in PublicAPI.Unshipped
unit tests in WorkspaceModelTests cover clear-on-user-edit, no change during an AI call, one node only, transient nodes, unsaved state, undo, and file save
Nodes created, edited, or moved by an AI assistant are highlighted on the canvas until the user edits them or clears the highlights. The highlight is not saved with the graph.
ivaylo-matov
changed the title
DYN-10964: Add transient "changed by assistant" node highlight
DYN-10964: Add transient changed by assistant node highlight
Oct 1, 2026
Remove or test unrelated PortInfo deserialization changes
src/DynamoCore/Graph/Nodes/NodeModel.cs:2684
This hunk changes legacy PortInfo deserialization behavior—missing indices are now skipped, invalid default values preserve prior state, and list metadata is no longer reset when useLevels is false—but the PR is scoped and tested only for AI highlights. Revert this unrelated behavioral change from this PR, or describe it and add focused compatibility tests so the serialization impact can be reviewed independently.
Frozen nodes never reach this handler: NodeModel.OnNodeModified returns before raising Modified when IsFrozen is true (NodeModel.cs:1519-1526), although editable inputs still change their value and call it (BasicInteractive.cs:23-35). Therefore, editing a highlighted frozen input leaves the AI highlight set, contrary to the stated clear-on-user-edit behavior. Route highlight clearing through a user-edit notification that is not suppressed by the frozen execution guard, and add a frozen-node regression test.
No test executes this command; the added core tests only toggle an individual model property. Add a WPF view-model test that highlights multiple nodes, executes ClearAIChangedHighlightsCommand, and verifies all highlights are cleared, CanExecute becomes false, and HasUnsavedChanges remains false. Similar workspace commands are exercised through their public command properties in ConnectorContextMenuTests.cs:124-134.
Use consistent AI acronym in the public member name
This new public member spells the acronym as Ai, while the other APIs introduced by this change use AI (IsRecentlyModifiedByAI and ClearAIChangedHighlightsCommand). Rename it to IsAIEditInProgress before the API ships, and update its PublicAPI entry and callers, so the permanent public surface is internally consistent.
Clearing only from NodeModel.Modified misses user edits whose setters do not call OnNodeModified. For example, inline rename executes UpdateModelValueCommand for NodeModel.Name (NodeView.xaml.cs:1858-1859), but the Name setter only raises PropertyChanged (NodeModel.cs:468-475); visibility and freezing follow the same pattern. These edits mark the graph unsaved yet leave the AI highlight set, contrary to the stated clear-on-user-edit behavior. Clear the flag for affected nodes in the non-AI model-update path (while preserving intentional position and undo behavior) and cover one such edit with a regression test.
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
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.
Purpose
This PR aims to address DYN-10964.
This is the Dynamo side of DYN-10798.
After an AI assistant creates, edits, or moves nodes, those nodes are highlighted on the canvas so the user can see what changed. The highlight is separate from warning and error states. It is not saved in the
.dynfile, and clearing it does not mark the graph unsavedDynamo does not turn the highlight on. DynamoMCP marks the nodes it touched. A later edit by the user clears the highlight on that node only. An edit that happens while an AI call is still in progress does not change the highlight
A separate PR on DynamoMCP side to follow once this is merged
Changes:
NodeModel.IsRecentlyModifiedByAIstores the highlight. It is ignored by file save and by undoWorkspaceModel.IsAiEditInProgresstells Dynamo that an AI call is in progress. While it is true, a node edit does not clear the highlight. While it is false, a user edit clears it. The flag never turns the highlight onPublicAPI.UnshippedWorkspaceModelTestscover clear-on-user-edit, no change during an AI call, one node only, transient nodes, unsaved state, undo, and file saveDeclarations
Check these if you believe they are true
Release Notes
Nodes created, edited, or moved by an AI assistant are highlighted on the canvas until the user edits them or clears the highlights. The highlight is not saved with the graph.
Reviewers
@DynamoDS/eidos
@jasonstratton
@johnpierson
FYIs
@dnenov