Skip to content

Normalize shared schematic terminals for switch routing and labels - #3765

Merged
seveibar merged 5 commits into
mainfrom
fix/shared-symbol-terminal-traces
Sep 9, 2026
Merged

Normalize shared schematic terminals for switch routing and labels#3765
seveibar merged 5 commits into
mainfrom
fix/shared-symbol-terminal-traces

Conversation

@seveibar

@seveibar seveibar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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:

  • Exactly one BOOT inline label and one GND label, visible wires, two solver terminals, and correct physical-port positions/directions.
  • Numeric and named aliases, reversed internal-pair ordering, rotations, and explicit anchored labels.
  • A resistor-to-switch trace path through both redundant pads retains its external connection and its three source endpoints.

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.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tscircuit-core-benchmarks Ready Ready Preview Sep 8, 2026 7:38pm UTC

Request Review

@seveibar seveibar changed the title Fix missing schematic net labels for shared switch terminals Normalize shared schematic terminals for switch routing and labels Sep 8, 2026
@seveibar
seveibar merged commit 616681a into main Sep 9, 2026
17 checks passed
@seveibar
seveibar deleted the fix/shared-symbol-terminal-traces branch September 9, 2026 01:20
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants