]> Repositorios git - classgraph.git/commitdiff
Drop the instance → fam-instance "= (Rhs)" edge
authorJavier Sagredo <[email protected]>
Wed, 6 May 2026 22:14:26 +0000 (00:14 +0200)
committerJavier Sagredo <[email protected]>
Wed, 6 May 2026 23:51:06 +0000 (01:51 +0200)
The dotted-purple edge from a focused instance to its associated
fam-instance carried only the RHS label, which the fam-instance
node's own label already shows in full. Removing it cleans up the
instance view; the fam-instance still surfaces because the family
node points at it via fam-defines, which is enough to indicate the
context relevance.

Also drop the now-dead cytoscape style rule and the legend row.

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

index 423e00107ea9762e4bdd07e1c1d29c3fc7a1be2b..e7825898061b45338fbe0ee9d0137bc8d001b563 100644 (file)
@@ -52,7 +52,6 @@
           <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 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>
 
           <h4>Controls</h4>
index 45d1fd322197a2102c18fa919066e350756d4c5e..d35899c6d42e17bd9ac34c266cbf1615e828530b 100644 (file)
           if (!matchArgs(fi.fiArgs, inst.iiArgs)) continue;
           const famNodeId = ensureFamilyNode(famQn);
           const fiNodeId  = ensureFamInstanceNode(fi);
-          // Family -> fam-instance: this family is defined here.
+          // Family -> fam-instance: this family is defined here. We
+          // *don't* draw an instance → fam-instance edge any more
+          // (the old "= (Rhs)" purple-dotted line) — it was redundant
+          // with the fam-instance node's own label and visually busy.
+          // The fam-instance still surfaces in the graph through this
+          // family link, so the user can see it's relevant.
           const linkId = famNodeId + '=>' + fiNodeId;
           if (!seenNodes.has(linkId)) {
             seenNodes.add(linkId);
               id: linkId, source: famNodeId, target: fiNodeId, kind: 'fam-defines',
             }});
           }
-          // Instance -> fam-instance: this instance carries this assoc rhs.
-          els.push({ group: 'edges', data: {
-            id: instId + '#assoc#' + fi._idx,
-            source: instId,
-            target: fiNodeId,
-            kind: 'assoc-rhs',
-            label: '= ' + renderArg(fi.fiRhs, fi.fiTyVars),
-          }});
         }
       });
 
           width: 1.4,
         },
       },
-      // Instance view: assoc-rhs (instance -> fam-instance node)
-      {
-        selector: 'edge[kind = "assoc-rhs"]',
-        style: {
-          'line-color': '#a78bfa',
-          'target-arrow-color': '#a78bfa',
-          'line-style': 'dotted',
-          width: 1.4,
-        },
-      },
       // Family/instance view: fam-defines (family -> fam-instance node)
       {
         selector: 'edge[kind = "fam-defines"]',