Files
ltdrdata-ComfyUI-Manager/tests
Dr.Lt.Data b76eb11207 v4: Enable a disabled node pack requested through cm-api before restarting (#3526)
When an extension asks through cm.try-install-custom-node for a node
pack that is disabled, the legacy UI asks whether to enable it and
restart. On confirmation it posted to /v2/customnode/toggle_active,
which neither server has, did not look at the answer, and restarted:
ComfyUI came back with the pack still disabled.

- Enable the pack as the Enable button of the Custom Nodes Manager
  does: find its row in /v2/customnode/getlist, post it to
  /v2/manager/queue/batch, and wait for the queue to report the batch
- Restart only when the queue reports success; otherwise show why the
  pack was not enabled
- Leave a queue that is running alone, and tell the user to try again
- End the wait after a minute, or when the queue finishes without the
  batch; left waiting, the handler would restart ComfyUI on a report
  that arrives much later
- Do not restart while other work is queued behind the pack; ask the
  user to restart after it
- Report a request that gets no answer while the pack is being
  enabled; "Enabling..." stayed on screen
- Show "Rebooting..." when the restart request gets no answer, which
  is what happens when ComfyUI restarts; the rejected request ended
  the handler
- Report a restart that is refused at the current security level:
  show_message was not imported, so nothing was shown
- Remove the branch for a pack that is not installed: the server does
  not send this request for one, and the route it posted to is gone
- Leave the queue listener of the Manager menu while the menu has not
  been created; a queue started from here made it raise
- Add browser tests of the handler and of that listener, and a
  CHANGELOG entry

Found while reviewing #3435.

The same change for main is #3525.
2026-11-14 23:41:26 +09:00
..