Autorouter replaces `pcbStraightLine` traces with its own route (adds vias, can short on dense boards)
Maintainers usually reply within 1 day
@OLuHneschastniy is already working on this.
Since Nov 13, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- react, typescript
Research direction
Start by reading the autorouter behavior described in #3146 and compare the reproduced pcbStraightLine trace with its output in the circuit JSON, especially __replaces_pcb_trace_id and the added vias. Reproduce the example with tsci build and check whether the other route crosses the original straight trace. Done means fixed traces remain unchanged, the other connection routes around them, and the dense-board case no longer reports a short; two open linked pull requests already address this issue.
Written by the indexing model from the issue text.
Description
Summary
A trace with pcbStraightLine is supposed to be fixed input to autorouting (as described in #3146). When another routed connection has to cross it, the autorouter instead replaces the straight-line trace: the output pcb_trace carries __replaces_pcb_trace_id pointing at the original, and the straight segment becomes a 12-point route that drops to the bottom layer through two vias. The other trace keeps the top layer. The build passes with no error or warning.
Reproduction
export default () => (
<board width="20mm" height="12mm">
<chip name="U1" footprint="soic8" pcbX={-4} pcbY={0} />
<resistor name="R1" resistance="1k" footprint="0402" pcbX={1} pcbY={1.905} />
<capacitor name="C1" capacitance="1uF" footprint="0402" pcbX={4} pcbY={4} />
<trace from="U1.pin8" to="R1.pin1" pcbStraightLine />
<trace from="U1.pin7" to="C1.pin1" />
</board>
)
tsci build reports 1 passed. In the circuit JSON:
| Expected | Actual | |
|---|---|---|
pcb_trace_0 (U1.pin8 → R1.pin1) |
2 points, straight on top | 12 points, 2 vias, __replaces_pcb_trace_id: "pcb_trace_0" |
| U1.pin7 → C1.pin1 | routed around the fixed trace | 7 points on top, crossing where the straight line was |
Route of the replaced trace:
(-1.85,1.91 top) → (-1.0,1.9 top) → via → (-1.0,1.9 bottom) → (-0.19,1.9 bottom) → via → (-0.19,1.9 top) → (0.49,1.91 top)
Why it matters
On a denser board (USB-C receptacle with pcbStraightLine on the CC1/CC2 escapes and an unbroken bottom <copperpour>), the replacement route collided with the VBUS trace: tsci check shorts reported a short between CC2 and VBUS, and the measured copper gap was 0 mm. The same board without pcbStraightLine has no short.
Without the pour or the fine-pitch connector, the result is no short but still a straight trace silently turned into a two-via detour, which defeats the purpose of pcbStraightLine.
Notes
- A straight trace that only passes close to another net's pad is kept as is and gets a normal pad/trace clearance error, so the replacement seems specific to another connection needing to cross the fixed trace.
- I didn't find an existing issue for this. Related: #3146 (preserve early-rendered copper during autorouting), #4084 (exact preloaded trace geometry to Pipeline9), #4477 (unmerged,
pcbPathsreplaced bysimplify).
Environment
- tscircuit 0.0.3169, @tscircuit/core 0.0.2359 (latest on npm, 2026-11-13); also seen on 0.0.3062 / 0.0.2259
- Bun 1.4.4, macOS 26.6.2 (Apple Silicon)
- Dominant language
- TypeScript
- Stars
- 61
- Forks
- 256
- Avg merge
- 20h 21m
- Merged PRs (30d)
- 289
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from tscircuit/core
-
Standalone `import("@tscircuit/core")` fails with `ERR_MODULE_NOT_FOUND` due to `devDependencies`-only imports in `dist/`Possibly taken @Andresdev14 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
tscircuit/core#5508 · 1 comment ·
Maintainers usually reply within 1 day
-
Default solder paste aperture is 0.7x the pad (49% of its area)Possibly taken @zainrizvi0611-cmd claimed this 16 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
tscircuit/core#4800 · 1 comment ·
Maintainers usually reply within 1 day
-
SCHEMATIC_COMPONENT_OUTLINE_COLOR "rgba(132, 0, 0)" is not portable SVG color; strict SVG renderers reject schematic outputPossibly taken @zainrizvi0611-cmd claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Scientific notation is truncated in simulation graph scale and offset settingsPossibly taken @Crodify claimed this 9 days ago. Openno-issue-activity
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tscircuit/core#3732 · 1 comment ·
Maintainers usually reply within 1 day
-
SchematicRect drops fillColor from circuit JSON and renders filled rectangles with the stroke colorPossibly taken @cocvn157 claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openclaw/openclaw#199885 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
feature needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BoardGamesEmpire/board-games-empire-backend#1306 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
sequant-io/sequant#1689 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100