Exchange hierarchical instances between najaeda and the viewer - #11
Merged
Merged
Conversation
najaeda -> viewer: Schematic.show_instance(inst | "u1/u2" | [names]) (and show(instance=...)) pushes focus_instance. The viewer resolves the path with a new resolve_instance request, implemented by both providers (protocol.py and LocalSNLProvider), and then: - reveals the instance in the tree, loading each level's Instances/ Primitives group on demand (NetlistTree::reveal/advanceReveal); - selects it and shows its properties; - clears the schematic and draws the instance alone with every pin open, ready to be extended pin by pin (EquipotentialView::showInstance). viewer -> najaeda: the viewer now has one selected instance (SelectionStore). Clicking an instance row in the tree or a box/frame body in the schematic selects it, and both views draw it highlighted; a selection made in the schematic or by the host is revealed in the tree. Each change sends an instance_selected notification. The widget exposes it as Schematic.selected (a najaeda netlist.Instance) and through on_select(). Also: an instance's pins now carry the instance's own id path (MInst.pathIds) instead of copying the first shown pin's, so a box with no shown net yet still addresses its pins correctly. Tests: SelectionTest (store, tree reveal driven by the load requests it sends, reveal-on-render), EquipotentialViewTest (start instance drawn with open pins, its pin requests, box-click selection), and Python protocol and widget tests for resolve_instance, focus_instance, show_instance, selected and on_select. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xtofalex
added a commit
that referenced
this pull request
Sep 29, 2026
Exchange hierarchical instances between najaeda and the viewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
najaeda -> viewer: Schematic.show_instance(inst | "u1/u2" | [names]) (and show(instance=...)) pushes focus_instance. The viewer resolves the path with a new resolve_instance request, implemented by both providers (protocol.py and LocalSNLProvider), and then:
viewer -> najaeda: the viewer now has one selected instance (SelectionStore). Clicking an instance row in the tree or a box/frame body in the schematic selects it, and both views draw it highlighted; a selection made in the schematic or by the host is revealed in the tree. Each change sends an instance_selected notification. The widget exposes it as Schematic.selected (a najaeda netlist.Instance) and through on_select().
Also: an instance's pins now carry the instance's own id path (MInst.pathIds) instead of copying the first shown pin's, so a box with no shown net yet still addresses its pins correctly.
Tests: SelectionTest (store, tree reveal driven by the load requests it sends, reveal-on-render), EquipotentialViewTest (start instance drawn with open pins, its pin requests, box-click selection), and Python protocol and widget tests for resolve_instance, focus_instance, show_instance, selected and on_select.