From 9aafb085d7e6974e93383ad7bf77bf04933c7502 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Thu, 7 May 2026 00:27:28 +0200 Subject: [PATCH] Don't draw the predicate-class node alongside fam-resolves matches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The "fam-resolves" chain pulled the predicate class into the instance view as a separate node and connected it to the matched instance with a green "defines" edge — duplicating information already on the matched-instance label. Drop the class anchor + defines edge here, the same way commit 3a8e0ac handled the matched-superclass case. Co-Authored-By: Claude Opus 4.7 (1M context) --- data/viewer.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/data/viewer.js b/data/viewer.js index d35899c..5611f57 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -652,7 +652,11 @@ } // Resolution chain: with the substituted RHS in hand, look for - // a matching class instance of @predClassQn@. + // a matching class instance of @predClassQn@. The matched + // instance's own label already names its class, so we don't + // also pull a class node into the graph alongside it — it + // would just be a redundant box with a green arrow that says + // the same thing. if (predClassQn && resolvedArgs) { const reduced = resolvedArgs.map(reduceTypeArg); const matched = findMatchingInstances(predClassQn, reduced); @@ -661,16 +665,6 @@ m, predClassQn, 'inst:' + m._idx ); - // Make sure the matched instance hangs under its class node - // so the user has a stable place to find it. - const predClsId = ensureClassNode(predClassQn); - const defId = predClsId + '=>' + mId; - if (!seenNodes.has(defId)) { - seenNodes.add(defId); - els.push({ group: 'edges', data: { - id: defId, source: predClsId, target: mId, kind: 'defines', - }}); - } const resId = fiNodeId + '=>resolves=>' + mId; if (!seenNodes.has(resId)) { seenNodes.add(resId); -- 2.54.0