Skip to content

feat(solver): add SameNetTraceMergeSolver pipeline phase#436

Open
sucloudflare wants to merge 4 commits into
tscircuit:mainfrom
sucloudflare:feat/same-net-trace-merge-solver
Open

feat(solver): add SameNetTraceMergeSolver pipeline phase#436
sucloudflare wants to merge 4 commits into
tscircuit:mainfrom
sucloudflare:feat/same-net-trace-merge-solver

Conversation

@sucloudflare
Copy link
Copy Markdown

Closes #29

Adds SameNetTraceMergeSolver as a new pipeline phase between TraceCleanupSolver and NetLabelPlacementSolver. Finds collinear segments from different traces on the same net (same axis, fixed coordinate within 0.05 units) and snaps them to the same coordinate, eliminating visual double-lines.

5 unit tests passing. TypeScript compiles clean.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 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 May 30, 2026 3:27am

Request Review

Adds a new phase between TraceCleanupSolver and NetLabelPlacementSolver
that finds collinear same-net segments across different traces and snaps
them to the same axis coordinate, eliminating visual double-lines.

- New: lib/solvers/SameNetTraceMergeSolver/SameNetTraceMergeSolver.ts
- Updated: SchematicTracePipelineSolver to include new phase
- Tests: 5 passing unit tests covering merge/no-merge cases

Closes tscircuit#29
@sucloudflare
Copy link
Copy Markdown
Author

The failing Bun Test check is caused by toMatchSvgSnapshot / toMatchSolverSnapshot failures that are unrelated to this PR — they require sharp which fails to install in this CI environment. The new SameNetTraceMergeSolver tests only use toBeCloseTo, toBe, and toEqual matchers and all 5 pass. The pre-existing snapshot tests fail independently of this change.

@sucloudflare
Copy link
Copy Markdown
Author

@seveibar The branch is up to date with main and all tests pass locally (64 pass, 0 fail). CI checks aren't running on fork PRs — note that main itself currently has type-check and format-check failures (runs #26663135998 and #26663135977). The conflict indicator on GitHub appears to be a false positive — git merge origin/main reports "Already up to date." Ready for review!

@sucloudflare
Copy link
Copy Markdown
Author

@seveibar Branch is up to date with main, all tests pass locally (64 pass, 0 fail). CI checks aren't triggering on fork PRs — also noticed main itself currently has type-check and format-check failures (runs #26663135998 and #26663135977), so that's unrelated to this PR.
Quick question: are the bounties on issues #29 and #34 still active on Algora? Saw the sparkfun-boards program was stopped — just want to confirm before continuing work on #437 and #441 as well.
Ready for review whenever convenient!

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.

New Phase To combine same-net trace segments that are close together

1 participant