Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

refactor: deduplicate edge type name/color mappings via EdgeTypeRegistry - #132

Merged
sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/deduplicate-edge-type-mappings
Mar 30, 2026
Merged

sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/deduplicate-edge-type-mappings

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Summary

Replace hardcoded edge type name and color switch statements in 4 files with calls to the existing \EdgeTypeRegistry.

Files changed

  • AdjacencyMatrixHeatmap.java — \getEdgeTypeName()\ now delegates to \EdgeTypeRegistry.getName()\
  • InteractiveHtmlExporter.java — \ ypeName()\ and \ ypeColor()\ now use the registry
  • SvgExporter.java — \TYPE_COLORS\ and \TYPE_NAMES\ maps now populated from registry
  • NetworkReportGenerator.java — edge type arrays built from registry instead of hardcoded

Why

Adding a new edge type previously required updating 5+ files. Now only \EdgeTypeRegistry\ needs to change.

-41 lines, +18 lines — net reduction of 23 lines of duplicated mappings.

Replace hardcoded edge type name and color switch statements in
AdjacencyMatrixHeatmap, InteractiveHtmlExporter, SvgExporter, and
NetworkReportGenerator with calls to the existing EdgeTypeRegistry.

This eliminates 5 copies of the type-to-name mapping and 3 copies of
the type-to-color mapping. Adding a new edge type now requires updating
only EdgeTypeRegistry instead of 5+ files.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added visualization Graph visualization and UI size/m labels Mar 28, 2026
@sauravbhattacharya001
sauravbhattacharya001 merged commit 99713db into master Mar 30, 2026
4 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/m visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant