From: Javier Sagredo Date: Wed, 6 May 2026 22:27:58 +0000 (+0200) Subject: Shorten "superclass needed Foo a b" edge label to "superclass constraint" X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=b9ded704fdf40c71602befef596d59d8a7465401;p=classgraph.git Shorten "superclass needed Foo a b" edge label to "superclass constraint" 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) --- diff --git a/data/viewer.js b/data/viewer.js index 5611f57..3379ef9 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -763,8 +763,11 @@ // 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