]> Repositorios git - classgraph.git/commitdiff
Shorten "superclass needed Foo a b" edge label to "superclass constraint"
authorJavier Sagredo <[email protected]>
Wed, 6 May 2026 22:27:58 +0000 (00:27 +0200)
committerJavier Sagredo <[email protected]>
Wed, 6 May 2026 23:51:06 +0000 (01:51 +0200)
The class + arg shape is already on the target node (matched instance,
or — after the next commit — a predicate node), so spelling it out on
the edge label was redundant. Plain "superclass constraint" describes
the relationship the edge depicts and lets the eye stay on the nodes.

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

index 5611f57d887b6bde5f89cd5e3ac83e89a26f7c6b..3379ef9685373e17a517978da1454050b71488c4 100644 (file)
         // Direct-match path uses the reduced args as before.
         const reqArgs = subbedArgs.map(reduceTypeArg);
         const matched = findMatchingInstances(sc.seSuperclass, reqArgs);
-        const reqLabel = 'superclass needed ' + sc.seSuperclass.qnName + ' ' +
-          renderArgsCompact(reqArgs, inst.iiTyVars);
+        // Edge label: just "superclass constraint". The target node
+        // (matched instance, or — after task #4 — a predicate node)
+        // carries the class + arg shape, so naming the class on the
+        // edge would just duplicate it.
+        const reqLabel = 'superclass constraint';
 
         if (matched.length === 0) {
           // No instance found in our data; link to the superclass class