git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commita37295327815c537d8bb9c93907dd74324f199c8
parentb555276d45
authorLucas Galante <[email protected]>
date2026-08-24 15:26
fix: MCP select refreshes the spreadsheet pane like a click does

The Select action set the graph selection and synced the parameter pane
but never called sync_nodes, which owns the spreadsheet refresh (a real
click reaches it via process_window_event's changed-path, which the MCP
apply_action route bypasses). A visible spreadsheet stayed empty after
'select' until a pointer click on the node.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/window.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/window.rs b/src/window.rs
index 54ea2e9..81913d2 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -684,9 +684,12 @@ impl State {
             McpAction::Select { slot } => {
                 if slot < state.current_dir().children.len() {
                     // Same effect as clicking the node: it becomes the selected node and
-                    // its params populate the parameter pane.
+                    // its params populate the parameter pane. A click also reaches
+                    // sync_nodes via process_window_event's changed-path, which is
+                    // what refreshes the spreadsheet — this path must call it itself.
                     state.graph_mut().set_selected_node(Some(slot));
                     state.sync_parameters_pane();
+                    state.sync_nodes();
                     needs_redraw = true;
                     Ok("Node selected".to_string())
                 } else {