Comfy-Org / Comfy-Org/ComfyUI_frontend
Preserve non-numeric NodeId changes in minimap link digest
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
`computeLinkDigest` converts link endpoint IDs with `Number(...)`. A
non-numeric `NodeId` becomes `NaN`, and `mixIn` maps that value to `0`.
Therefore, different non-numeric endpoint IDs can produce the same digest
term. A link rewire that only changes such endpoint IDs can remain invisible
to interval polling.
## Required change
Update the minimap link digest to mix a deterministic, finite value for every
valid `NodeId`, including non-numeric string IDs. Keep detection for origin
and target slots.
## Affected area
- `src/renderer/extensions/minimap/composables/useMinimapGraph.ts`
(`computeLinkDigest` and any extracted digest helper)
## Rationale
The current behavior avoids resetting the digest accumulator for non-finite
values. It does not distinguish different non-numeric node IDs. The follow-up
should make link rewires between string-ID nodes visible to minimap polling.
## Acceptance criteria
- Different valid non-numeric `NodeId` values contribute distinct,
deterministic digest input in normal cases.
- Rewiring a link between non-numeric node IDs changes the link digest.
- Link slot changes remain detectable.
- Tests cover same-count rewiring that uses non-numeric node IDs.
## Backlinks
- Follow-up to PR #15029:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/15029
- Review discussion:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/15029#discussion_r3778403433
- Requested by @christian-byrne.
Contributor guide
Assessment
This issue has not been assessed yet.