]> Repositorios git - classgraph.git/commitdiff
Remove the "via Bar" instance → family edge
authorJavier Sagredo <[email protected]>
Wed, 6 May 2026 22:12:43 +0000 (00:12 +0200)
committerJavier Sagredo <[email protected]>
Wed, 6 May 2026 23:51:06 +0000 (01:51 +0200)
The dashed light-purple arrow connecting an instance to a referenced
type family was visually opaque — readers couldn't tell what
relationship it depicted. Drop it from addFamilyLinksFromArgs along
with its cytoscape style rule and the help-legend row.

The fam-instance nodes the function surfaces and the fam-resolves
chain edges remain — those are the meaningful continuations from the
matched-superclass-instance node.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
data/viewer.html
data/viewer.js

index e83979df1e9f555e26bba14c6c8d984737f77968..423e00107ea9762e4bdd07e1c1d29c3fc7a1be2b 100644 (file)
@@ -51,7 +51,6 @@
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dotted purple"></span></span><span>Context constraint required by this instance</span></div>
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge solid amber"></span></span><span>Instance needs a superclass instance (matched locally)</span></div>
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dashed gray"></span></span><span>Needs a superclass instance (no local match)</span></div>
-          <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dashed violet-light"></span></span><span>Instance references this type family</span></div>
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge solid violet"></span></span><span>Family → one of its type family instances</span></div>
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dotted violet"></span></span><span>Instance's associated <code>type instance</code> RHS</span></div>
           <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dotted teal"></span></span><span>Type family instance resolves to a class instance (chain)</span></div>
index 2ea384eba37d34ab427043180061407908c0b140..fceca61fb0555292b1e6011acf0e13eb9b8a9983 100644 (file)
     //   focused-instance  →  family  →  concrete fam-instance  →  Eq instance
     // visible as one path instead of two unrelated arrows.
     function addFamilyLinksFromArgs(args, originId, edgeTag, predClassQn) {
+      // The "via Bar" arrow that used to connect @originId@ → family
+      // was removed (its meaning wasn't obvious). The function's
+      // remaining job is to surface fam-instance nodes plus the
+      // resolution chain that ends at a matching class instance.
       const fams = collectFamilyRefs(args);
       for (const fa of fams) {
         const famNodeId = ensureFamilyNode(fa);
-        const linkId = originId + '#viafam#' + edgeTag + '#' + famNodeId;
-        if (!seenNodes.has(linkId)) {
-          seenNodes.add(linkId);
-          els.push({ group: 'edges', data: {
-            id: linkId,
-            source: originId,
-            target: famNodeId,
-            kind: 'via-family',
-            label: 'via ' + fa.qnName,
-          }});
-        }
         // Surface only the type family instances whose LHS *can* describe
         // the focused instance's family-app — anything else is unrelated
-        // noise (e.g. `TxIn ByronBlock` while looking at a Shelley
-        // instance). Run the relevance check *before* creating the
+        // noise. Run the relevance check *before* creating the
         // fam-instance node so irrelevant rows are skipped entirely.
         for (const fi of (famInstsByFamily.get(famNodeId) || [])) {
           let resolvedArgs = null;
           width: 1.4,
         },
       },
-      // Instance view: via-family (instance -> family node, indicating the
-      // constraint mentions a type family that must be defined elsewhere).
-      {
-        selector: 'edge[kind = "via-family"]',
-        style: {
-          'line-color': '#c084fc',
-          'target-arrow-color': '#c084fc',
-          'line-style': 'dashed',
-          width: 1.2,
-          'font-size': 9,
-        },
-      },
       // Family/instance view: fam-defines (family -> fam-instance node)
       {
         selector: 'edge[kind = "fam-defines"]',