Let drill-in work on external classes that have local instances
drillInto used to gate on classById.has(n.id()) and silently fall
through to highlightOnly when the double-clicked class wasn't
locally defined. That's the wrong call when the class is external
but instances of it *are* in our dumps (orphan-style, or because
the package defining the instances was extracted while the package
defining the class wasn't) — there's still a useful instance view
to render.
Two changes:
* drillInto now drills in whenever the class is locally defined OR
has at least one entry in instancesByClass. When neither is true
(truly nothing to show), it console.warns with the qid so you can
diagnose why your double-click did nothing.
* buildInstanceView synthesises a minimal ClassInfo from the first
matching instance's iiClass when classById misses, so the rest of
the build pipeline (which needs ciSuperclasses, ciAssocTypes,
ciTyVars …) keeps working with empty defaults. The focused-class
node ends up as an external-styled stub but the per-instance
rendering — contexts, superclass requirements, fam-instances — is
all there.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>