From 929d3c937809099406b49c2e2eb181c8e49c6f14 Mon Sep 17 00:00:00 2001 From: MichaelSNelson Date: Fri, 13 Feb 2026 15:08:35 -0600 Subject: [PATCH] Add weighted edges, cycle detection, and edge hover tooltips - computeModuleEdgeWeight: counts cross-module calls via class_deps and function call graphs for edge thickness scaling - computeEdgeWidth: log-scaled width from weight data - detectCycles: Tarjan's SCC algorithm on visible edges - getCycleColors: generates N hues maximally distant from current theme palette for cycle group coloring - Cycle edges get diamond mid-markers and colored borders on nodes - Edge hover tooltip shows weight count and/or cycle status - Weighted and Cycles checkboxes in Edges sidebar section Co-Authored-By: Claude Opus 4.6 --- src/codezoom/renderer/template.html | 355 +++++++++++++++++++++++++++- 1 file changed, 353 insertions(+), 2 deletions(-) diff --git a/src/codezoom/renderer/template.html b/src/codezoom/renderer/template.html index ef62fbd..7dc8c1d 100644 --- a/src/codezoom/renderer/template.html +++ b/src/codezoom/renderer/template.html @@ -453,6 +453,21 @@ color: var(--text-primary); width: 100%; } + + #edge-tooltip { + position: fixed; + display: none; + padding: 4px 8px; + background: var(--bg-secondary); + color: var(--text-primary); + border: 1px solid var(--border-color); + box-shadow: 0 2px 6px var(--shadow-color); + font-size: 12px; + border-radius: 4px; + pointer-events: none; + white-space: nowrap; + z-index: 1000; + } @@ -580,6 +595,14 @@

Uses + + @@ -608,6 +631,7 @@

+