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
CanvasMinimap.css
CanvasMinimap.tsx fix(minimap): live-track pan/zoom + real board footprints + bigger map 2026-07-16 05:51:29 +02:00
CircuitVerificationModal.tsx
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
InstallLibrariesModal.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
InstallLibrariesModal.tsx
LibraryManagerModal.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
LibraryManagerModal.tsx
Oscilloscope.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
Oscilloscope.tsx
PinOverlay.tsx feat(breadboard): green dots on pins plugged into a breadboard 2026-07-20 04:48:16 +02:00
PinPickerDialog.tsx
SdCardPanel.tsx
SeatedPinMarkers.tsx feat(breadboard): green dots on pins plugged into a breadboard 2026-07-20 04:48:16 +02:00
SelectionActionBar.tsx
SensorControlPanel.css style(ui): unify every interactive surface on the single #0071e3 accent 2026-06-21 05:34:25 +02:00
SensorControlPanel.tsx
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
WireModeBanner.tsx
WireRenderer.tsx feat(breadboard): Wokwi-style parts-on-breadboard — hole snapping + invisible seating wires 2026-07-18 08:47:25 +02:00