Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix edge pair validation for hyphenated node names#309

Open
chaochaoweb3 wants to merge 2 commits into
antvis:mainantvis/mcp-server-chart:mainfrom
chaochaoweb3:codex/fix-edge-pair-validationchaochaoweb3/mcp-server-chart:codex/fix-edge-pair-validationCopy head branch name to clipboard
Open

Fix edge pair validation for hyphenated node names#309
chaochaoweb3 wants to merge 2 commits into
antvis:mainantvis/mcp-server-chart:mainfrom
chaochaoweb3:codex/fix-edge-pair-validationchaochaoweb3/mcp-server-chart:codex/fix-edge-pair-validationCopy head branch name to clipboard

Conversation

@chaochaoweb3

Copy link
Copy Markdown

Summary

  • Use a structured edge-pair key when validating node-edge chart data.
  • Add a regression test covering node names that contain hyphens.

Why

The validator currently builds edge uniqueness keys with ${source}-${target}. This collides for different edge pairs when node names themselves contain hyphens, for example a-b -> c and a -> b-c both become a-b-c. Those valid inputs are rejected as duplicate edges.

Validation

  • npm test -- --run __tests__/utils/validator.spec.ts (3 passed)
  • npm test -- --run (44 passed)
  • npm run build
  • npx biome check __tests__/utils/validator.spec.ts src/utils/validator.ts
  • git diff --check

@chaochaoweb3
chaochaoweb3 marked this pull request as ready for review June 3, 2026 08:13

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the node-edge validator to correctly distinguish edge pairs when node names contain hyphens, replacing the hyphen-delimited string key with a JSON-stringified array and adding a test case. The reviewer suggests optimizing this by using a null character (\0) delimiter instead of JSON.stringify to avoid unnecessary CPU and memory overhead in the loop.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/utils/validator.ts Outdated
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.