tscircuit / tscircuit/schematic-trace-solver
[BUG] Router crashes on empty connections array
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 314
- Avg merge
- 9h 3m
- Merged PRs (30d)
- 132
Description
Describe the bug
All solvers crash when connections: [] is passed. Need early return guard.
Files affected
- CapacityMeshSolver.ts
- DirectLineSolver.ts
- etc.
Proposed fix
Add if (!input.connections?.length) return { traces: [] } to each solver.
Would you accept a PR for this? Happy to add a bounty label if you want.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CapacityMeshSolver.ts and DirectLineSolver.ts, then identify the other solver files covered by the issue. Reproduce the crash with an empty connections array and verify that each solver returns an object with an empty traces array instead; add or run the relevant solver checks if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100