Skip to content

feat: full footprinter coverage in Footprinter3d + coverage test - #315

Open
Dasdebsankar54 wants to merge 2 commits into
tscircuit:mainfrom
Dasdebsankar54:feat/footprinter-full-coverage
Open

feat: full footprinter coverage in Footprinter3d + coverage test#315
Dasdebsankar54 wants to merge 2 commits into
tscircuit:mainfrom
Dasdebsankar54:feat/footprinter-full-coverage

Conversation

@Dasdebsankar54

Copy link
Copy Markdown

Adds 3D models for ~40 previously-unhandled footprinter functions (incl. JST
SH/PH connectors) and a coverage test that fails CI whenever footprinter
gains an unwired package. 82/82 tests pass; all pre-existing snapshots
unchanged, so existing model output is bit-identical.

Problem

  • Footprinter3d silently returned null for ~40 of the 97 footprint functions
    exposed by @tscircuit/footprinter (~100 models counting pin/size variants).
    JST connectors parsed fine but only rendered for the ZH series; SH/PH fell
    through. Several components existed in lib/ but were never wired/exported.

Fix

  • tests/footprinter-coverage.test.ts iterates all 97 footprinter names and
    asserts non-null renders — self-updating checklist, fails CI on new gaps
  • Parametric JST component (zh/sh/ph series presets)
  • 13 new components (DPAK, SOT89, SOT343, SmdDiode, Crystal,
    ElectrolyticCapacitor, Potentiometer, SmdPushButton, LED2835/5050,
    SolderJumper, M2Host, JST)
  • Wired existing-but-unreachable components (BGA, SOD123, SOT233P, SOT563,
    RadialCapacitor, USB_C, QFN/SOIC/StampBoard reuse) + completed index.ts
    exports
  • Added missing Ellipsoid to the vanilla primitive shim (USB-C dependency)

Verification

  • bun test: 82/82 pass incl. all 73 pre-existing snapshot tests
  • bun run build succeeds (index + vanilla)

Problem
- Footprinter3d silently returned null for ~40 of the 97 footprint
  functions exposed by @tscircuit/footprinter (about 100 models when
  counting pin/size variants), so components vanished from boards with
  no error. JST connectors parsed fine but only rendered for the ZH
  series; SH and PH fell through. Several components already existed
  in lib/ but were never wired into the switch or exported, and every
  new footprinter release added more silent gaps.

Root cause
- No machine-checkable coverage: a null render does not throw, no test
  enumerated footprinter names, so gaps were invisible and the backlog
  regrew automatically. 15 component files were not even exported
  from index.ts.

Fix
- Add tests/footprinter-coverage.test.ts: iterates all 97 names from
  fp.getFootprintNames() and asserts each renders non-null, turning
  the backlog into a self-updating checklist that fails CI when
  footprinter adds packages. 'pad' and 'vson' are broken upstream in
  footprinter itself (parser throws) and are pinned by a companion
  test until fixed there.
- New parametric JST component (series zh/sh/ph presets) replacing
  the ZH-only wiring; legacy jstzh1_5mm strings still work.
- 13 new components: JST, SmdDiode (sod110/sod80/sod323w/sod882d/
  smbf), DPAK (dpak/to252/d2pak/to263), SOT89, SOT343, Crystal,
  ElectrolyticCapacitor, Potentiometer, SmdPushButton, LED2835,
  LED5050, SolderJumper, M2Host.
- Wire existing-but-unreachable components: BGA (bga/lga), SOD123,
  SOT233P (sot23), SOT563, RadialCapacitor (radial), USB_C
  (usbcmidmount), QFN for quad/mlp/son/vson/wson, SOIC for
  sop8/ssop, StampBoard for breakoutheaders, FootprintPad/
  FootprintPlatedHole for smtpad/pad/platedhole, TO220/TO92 for
  their f/l/s variants.
- Complete index.ts exports for all previously unexported components.
- Add Ellipsoid to the vanilla primitive shim (required by USB-C,
  which previously broke the vanilla bundle once reachable).
- 15 cosmos examples for the new models.

Verification
- bun test: 82/82 pass, including all 73 pre-existing snapshot tests,
  so existing model output is unchanged (purely additive change).
- bun run build succeeds for both index and vanilla entries.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
jscad-electronics Ready Ready Preview, Comment Jul 29, 2026 5:53am

Request Review

Fixes the Format Check CI failure on PR tscircuit#315: collapse JSX props onto
single lines per biome's canonical style in ElectrolyticCapacitor,
LED2835, Potentiometer, and Footprinter3d. No behavior change; bun
test still 82/82.
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