Skip to content

Warn when importing an out-of-stock JLCPCB part - #4453

Open
techmannih wants to merge 3 commits into
mainfrom
ujj
Open

Warn when importing an out-of-stock JLCPCB part#4453
techmannih wants to merge 3 commits into
mainfrom
ujj

Conversation

@techmannih

Copy link
Copy Markdown
Member
Screenshot 2026-08-24 at 21 12 37

Summary

  • carry JLCPCB stock information through the tsci import flow
  • show a warning when the selected part has zero stock
  • continue importing the component instead of failing

Testing

  • added a focused test for the out-of-stock warning
  • bun test tests/cli/import/warn-if-jlcpcb-part-is-out-of-stock.test.ts
  • Biome checks pass

Note

The full build is currently blocked by an unrelated existing circuit-json-to-gerber export error.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment thread cli/import/register.ts
Comment on lines 185 to 189
await importJlcpcbPart({
download: opts.download,
partNumber: `C${String(choice.part)}`,
stock: choice.stock,
useExactFootprint: opts.useExactFootprint,

@imrishabh18 imrishabh18 Aug 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wrong pattern, why would you pass the stock number to importJlcpcbPart. Doesn't make sense

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed. I moved the stock warning to the command orchestration layer, before calling importJlcpcbPart. The importer no longer receives or handles stock metadata.

@techmannih
techmannih requested a review from imrishabh18 August 25, 2026 15:14
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