rgthree-comfy icon indicating copy to clipboard operation
rgthree-comfy copied to clipboard

fix fast-groups toggle + widget sync in frontend (fast_actions/fast_groups_muter)

Open tlennon-ie opened this issue 6 months ago • 0 comments

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 the FastGroupsToggleRowWidget boolean accessor widget.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.toggled if present, fallback to widget.value) in fast_groups_muter.js.
  • Prefer calling node.handleAction(action) from the Fast Actions button if the node implements it. After calling handleAction, 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

brave_GKbr9RIbdK

tlennon-ie avatar Oct 09 '25 11:10 tlennon-ie