Skip to content

Make graph node size scale with visible node count#775

Merged
Shashankss1205 merged 1 commit intoCodeGraphContext:mainfrom
zeel2104:fix/node-size-visible-count
Mar 30, 2026
Merged

Make graph node size scale with visible node count#775
Shashankss1205 merged 1 commit intoCodeGraphContext:mainfrom
zeel2104:fix/node-size-visible-count

Conversation

@zeel2104
Copy link
Copy Markdown
Contributor

Summary

Updates the graph viewer so node size scales with the number of visible nodes.

What changed

  • Added a clamped logarithmic scaling heuristic based on visible node count
  • Kept existing per-node val weighting intact
  • Preserved the manual node size slider as an additional multiplier
  • Switched the "massive graph" check to use visible nodes instead of total raw nodes

Heuristic

clamp(1 + Math.log10(totalNodes) * 0.22, 1, 2)

Verification

  • Ran npm install
  • Ran npm run build

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 30, 2026

@zeel2104 is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205
Copy link
Copy Markdown
Collaborator

Looks good to me @zeel2104 Thanks! Join the discord for contributing to more such issues.

@Shashankss1205 Shashankss1205 merged commit 4d5df21 into CodeGraphContext:main Mar 30, 2026
1 check failed
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