File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
visual-tree-search-app/components Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {
9595 }
9696
9797 // Handle tree structure updates
98- if ( ( data . type === 'tree_update_node_expansion' || data . type === 'tree_update_node_children_evaluation' )
98+ if ( ( data . type === 'tree_update_node_expansion' || data . type === 'tree_update_node_children_evaluation' || data . typ === 'tree_update_node_backpropagation' )
9999 && Array . isArray ( data . tree ) ) {
100100 // Preserve simulation flags when updating from tree
101101 if ( updatedTreeNodes . some ( node => node . isSimulated ) ) {
@@ -151,11 +151,8 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {
151151
152152 // Handle simulation removal
153153 if ( data . type === 'removed_simulation' ) {
154- // Remove simulation flags instead of removing nodes
155- updatedTreeNodes = updatedTreeNodes . map ( node => ( {
156- ...node ,
157- isSimulated : false // Remove simulation flag
158- } ) ) ;
154+ // Remove all simulated nodes from the tree
155+ updatedTreeNodes = updatedTreeNodes . filter ( node => ! node . isSimulated ) ;
159156
160157 newSimulatedNodes = [ ] ; // Clear simulated nodes list
161158 newSimulationStartNodeId = null ; // Clear simulation start node
You can’t perform that action at this time.
0 commit comments