velxio/frontend/src/components
davidmonterocrespo24 e10492c6e6 feat(sim): introduce PinResolver abstraction (Phase 0 of mixed-mode rewrite)
Decouple per-component handlers from direct pinManager.onPinChange +
getArduinoPinHelper subscriptions by introducing a small PinResolver
interface. The Phase 0 default impl is functionally identical to the
legacy path — it just routes through PinResolver instead of being
inlined in every handler. Zero behavior change.

The point is to make Phase 1 possible: swap the default impl for a
SPICE-resolved version that watches node voltages and threshold-
converts to digital events, without rewriting every handler.

Files:
  - simulation/PinResolver.ts (new) — interface + default factory
  - parts/PartSimulationRegistry.ts — additive 5th arg to
    attachEvents (getPinResolver?), legacy 4-arg signatures keep
    working unchanged
  - components/DynamicComponent.tsx — assembles the PinResolver from
    the wire-trace logic + PinManager subscriptions + board Vcc
    lookup, passes it as the 5th arg to attachEvents
  - parts/BasicParts.ts — LED handler migrated as proof of concept
    (resolver-first path, legacy 4-arg path kept as fallback for
    tests / unmigrated harnesses)
  - __tests__/pin-resolver.test.ts (new) — 8 unit tests covering
    FLOATING / GND / HIGH / LOW / GPIO subscriptions / unsubscribe

Vitest: 8/8 pin-resolver tests pass. 1300+ existing tests still pass;
the one pre-existing flake (spice-rectifier-live-repro timing out >60s)
is unrelated to this commit — verified by running the test on plain
HEAD without these changes (same timeout).

See project/sim-mixedmode/phase-00-pin-resolver.md (in the velxio-prod
repo) for full phase context.
2026-05-15 15:50:09 +02:00
..
analog-ui
components-instruments
customChips
editor feat(oss): portable .vlx project export/import for self-hosters 2026-05-14 16:33:00 -03:00
examples Add HD44780Decoder and various I2C sketches 2026-05-12 14:26:33 -03:00
layout refactor(oss-split): remove auth/admin/profile frontend from OSS 2026-05-14 15:31:12 -03:00
raspberry-pi feat(i18n): translate small editor remates + admin internals (Blocks 11+12) 2026-05-09 16:22:16 -03:00
simulator fix(board): raspberry-pi-pico renders a real Pico, not Nano RP2040 Connect 2026-05-15 00:31:19 -03:00
ui
velxio-components
ComponentPickerModal.css
ComponentPickerModal.tsx
DynamicComponent.tsx feat(sim): introduce PinResolver abstraction (Phase 0 of mixed-mode rewrite) 2026-05-15 15:50:09 +02:00