Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions visual-tree-search-app/components/LATSVisual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {
}

// Handle tree structure updates
if ((data.type === 'tree_update_node_expansion' || data.type === 'tree_update_node_children_evaluation')
if ((data.type === 'tree_update_node_expansion' || data.type === 'tree_update_node_children_evaluation' || data.typ === 'tree_update_node_backpropagation')
&& Array.isArray(data.tree)) {
// Preserve simulation flags when updating from tree
if (updatedTreeNodes.some(node => node.isSimulated)) {
Expand Down Expand Up @@ -151,11 +151,8 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {

// Handle simulation removal
if (data.type === 'removed_simulation') {
// Remove simulation flags instead of removing nodes
updatedTreeNodes = updatedTreeNodes.map(node => ({
...node,
isSimulated: false // Remove simulation flag
}));
// Remove all simulated nodes from the tree
updatedTreeNodes = updatedTreeNodes.filter(node => !node.isSimulated);

newSimulatedNodes = []; // Clear simulated nodes list
newSimulationStartNodeId = null; // Clear simulation start node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def remove_simulated_trajectory(self, starting_node, terminal_node: LATSNo
}
trajectory_data.append(node_data)

await self.websocket_simulation_removed(trajectory_data, websocket=None)
await self.websocket_simulation_removed(trajectory_data, websocket=websocket)
pass

def _get_trajectory_data(self, terminal_node: LATSNode):
Expand Down