Comfy-Org / Comfy-Org/ComfyUI_frontend
Reconnected input connections are re-shuffled outside the subgraph
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Prerequisites
- [x] I am running the latest version of ComfyUI
- [x] I have searched existing issues to make sure this isn't a duplicate
- [x] I have tested with all custom nodes disabled ([see how](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled))
### What happened?
When we disconnect an input from a node inside a subgraph and connect it again, it should appear at the same position outside the subgraph as it was and is inside the subgraph.
Here's a short video:
https://github.com/user-attachments/assets/72e5f6df-46e7-4445-90e5-7c671013d1d5
Expected behavior: When we disconnect an input from a node inside a subgraph and connect it again, it should appear at the same position outside the subgraph as it was and is inside the subgraph.
### Steps to Reproduce
1. Create a subgraph
2. Enter the subgraph
3. Connect at least 5 - 6 nodes from the input to the nodes
4. Check the order of the connections outside the subgraph
5. Go back inside the subgraph
6. Disconnect a widget from the inputs, by removing the connection at the node
7. If you need to, check outside the subgraph that the widget is gone
8. Go back in, or immediately reconnect the input again by dragging a noodle to the nodes widget input
9. Go outside the subgraph and the reconnected widget will be last in list
### How is this affecting you?
Feature doesn't work as expected
### ComfyUI Frontend Version
1.25.11
### Browser
Chrome/Chromium
### Console Errors
```javascript
```
### Logs
```shell
```
### Additional Context
_No response_
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-5588-Reconnected-input-connections-are-re-shuffled-outside-the-subgraph-26f6d73d365081149cfde209a8616dea) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.