Skip to content

fix: skip MSP pair creation for net-label-only connections#120

Open
janisag07 wants to merge 1 commit intotscircuit:mainfrom
janisag07:fix-79
Open

fix: skip MSP pair creation for net-label-only connections#120
janisag07 wants to merge 1 commit intotscircuit:mainfrom
janisag07:fix-79

Conversation

@janisag07
Copy link

Problem

When pins are connected only via net labels (netConnections), the solver incorrectly creates MSP pairs and draws traces between them. This results in redundant traces alongside the net labels, as seen in the repro61 scenario (two capacitors with VCC/GND netlabels getting both traces and labels).

Solution

Filter the queued nets in MspConnectionPairSolver so that only nets containing at least one pin with a direct connection (directConnections) produce MSP pairs. Pins connected solely via netConnections now correctly receive only net label placements without redundant traces.

Changes

  • MspConnectionPairSolver.ts: Added filtering logic to skip net-label-only nets when building the MSP pair queue
  • New test: SchematicTracePipelineSolver_repro61.test.ts — verifies that net-label-only connections produce no traces
  • Updated test: MspConnectionPairSolver_repro1.test.ts — updated expectation to reflect correct behavior (GND net-label connections no longer produce MSP pairs)
  • Updated snapshots: 7 SVG snapshots regenerated to reflect the removal of redundant traces

/claim #79
Fixes #79

Net connections (netConnections) represent user-placed net labels that
connect pins by name. These should only produce net labels, not traces.
Previously, the MspConnectionPairSolver created MSP pairs for all nets
including net-label-only connections, resulting in redundant traces
drawn between pins that already had net labels.

This change filters the queued nets so that only nets containing at
least one pin with a direct connection produce MSP pairs. Pins connected
solely via net labels now correctly receive only net label placements.

Fixes tscircuit#79
@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Feb 17, 2026 2:05pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix extra net label in repro61, or remove trace

1 participant