Skip to content

fix(core): prevent duplicate graph node IDs from crashing graph views - #610

Open
KumamuKuma wants to merge 4 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/issue-536-duplicate-node-ids
Open

fix(core): prevent duplicate graph node IDs from crashing graph views#610
KumamuKuma wants to merge 4 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/issue-536-duplicate-node-ids

Conversation

@KumamuKuma

Copy link
Copy Markdown
Contributor

Summary

  • deduplicate valid graph nodes at the validateGraph boundary, preserving the first valid node and reporting later duplicates as dropped
  • route structural function and class nodes through the existing guarded child insertion path so duplicate nodes and contains edges are skipped together
  • cover the Java overload path from extraction through graph construction

Root cause

Java overloads are correctly emitted as separate structural entries, but GraphBuilder derives node IDs from only the file path and bare method name. The legacy structural loops inserted every entry without checking the shared ID set. validateGraph then accepted every schema-valid duplicate, allowing repeated React Flow node IDs/keys to reach the third-level expansion and crash React reconciliation on click.

This hotfix intentionally keeps the existing name-based ID schema and applies deterministic first-wins behavior. Representing every overload separately would require a broader signature/owner ID migration and call-edge compatibility work.

Validation

  • pnpm lint
  • core, skill, and viewer/dashboard production builds
  • focused regression tests: 116 passed
  • full core suite: 974 passed
  • root/dashboard/skill suite with one Windows worker: 487 passed, 7 skipped
  • Python merge/knowledge suite: 95 passed, 1 skipped

Fixes #536

@KumamuKuma

Copy link
Copy Markdown
Contributor Author

@Lum1104 Please help check this pr, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 点击三级节点时黑屏

1 participant