Skip to content

test: repro #655 — net labels are placed inside chip bodies#705

Closed
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:repro/655-labels-inside-chips
Closed

test: repro #655 — net labels are placed inside chip bodies#705
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:repro/655-labels-inside-chips

Conversation

@DPS0340

@DPS0340 DPS0340 commented Jul 24, 2026

Copy link
Copy Markdown

Reproduction PR for #655, following the repo's repro-first workflow.

Pins the current behavior on bug-report-20260707T230831Z (already in the repo): the VIN, PG, VOUT and U1.FB to R2.pin1 net labels end up 100% inside chip bodies, rendering behind the components and illegible.

Root cause (as noted in the issue): NetLabelNetLabelCollisionSolver.findNextCollidingPair only looks for label-label overlaps, so a label inside a chip that isn't also colliding with another label is never relocated. A second layer: several chips on this board overlap each other, so a pin can be covered by another chip's body — port-only labels anchored on such pins collide in every orientation, meaning a fix also needs an anchor-escape strategy, not just a chip-collision pass.

The test asserts exactly the four buried labels, so a fix flips the assertion to .toEqual([]).

Proposed fix in #699 (separate PR): chip-collision relocation pass + outward anchor sliding for port-only labels. Verified there against all 21 bug-report boards (5 boards with buried labels on main → 0). Happy to rebase #699 on this repro once it lands.

Pins the current behavior on bug-report-20260707T230831Z: the VIN, PG,
VOUT and 'U1.FB to R2.pin1' net labels all end up 100% inside chip
bodies, rendering behind the components.

NetLabelNetLabelCollisionSolver only relocates labels that overlap
another label; a label inside a chip without a label-label collision is
never checked against chips. Several chips on this board also overlap
each other, so port-only labels anchored on covered pins collide in
every orientation at their pin anchor.

A fix should flip the assertion to .toEqual([]).
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Jul 24, 2026 11:13am

Request Review

@DPS0340

DPS0340 commented Jul 25, 2026

Copy link
Copy Markdown
Author

Superseded by #699, which contains this same regression test (tests/repros/repro-net-label-inside-chip-655.test.ts) plus the actual fix. Closing this so #699 is the single PR to review for #655.

@DPS0340 DPS0340 closed this Jul 25, 2026
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.

1 participant