fix: support updated KiCad imports and preserve imported trace topology during inflation#2450
Open
rushabhcodes wants to merge 12 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MustafaMulla29
left a comment
Contributor
There was a problem hiding this comment.
Ok, lets fix the failing tests first.
Inflating circuit JSON that contained LED or fiducial components threw "No inflator implemented for source component ftype" because the switch in inflate-circuit-json.ts was missing those cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
MustafaMulla29
approved these changes
Jun 16, 2026
MustafaMulla29
left a comment
Contributor
There was a problem hiding this comment.
Take a review from rishabh as well!
imrishabh18
reviewed
Jun 16, 2026
imrishabh18
left a comment
Member
There was a problem hiding this comment.
why are the traces missing for those circuits?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This branch updates the KiCad import dependencies in
coreand adapts subcircuit inflation to the new circuit JSON shape they produce.What changed
kicad-to-circuit-jsonfrom^0.0.60to^0.0.96kicadtsfrom^0.0.35to^0.0.45simple_ledandsimple_fiducialinflate-circuit-json.ts1 source_trace -> many pcb_traceinstead of assuming a 1:1 mappingWhy this branch was needed
The dependency update changed the imported KiCad circuit JSON in two important ways:
simple_ledandsimple_fiducialsource components, which previously crashed inflation becausecorehad no inflators for thoseftypevalues.pcb_tracepersource_trace. On the Arduino Uno repro, the new import output contains109source_tracerecords but188pcb_tracerecords. The old inflation logic usedgetWhere({ source_trace_id }), so it kept only one routed segment for eachsource_trace_idand silently dropped the rest.Fix details
LED and fiducial inflation
inflateSourceLedrehydrates imported LEDs with PCB placement and footprint data.inflateSourceFiducialrehydrates imported fiducials with placement and pad diameter derived from the imported SMT pad.Trace inflation
inflateSourceTracenow inflates oneTraceper matching importedpcb_trace, while still preserving the straight-line fallback when an injected trace has no routed PCB geometry.That restores the missing imported traces instead of collapsing them during subcircuit inflation.
Tests and snapshots
Updated coverage and snapshots for the affected repros:
repro116-arduino-uno.test.tsxrepro116-arduino-uno-reroute.test.tsxrepro116-arduino-uno-reroute-center.test.tsxrepro116-arduino-uno-reroute-lower-mid.test.tsxrepro117-schematic-disabled-inflation.test.tsx