fix: Fix extra net label in repro61, or remove trace (#79)#345
Open
IbrahimLaeeq wants to merge 1 commit into
Open
fix: Fix extra net label in repro61, or remove trace (#79)#345IbrahimLaeeq wants to merge 1 commit into
IbrahimLaeeq wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR fixes net-label-only schematic nets being rendered as connecting traces by ensuring both MSP and long-distance trace generation skip nets that have no explicit direct connections.
Changes:
- Filters MSP queueing to nets that include at least one directly connected pin.
- Skips net-label-only nets during long-distance candidate generation.
- Adds example35 regression coverage and updates affected SVG snapshots.
Reviewed changes
Copilot reviewed 6 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts |
Filters MSP processing to directly wired nets. |
lib/solvers/LongDistancePairSolver/LongDistancePairSolver.ts |
Prevents long-distance traces for net-label-only nets. |
tests/solvers/MspConnectionPairSolver/MspConnectionPairSolver_repro1.test.ts |
Updates expected MSP pair count for skipped label-only net. |
tests/examples/example35.test.ts |
Adds regression assertions for no connecting traces and four labels. |
tests/assets/example35.json |
Adds repro input with two capacitors and label-only nets. |
site/examples/example35.page.tsx |
Adds browser-debug example page. |
tests/examples/__snapshots__/example35.snap.svg |
Adds new regression snapshot. |
tests/examples/__snapshots__/example33.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example31.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example28.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example26.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example24.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example22.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example20.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example16.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example15.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example12.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example10.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example03.snap.svg |
Updates snapshot for changed label-only net rendering. |
tests/examples/__snapshots__/example01.snap.svg |
Updates snapshot for changed label-only net rendering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Fixes #79.
/claim #79
were creating those traces:
MspConnectionPairSolverqueued every net (including net-label-only ones) for trace pairing.LongDistancePairSolvergenerated candidate trace pairs for every net regardless of distance, so even when MSP skipped a far-apart net-label-only pair, this solver reconnected it.Changes
lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts— filterqueuedDcNetIdsto only nets containing at least one pin that has an explicit direct connection.lib/solvers/LongDistancePairSolver/LongDistancePairSolver.ts— skip net-label-only nets when generating candidate pairs.Together these ensure a net made up purely of net-label connections is represented by a separate net label on each pin, never a connecting trace.
Tests
tests/assets/example35.json(the repro61 scenario: two capacitors,GND/VCCnet labels, no direct connections),tests/examples/example35.test.ts(asserts 0 connecting traces and 4 individual net labels, plus a snapshot), andsite/examples/example35.page.tsxfor the browser view.MspConnectionPairSolver_repro1.test.tsexpectation (4 → 2 pairs — the net-label-onlyGNDnet no longer produces MSP pairs).Full suite: 58 pass, 0 fail;
bunx tsc --noEmitclean.Verified against the repository's own test suite before submission.