Skip to content

feat(import): support jlcpcb identifiers in import flow#3119

Open
techmannih wants to merge 2 commits into
tscircuit:mainfrom
techmannih:codex/import-jlcpcb-identifiers
Open

feat(import): support jlcpcb identifiers in import flow#3119
techmannih wants to merge 2 commits into
tscircuit:mainfrom
techmannih:codex/import-jlcpcb-identifiers

Conversation

@techmannih
Copy link
Copy Markdown
Member

Summary

This PR updates the import flow to understand and display provider-prefixed JLCPCB identifiers.

It is intentionally scoped separately from the search formatting change in #3118.

Why

After adding jlcpcb:C... identifiers to CLI search output, the import flow still had two gaps:

  • direct JLCPCB imports only parsed raw C... or numeric part numbers
  • interactive import selection still displayed raw C... values instead of the provider-prefixed identifier

That made the search -> import workflow feel inconsistent and made the identifier format harder to use end-to-end.

What changed

  • accept jlcpcb:C1234, C1234, and bare numeric part numbers in direct JLCPCB import parsing
  • show jlcpcb:C... identifiers in JLCPCB import selection labels
  • reuse the same identifier formatting in import progress messages
  • centralize JLCPCB part-number normalization and component display helpers used by import
  • add focused tests for direct part parsing and import choice formatting

User impact

  • tsci import jlcpcb:C2040 now works
  • tsci import C2040 and tsci import 2040 continue to work
  • JLCPCB choices shown during tsci import now use the same provider-prefixed format users see elsewhere

Validation

  • bun test tests/cli/import/parse-direct-lcsc-part-number.test.ts tests/cli/import/format-jlcpcb-import-choice-title.test.ts
  • bunx biome check cli/import/register.ts cli/import/parse-direct-lcsc-part-number.ts cli/import/format-jlcpcb-import-choice-title.ts lib/shared/jlcpcb-part-number.ts lib/shared/jlcpcb-component.ts tests/cli/import/parse-direct-lcsc-part-number.test.ts tests/cli/import/format-jlcpcb-import-choice-title.test.ts

@techmannih techmannih changed the title [codex] feat(import): support jlcpcb identifiers in import flow feat(import): support jlcpcb identifiers in import flow May 27, 2026
@techmannih techmannih marked this pull request as ready for review May 27, 2026 13:15
Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add representative usage

there appear to be unrelated changes?

@seveibar
Copy link
Copy Markdown
Contributor

Or snapshot output, not sure i understand what you’re doing because there is no proper integration test

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.

2 participants