velxio/frontend/src
David Montero Crespo a177471ed0 fix(sensor-panel): per-sensor state when switching between same-type sensors
Clicking a second photoresistor (or any second sensor of the same
metadataId) showed the previously-clicked sensor's slider value because
the panel was reused across clicks and its useState only ran once. The
mount useEffect also unconditionally dispatched config defaults, which
would have wiped any prior customisation if we naively remounted.

Three changes:

- SensorUpdateRegistry caches the last-dispatched values per componentId
  (and clears them on unregister) so the panel has a place to read from.
- SensorControlPanel hydrates from that cache on mount, falling back to
  config defaults only when the sensor has never been touched. The
  default-dispatch useEffect skips when cached values already exist.
- SimulatorCanvas keys the panel on sensorControlComponentId, forcing a
  fresh mount when the user switches sensors — without that, hydration
  wouldn't run on subsequent opens.
2026-05-16 22:28:52 -03:00
..
__pro_stub__
…
__tests__ ci: Phase 1d-tests I + K + L — workflow hardening + nightly library-compile 2026-05-15 23:19:11 +02:00
assets
…
components fix(sensor-panel): per-sensor state when switching between same-type sensors 2026-05-16 22:28:52 -03:00
data fix(examples/pico-doom): wire ILI9341 power + MISO 2026-05-14 23:22:31 -03:00
hooks refactor(oss-split): remove auth/admin/profile frontend from OSS 2026-05-14 15:31:12 -03:00
i18n i18n: admin.users keys for "Reset agent usage" button 2026-05-14 23:29:21 +02:00
lib feat(oss): portable .vlx project export/import for self-hosters 2026-05-14 16:33:00 -03:00
pages feat(sim): Phase 1c G+F3 — retire legacy CircuitScheduler / eecircuit-engine 2026-05-15 21:46:34 +02:00
services refactor(oss-split): remove auth/admin/profile frontend from OSS 2026-05-14 15:31:12 -03:00
simulation fix(sensor-panel): per-sensor state when switching between same-type sensors 2026-05-16 22:28:52 -03:00
store feat(sim): Phase 1c G+F3 — retire legacy CircuitScheduler / eecircuit-engine 2026-05-15 21:46:34 +02:00
tokens feat(landing+theme): multiplier pricing copy + softer canvas 2026-05-13 21:02:48 +02:00
types
…
utils chore(tests): silence three noisy warnings in deploy-gate output 2026-05-16 22:39:43 +02:00
velxio-elements
…
App.css
…
App.tsx feat(examples): /example/<id> route with pinned URL 2026-05-15 00:14:36 -03:00
entry-server.tsx
…
index.css
…
main.tsx refactor(oss-split): remove auth/admin/profile frontend from OSS 2026-05-14 15:31:12 -03:00
seoRoutes.ts
…
vite-env.d.ts
…