From b3821ee2c065c9343f59a100ad66224ac0248da0 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Thu, 7 May 2026 01:18:12 +0200 Subject: [PATCH] Mention package + module in external-class panel description MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The "External (not defined in this program)" status line was informationless — the QualName already carried the package and module the class came from. Surface them in the description with a hint that the user can extend their plugin run to capture the class locally if that data would be useful. Co-Authored-By: Claude Opus 4.7 (1M context) --- data/viewer.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/data/viewer.js b/data/viewer.js index 4e20c6d..677aaf5 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -1686,12 +1686,34 @@ } function renderExternalClassPanel(d) { + const pkg = d.package || ''; + const mod = d.module || ''; + // Build the most informative description we can from whatever + // package/module info the dump preserved. The plugin records both + // for every QualName, so for a normal external reference both are + // present. + let status; + if (pkg && mod) { + status = `Defined in module ${escape(mod)} ` + + `(package ${escape(pkg)}) — not extracted by ` + + `the plugin in this program. Add the package to your ` + + `plugin run if you'd like its instances and superclasses ` + + `to surface here.`; + } else if (mod) { + status = `Defined in module ${escape(mod)} — not ` + + `extracted by the plugin in this program.`; + } else if (pkg) { + status = `Defined in package ${escape(pkg)} — not ` + + `extracted by the plugin in this program.`; + } else { + status = `Referenced but not extracted by the plugin in this program.`; + } return `

${escape(d.label)}

-

${escape(d.package || '')} · ${escape(d.module || '')}

+

${escape(pkg)} · ${escape(mod)}

${panelButtons(d.id, { canPin: false, canMute: true })}
-
Status
External (not defined in this program)
+
Status
${status}
`; } -- 2.54.0