Fix Rule Builder Node Transformation Reactivity#169
Conversation
- Replaced deep mutation with atomic `.map()` update in `ActionZone.vue` to ensure Vue 3 reactivity correctly triggers on node type changes. - Increased node ID length from 4 to 8 characters in `schema_utils.js` to prevent collisions during rapid scaffolding. - Ensured terminal action cleanup is applied atomically during node upgrade.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Fixed issue where scaffolded placeholder nodes (e.g., inside Loop body) failed to transform into real actions upon clicking 'Create'. - Replaced deep object mutation with atomic `store.nodes.splice` in `ActionZone.vue` to ensure Pinia and Vue Flow correctly detect the type transformation. - Increased node ID length from 4 to 8 characters in `schema_utils.js` to reduce collision risks during rapid node scaffolding. - Added `upgrade_selector_node` utility to `useGraphStore` for future programmatic node transformations. - Ensured terminal action cleanup (removing outgoing edges) is applied correctly during transformation.
Fixed a critical bug where adding an action node within a Loop (or other scaffolded contexts) failed to transform from a placeholder to the selected action type.
Key technical improvements:
Array.prototype.spliceand in-place property mutations to an atomic.map()reassignment for thenodesarray in the Pinia store. This ensures that Vue 3's reactivity system and Vue Flow's internal watchers correctly detect and propagate the structural change of the node.generateShortIdto produce 8-character IDs instead of 4. This significantly reduces the risk of ID collisions when the builder programmatically scaffolds multiple nodes simultaneously (e.g., during Loop body creation).PR created automatically by Jules for task 7133967333703839786 started by @Sendipad