166 Commits

Author SHA1 Message Date
Lenny Khazan eb4c374912 fix: preserve BOM matches when one line needs retry (ENG-1607) (#1268)
Amp-Thread-ID: https://ampcode.com/threads/T-01a08cb2-5517-74ae-8507-0a18240b30d1

Co-authored-by: Amp <amp@ampcode.com>
2026-09-10 15:28:32 -04:00
Akhil Velagapudi c8254cb36e Support opaque service-account client IDs (#1177)
Amp-Thread-ID: https://ampcode.com/threads/T-01a06fc6-8f9f-70e8-b832-f27bd1213cab
2026-09-05 00:42:51 -04:00
Akhil Velagapudi f83892f682 Remove redundant pricing and layout helpers (#1173)
Amp-Thread-ID: https://ampcode.com/threads/T-01a06f6d-7de5-7658-9186-6ee15dc5db1e
2026-09-04 23:01:39 -04:00
detail-app[bot] c98fe39b3d chore: remove unused KicadSymbolsClient static helpers 2026-09-04 22:45:54 -04:00
Akhil Velagapudi 566301326d Add PCB service-account authentication (#1164)
* Add PCB service-account authentication

* Keep service-account imports on the active endpoint
2026-09-04 17:36:34 -04:00
Akhil Velagapudi bc9db5ce60 Simplify BOM match caching 2026-09-03 23:17:53 -04:00
Akhil Velagapudi 6407a2f2b5 Fix LCSC IDs for case-insensitive distributor names (#1160)
Match LCSC distributor names without case sensitivity so valid part IDs appear with global availability.
2026-09-03 21:13:01 -04:00
detail-app[bot] e469813652 chore: remove unused bare auth CLI command wrappers (#1152)
Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
2026-09-03 15:20:01 -04:00
Akhil Velagapudi edac50c78d ENG-1211 Move pcb auth login to device PKCE flow (#1121)
* Move auth login to device PKCE flow

Amp-Thread-ID: https://ampcode.com/threads/T-01a05919-2da5-7019-8326-b9b5ff3788ea

* Refresh device OAuth tokens directly

Amp-Thread-ID: https://ampcode.com/threads/T-01a05919-2da5-7019-8326-b9b5ff3788ea

* Process completed device authorization before expiry

Amp-Thread-ID: https://ampcode.com/threads/T-01a05919-2da5-7019-8326-b9b5ff3788ea
2026-08-31 20:52:15 -04:00
Lenny Khazan 395acb7a66 Fix Clippy constant chunk warnings (#1120)
Amp-Thread-ID: https://ampcode.com/threads/T-01a058cc-ef9a-7298-beff-6a2d535463f3
2026-08-31 13:26:00 -04:00
Lenny Khazan 9ca4474a81 Handle closed CLI output pipes (#1112)
* fix: handle closed CLI output pipes

Amp-Thread-ID: https://ampcode.com/threads/T-01a04c02-604b-776e-8969-5bf3bac7ea8e

* docs: document CLI output handling

Amp-Thread-ID: https://ampcode.com/threads/T-01a04c02-604b-776e-8969-5bf3bac7ea8e

* docs: simplify CLI output guidance

Amp-Thread-ID: https://ampcode.com/threads/T-01a04c02-604b-776e-8969-5bf3bac7ea8e
2026-08-30 18:40:56 +00:00
Lenny Khazan 001d10ba71 Revert "fix: handle closed CLI output pipes"
This reverts commit 5b426383ea.
2026-08-29 06:18:58 +00:00
Lenny Khazan 5b426383ea fix: handle closed CLI output pipes
Amp-Thread-ID: https://ampcode.com/threads/T-01a04c02-604b-776e-8969-5bf3bac7ea8e
2026-08-29 06:15:13 +00:00
Akhil Velagapudi 3e443b3fad Cache BOM matches by sourcing identity 2026-08-27 21:14:44 -04:00
Akhil Velagapudi a31b48b499 Use API-only generic BOM matching (#1100)
* Preserve BOM match provenance in output

* Remove local generic BOM matching

* Fix grouped BOM status rendering

* Cache BOM sourcing groups atomically

* Shorten BOM changelog entry
2026-08-27 14:42:06 -04:00
Akhil Velagapudi cd8a2f4a5a Address BOM refresh review feedback 2026-08-26 17:16:26 -04:00
Akhil Velagapudi c264149769 Refresh schematic BOM matches online 2026-08-26 17:16:26 -04:00
Akhil Velagapudi 1af6054522 Prune redundant BOM hydration tests 2026-08-26 14:12:15 -04:00
Akhil Velagapudi f62e36af5d Hydrate schematics from cached BOM matches 2026-08-26 14:12:15 -04:00
Lenny Khazan 6efd247cae feat(pcb): add native KiCad URL launcher (#983)
* feat(pcb): add native KiCad URL launcher

* fix(pcb): harden launcher recovery choices

* fix(pcb): prevent concurrent recovery sessions

* fix(pcb): guard restored editor sessions

* refactor(pcb): extract shared pcb-diode-uri and pcb-native-dialog crates

pcb-launcher's URI validation re-implemented pcb-diode-api's SandboxFileUri
parsing; move that parser into a tiny pcb-diode-uri crate both can use, and
give the trusted-host allowlist a single home there. Likewise collapse the
duplicated osascript/zenity/kdialog/PowerShell dialog machinery from
pcb-launcher and pcbc's recovery dialog into a pcb-native-dialog crate.
Also drop the launcher's redundant staged-app cleanup (the Drop guard
covers it), the duplicate log chmod, the Debug-formatted log header, and
a clippy for_kv_map lint in the interposer pattern test.

* fix(pcb): block recovery while a recoverable session's editor is open

A recoverable stop now deliberately leaves KiCad running, so the
still-open-editor guard must cover Recoverable sessions too — otherwise
Restore reuses the same local layout dir while the first KiCad instance
still has it open. Also match the tracked pid's process name (open /
pcbnew / kicad) instead of bare liveness, so a recycled pid cannot
permanently wedge the board.

* refactor(pcb): simplify launcher install and open plumbing

Split install_shim_launcher into fetch / stage / replace helpers so the
Windows backup-rename dance is a reusable replace_executable_with_backup,
fold pcb-kicad's duplicated per-OS pcbnew command construction into one
builder, share a single Download-style helper in install.ps1 the way
install.sh already does, dedupe the recovery-cancel wind-down, and fix
the README's launcher wording.

* refactor(pcb): re-export diode URI types without a module alias

Nothing consumed the pcb_diode_api::diode_uri path; re-export the types
directly from pcb-diode-uri instead of aliasing the whole crate.

* refactor(pcb): trust *.diode.computer in release, all hosts in debug

Replaces the enumerated host allowlist: release launchers accept any
*.diode.computer subdomain (portless, so preview and gov endpoints work
without listing them), while debug builds trust every host so local API
stacks need no special-casing.
2026-08-26 10:46:19 -04:00
Akhil Velagapudi 18c69a9caf ENG-1019 Preserve BOM offer datasheets 2026-08-26 08:15:04 -04:00
Akhil Velagapudi 1d870bf438 ENG-1019 Cache PCB BOM matches per line (#1088)
* ENG-1019 Cache PCB BOM matches per line

* ENG-1019 Preserve completed BOM match lines
2026-08-25 15:47:14 -04:00
Akhil Velagapudi b8ff15d03a Remove deprecated v1 web-component workflow 2026-08-24 10:31:19 -04:00
Akhil Velagapudi 5e9bdc05d1 Remove PCB preview and hide vendor command (#1080)
* Remove pcb preview

* Hide pcb vendor from help
2026-08-22 23:22:26 -04:00
Akhil Velagapudi b4f789b7ad Add resistor power, crystal, and LED BOM parameters (#1068) 2026-08-19 16:03:55 -04:00
Akhil Velagapudi 34e65e1ef1 Cache pcb bom offers + selection data (#1066)
* Cache PCB BOM match responses

* Simplify PCB BOM cache policy

* Trust API-selected BOM identity

* Align BOM cache with cache conventions
2026-08-19 01:34:24 -04:00
Akhil Velagapudi 1ce8afca19 Restore API-driven BOM sourceability colors 2026-08-18 13:35:35 -04:00
Akhil Velagapudi 9fee32a6c7 Use API BOM offer order (ENG-739) (#1047) 2026-08-11 20:33:44 -04:00
Akhil Velagapudi 8c672ed415 Migrate sandbox transport to renewable connections 2026-08-06 15:07:55 -04:00
Akhil Velagapudi 5961262d43 Prune the dependency tree: 31 crates removed, binary 11% smaller
Removes 31 crates, adds none. Release binary 69,943,104 -> 62,182,992 bytes
(-11.1%); compile units 831 -> 793; Cargo.lock 884 -> 852 packages.

Remove AWS credential authentication
------------------------------------
Deletes pcb-diode-api::aws_auth and the four AWS crates it was the sole
consumer of (aws-config, aws-credential-types, aws-sigv4,
aws-smithy-runtime-api), which pulled 29 crates in total.

The feature was dead, not merely unused: aws_auth exchanged an STS
GetCallerIdentity presigned URL for a Diode service token at
POST /api/auth/aws/exchange, and that endpoint was removed server-side by
diode cb9307996 "Replace sandbox AWS/HMAC auth with challenge-callback tokens".
Every call it could make would 404.

Registry embeddings are unaffected: embeddings.rs fetches credentials from
Diode's own API and hand-rolls SigV4, and never used an AWS crate.

aws-lc-rs/aws-lc-sys deliberately stay -- they come from reqwest's rustls
feature, not the AWS SDK.

Behaviour: `pcb auth status` with no local tokens prints "Not logged in"
instead of attempting the dead exchange. `pcb auth logout` still clears
~/.pcb/service-auth, which holds Diode API bearer tokens (not AWS
credentials), so unexpired ones are not left on disk.

Drop the Oniguruma C dependency
-------------------------------
syntect moves from regex-onig to regex-fancy. It is used only for highlighting
code blocks in `pcb doc`, but regex-onig compiled Oniguruma from C via
onig_sys. fancy-regex was already in the tree via pagable, so syntect shares
that copy. Highlighting output verified identical through a pty, including ANSI
colour codes.

Drop unused tokio and reqwest's charset feature
-----------------------------------------------
tokio's only user was the runtime aws_auth built. tokio stays transitively via
reqwest -> hyper -> h2, but our declaration carried features =
["rt-multi-thread"], and dropping it removes that feature from non-dev builds.
Note plain `cargo tree -e features` still shows rt-multi-thread because
httpmock (a dev-dependency) enables it; only `--edges normal` reflects a
release build.

Nothing calls reqwest's text_with_charset, so the charset feature only pulled
encoding_rs. `.text()` now decodes as UTF-8 rather than following a declared
charset; all call sites read Diode's JSON API or the GitHub-hosted changelog.

Also removes `either` and `serde_yaml` from [workspace.dependencies] -- no
crate referenced either, and serde_yaml was not in Cargo.lock.

Verified: cargo fmt --check, cargo clippy --workspace -- -D warnings, and
cargo nextest run --workspace --profile ci (1934 passed, 1 skipped), plus full
CI green on Ubuntu, macOS and Windows.
2026-08-04 13:26:13 -04:00
Akhil Velagapudi f06c10cbf5 Simplify DiodeHub Git host handling 2026-08-03 21:07:09 -04:00
Akhil Velagapudi 948f2d30b9 Handle ports on IPv6 Git hosts 2026-08-03 21:07:09 -04:00
Akhil Velagapudi 974f3ad19a Simplify DiodeHub Git credential routing 2026-08-03 21:07:09 -04:00
Akhil Velagapudi cc43e663f4 Preserve legacy DiodeHub Git authentication 2026-08-03 21:07:09 -04:00
Akhil Velagapudi 62387aa96d Address Git credential review findings 2026-08-03 21:07:09 -04:00
Akhil Velagapudi 454b0b8359 Support deployment-specific DiodeHub Git hosts 2026-08-03 21:07:09 -04:00
Akhil Velagapudi b567880113 Use ambient API auth for pcb auth git 2026-08-03 13:11:28 -04:00
Akhil Velagapudi 7b26929d22 Use DiodeHub Registry defaults 2026-08-03 01:41:38 -04:00
Akhil Velagapudi 9ec015c1e3 ENG-350: remove repository metadata from Git credentials (#966) 2026-07-29 10:34:39 -04:00
Akhil Velagapudi c469df66e5 Migrate CI to Blacksmith ARM macOS runners (#964)
Drop Intel macOS artifacts and client support, migrate eligible CI jobs to Blacksmith runners, standardize CI on KiCad 10.0.5, and retain GitHub-hosted npm publishing for trusted publishing/OIDC.
2026-07-28 19:04:06 -04:00
Akhil Velagapudi e3ba931535 Authenticate PCB-owned Git operations (#962)
* Authenticate PCB-owned Git operations

* Make PCB Git network commands noninteractive
2026-07-27 18:19:27 -04:00
Akhil Velagapudi 4663266b0c Cache PCB Git credentials in Git 2026-07-27 17:14:18 -04:00
Akhil Velagapudi 34a4a163ec Configure PCB Git credential helper 2026-07-27 16:07:36 -04:00
Akhil Velagapudi f8a97d49c7 Add PCB Git credential helper (#959)
* Add PCB Git credential helper

* Isolate Git credential tests from logging

* Limit Git credentials to DiodeHub

* Normalize credential test path on Windows
2026-07-27 15:16:45 -04:00
Akhil Velagapudi 693f272a3e Add v2 component API CLI (#958)
* Add v2 component API CLI

* Fix component CLI Clippy lint
2026-07-27 14:13:58 -04:00
Akhil Velagapudi c814fa1e7c Refine pcb scan page output (#945) 2026-07-23 10:26:54 -04:00
Akhil Velagapudi f4fb10fdd7 Handle UK strict BOM offers 2026-07-22 21:49:06 -04:00
Akhil Velagapudi 9e2e7a9333 Fix strict BOM API request 2026-07-22 21:49:06 -04:00
Akhil Velagapudi 603866ae55 Support page-range datasheet scans 2026-07-22 18:18:11 -04:00
Akhil Velagapudi 362aab5491 Refine technical documentation 2026-07-21 14:22:42 -04:00