Prevent explicit netlabels from expanding into long schematic traces#685
Open
rushabhcodes wants to merge 4 commits into
Open
Prevent explicit netlabels from expanding into long schematic traces#685rushabhcodes wants to merge 4 commits into
rushabhcodes wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rushabhcodes
marked this pull request as ready for review
July 20, 2026 07:52
rushabhcodes
requested review from
a team,
Abse2001,
MustafaMulla29,
ShiboSoftwareDev,
imrishabh18 and
seveibar
July 20, 2026 08:31
MustafaMulla29
left a comment
Contributor
There was a problem hiding this comment.
The repro you merged was with manual netlabels and trace solver doesn't know about manual netlabels. I think auto netlabels won't have the same outcome
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.
Summary
preExistingNetLabelPinIdsto the schematic trace solver inputRoot cause
Normal MSP routing correctly rejects these connections because they exceed
maxMspPairDistance. The long-distance fallback then reconnects the same endpoints with full-width schematic traces because it has no knowledge that one side is already represented by an explicit netlabel. Automatic netlabels are added later, but the unnecessary routes remain.The new input field carries that intent into the solver. Long-distance candidates touching an explicitly labeled pin remain separate net islands, allowing the remaining endpoints to terminate at automatic netlabels without drawing wires across the schematic.
Cross-repository reproduction
The user-facing regression is reproduced in tscircuit/core#2725.
This PR also includes a minimal solver-level regression test and verifies that unlabeled endpoints still retain clear long-distance routes.
Before and after
The dashed lines are connectivity guides in the solver visualization. The solid full-width routes visible before the fix are no longer emitted afterward.
Validation
bun test tests/repros/repro152-explicit-netlabels-long-traces.test.ts tests/solvers/SchematicTracePipelineSolver tests/solvers/MspConnectionPairSolver tests/solvers/NetLabelPlacementSolverbunx tsc --noEmit