Fix Rendering Regression and Race Conditions in RuleConfigModal#218
Fix Rendering Regression and Race Conditions in RuleConfigModal#218ruzaqiarkan-eng wants to merge 1 commit into
Conversation
- Added `deepClone` utility in `serialization.js` to preserve `undefined` values and nested structures. - Replaced reactivity-breaking `JSON.parse(JSON.stringify())` with `deepClone` across rule configuration flow. - Refactored `useRuleConfig` to capture baseline state immediately, removing a 1000ms race condition. - Ensured `useActionConfig` internal updates don't trigger global dirty state for draft nodes. - Improved state hydration stability across all action types.
|
👋 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. |
This PR fixes a critical rendering regression in the
RuleConfigModalwhere existing action parameters failed to populate in form fields.Key changes:
deepCloneutility inserialization.jsthat usesstructuredClone(with recursive fallback). This replaces the previousJSON.parse(JSON.stringify())pattern which was stripping awayundefinedvalues and breaking Vue's reactivity proxies.setTimeoutinuseRuleConfig.jsused for capturing the initial state. The baseline for dirty checking is now captured immediately upon draft creation, ensuring synchronization with child component lifecycles.AssignmentConfig,ConditionBuilder, and various custom controls to use the new cloning utility, restoring the reactivity chain for complex configuration objects.useActionConfigto distinguish between draft node updates and global graph updates, preventing the modal from appearing "dirty" prematurely during initial field setup.These changes ensure that saved rule parameters are correctly hydrated and visually rendered when opening any action node in the builder.
PR created automatically by Jules for task 998574914326561075 started by @ruzaqiarkan-eng