rgthree-comfy
rgthree-comfy copied to clipboard
fix fast-groups toggle + widget sync in frontend (fast_actions/fast_groups_muter)
Summary
This PR fixes a frontend bug in the RGTHREE custom nodes where the "Fast Actions" button and the "Fast Groups" widgets would not reliably toggle group enable/bypass state (the button seemed to toggle only once or behave directionally). The issue was caused by a mix of:
- reading widget boolean state from
widget.value(an object) instead of theFastGroupsToggleRowWidgetboolean accessorwidget.toggled, - and not always letting nodes handle their own action via
handleAction, which can lead to stale UI widget state unless a recompute/refresh is run afterwards.
Changes
- Normalize widget boolean reads (use
widget.toggledif present, fallback towidget.value) infast_groups_muter.js. - Prefer calling
node.handleAction(action)from the Fast Actions button if the node implements it. After callinghandleAction, force a widget refresh and schedule the fast-groups service recompute to ensure UI state and internal group caches are synchronized.
Files changed
- custom_nodes/rgthree-comfy/web/comfyui/fast_groups_muter.js
- custom_nodes/rgthree-comfy/web/comfyui/fast_actions_button.js
Testing
- Manual: Verified locally that Toggle/Enable/Bypass now flips groups back-and-forth reliably with
toggleRestriction = "always one". See gif animation of the button working on latest comfyui version as of today