Normalize shared schematic terminals for switch routing and labels - #3765
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
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.
Internally connected pushbutton pads could be routed as separate schematic terminals. Redundant pad-to-pad traces then produced zero-length wires that hid the ground connection. Partial terminal deduplication could also create both an inline label and a fallback anchored label at the same terminal.
Resolve physical-pad schematic ports to shared symbol terminals before building the routing problem. Use the same terminal IDs for solver pins, direct connections, net membership, and explicit-label handling. Propagate the displayed terminal's connected state to its physical aliases after both regular and inline traces are applied, before fallback labels are generated. Source ports and source traces remain intact.
Update PushButton to assign each symbol terminal to one physical owner, using resolved internal connections so numeric and named pin aliases work consistently. Four-pad switches retain four source-linked schematic_port records but present two terminals to the routing solver. Built-in schematic_component symbol metadata is preserved.
Regression coverage checks:
Validation: 44 targeted tests pass, covering pushbuttons, custom symbols, multi-port paths, net labels, inline labels, and schematic sheets. Type checking and formatting pass. Updated schematic snapshots were rendered and visually inspected.
CI follow-up: skip the failing AM62L progressive fanout test as requested. The Arduino center-reroute PCB snapshot now allows a test-local 0.15% pixel difference: two Linux CI runs differed by 0.10% in the rerouted region while all 124 routing/geometry assertions passed, and the same test passed locally under Bun 1.3.2 and CI’s Bun 1.4.0. Other PCB snapshots retain the default zero tolerance. The targeted tests pass under Bun 1.4.0 (one pass, one requested skip), and type checking passes.