velxio/frontend/src/components/simulator
David Montero Crespo 9c26174c93 fix(sim): clean restart on Run after agent + display body occludes crossing wires
Two issues from a real ESP32 7-segment clock the agent built.

Run after the agent didn't work until a page reload
---------------------------------------------------
The agent's run_simulation leaves the ESP32 board RUNNING (live QEMU
WebSocket). Esp32Bridge.connect() is a no-op while the socket is non-CLOSED,
so the user's subsequent Run click called startBoard() → connect() → did
NOTHING. And if the backend QEMU session had since died while the frontend
socket lingered (CONNECTING/OPEN/CLOSING), the user saw a dead sim that only
a reload cleared — exactly the "di Run y no funcionó; recargué y sí" report.
The Arduino/C++ QEMU path now stops a running board first (closing the WS),
waits for it to settle, then boots fresh — the MicroPython path already did
this for the same reason.

Wires painted over the 7-segment digits
----------------------------------------
The agent bridges each segment strip to its resistor from a breadboard hole
that is physically UNDER the seated display; on the flat canvas those wires
(wire layer z 35) painted over the digits (component z 1) — "casi ni se ven
los dígitos". A large-bodied display seated on a breadboard now renders
ABOVE the wire layer, so its face occludes the wires crossing it exactly as
the real part's body would (the wire passes behind it to reach the hole).
Scoped to display bodies (7segment, matrix, oled, lcd, ili9341, led-ring…)
and only when actually seated; thin parts and free-floating displays are
untouched. The pin overlay + seated-pin markers share the display's stacking
group, so they rise with it and wiring still works.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 06:46:57 +02:00
..
BoardOnCanvas.tsx fix(canvas): board pins stay clickable — hover handlers on the wrapper 2026-07-17 20:23:35 +02:00
BoardOptionsModal.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
BoardOptionsModal.tsx feat(ui): replace native confirm() dialogs with reusable modal 2026-07-18 01:59:18 +02:00
BoardPickerModal.tsx fix(canvas): stack pins with their component + pickers above floating panels 2026-07-17 18:44:58 +02:00
CameraToggle.tsx feat(webcam): universal compatibility — any webcam on any PC ✅ 2026-05-03 00:48:24 -03:00
CanvasMinimap.css fix(minimap): hit-test against clamped rect + shrink to 100x75 2026-05-14 22:53:34 +02:00
CanvasMinimap.tsx fix(minimap): live-track pan/zoom + real board footprints + bigger map 2026-07-16 05:51:29 +02:00
CircuitVerificationModal.tsx Add end-to-end tests for ESP32 I2C functionality and circuit verification 2026-05-12 16:55:15 -03:00
ComponentPalette.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
ComponentPalette.tsx
…
ComponentPropertyDialog.css feat(simulator): map pushbuttons to keyboard keys 2026-07-18 04:02:01 +02:00
ComponentPropertyDialog.tsx feat(simulator): map pushbuttons to keyboard keys 2026-07-18 04:02:01 +02:00
FlashModal.tsx feat(flash): write compiled sketches to real USB boards (phases D1+D3) 2026-05-27 00:20:20 -03:00
InstallLibrariesModal.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
InstallLibrariesModal.tsx feat(editor): translate InstallLibrariesModal + SerialMonitor (Editor block 8) 2026-05-09 11:35:22 -03:00
LibraryManagerModal.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
LibraryManagerModal.tsx feat(library-manager): read-only libraries.json file + drop Uninstall for shared index libs 2026-06-09 15:49:14 +02:00
Oscilloscope.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
Oscilloscope.tsx feat(editor): rename boards & custom chips; show which target owns each file 2026-06-04 06:22:25 +02:00
PinOverlay.tsx feat(breadboard): green dots on pins plugged into a breadboard 2026-07-20 04:48:16 +02:00
PinPickerDialog.tsx feat(i18n): translate small editor remates + admin internals (Blocks 11+12) 2026-05-09 16:22:16 -03:00
SdCardPanel.tsx feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
SeatedPinMarkers.tsx feat(breadboard): green dots on pins plugged into a breadboard 2026-07-20 04:48:16 +02:00
SelectionActionBar.tsx feat(simulator): wire color palette from PR #170 + Copilot suggestions 2026-05-11 12:14:36 -03:00
SensorControlPanel.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
SensorControlPanel.tsx fix(sensor-panel): per-sensor state when switching between same-type sensors 2026-05-16 22:28:52 -03:00
SerialMonitor.tsx feat(pi): gpiozero core + boot feedback, terminal and upload UX 2026-06-22 20:21:06 +02:00
SimulatorCanvas.css fix(canvas): stack pins with their component + pickers above floating panels 2026-07-17 18:44:58 +02:00
SimulatorCanvas.tsx fix(sim): clean restart on Run after agent + display body occludes crossing wires 2026-07-21 06:46:57 +02:00
WireInProgressRenderer.tsx feat(wires): avoid other wires + live routed preview + system-owned shapes 2026-07-20 20:08:25 +02:00
WireLayer.tsx feat: add touch-friendly components for improved mobile usability 2026-05-08 11:12:26 -03:00
WireModeBanner.tsx feat: add touch-friendly components for improved mobile usability 2026-05-08 11:12:26 -03:00
WireRenderer.tsx feat(breadboard): Wokwi-style parts-on-breadboard — hole snapping + invisible seating wires 2026-07-18 08:47:25 +02:00