Fix: Rename updated only on graph #11

Open
tymurbaniak wants to merge 1 commits from claude/issue-10 into main
Owner

Summary

Fixes #10 — when a user renames a graph node via the context menu, the corresponding tree node in the sidebar was not updated.

What changed

  • TreeStore.tsx: Added a rename(nodeId, newName) action that finds the tree node by ID and updates its title in the flat map, then rebuilds the tree.
  • NodeRenameModal.tsx: After updating the graph node label, now also calls renameTreeNode(nodeId, newName) from the tree store to keep both in sync.

Why

Tree nodes stored the node name only at creation time. The rename modal only updated node.label in GraphModel but never touched TreeStore, causing the sidebar tree to display stale names while the graph showed the updated name.

Notes

  • If a node has no subgraph (and therefore no tree entry), rename is a no-op — it safely returns the existing state.

🤖 Generated with Claude Code

## Summary Fixes #10 — when a user renames a graph node via the context menu, the corresponding tree node in the sidebar was not updated. ## What changed - **`TreeStore.tsx`**: Added a `rename(nodeId, newName)` action that finds the tree node by ID and updates its `title` in the flat map, then rebuilds the tree. - **`NodeRenameModal.tsx`**: After updating the graph node label, now also calls `renameTreeNode(nodeId, newName)` from the tree store to keep both in sync. ## Why Tree nodes stored the node name only at creation time. The rename modal only updated `node.label` in `GraphModel` but never touched `TreeStore`, causing the sidebar tree to display stale names while the graph showed the updated name. ## Notes - If a node has no subgraph (and therefore no tree entry), `rename` is a no-op — it safely returns the existing state. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tymurbaniak added 1 commit 2026-03-31 07:26:40 +00:00
This pull request has changes conflicting with the target branch.
  • src/stores/TreeStore.tsx
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/issue-10:claude/issue-10
git checkout claude/issue-10
Sign in to join this conversation.