From e1697dc6f33de323011f11ca611d29227eea2217 Mon Sep 17 00:00:00 2001 From: David Montero Date: Fri, 19 Jun 2026 20:28:54 +0200 Subject: [PATCH] fix(simulator): recordUpdateWire was never bound in SimulatorCanvas (ReferenceError) recordUpdateWire was used by the wire colour palette and the right-click menu but never destructured from the store, so every colour-swatch click threw 'recordUpdateWire is not defined' and did nothing. tsc would have caught this, but build:docker skips type-checking, and the only prior caller (the touch-only palette) was never exercised. Bind it like the other record* actions. Together with the applyNow fix this makes wire colour changes from the UI actually work. --- frontend/src/components/simulator/SimulatorCanvas.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/simulator/SimulatorCanvas.tsx b/frontend/src/components/simulator/SimulatorCanvas.tsx index 75bb7f35..b3893836 100644 --- a/frontend/src/components/simulator/SimulatorCanvas.tsx +++ b/frontend/src/components/simulator/SimulatorCanvas.tsx @@ -165,6 +165,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => { const recordRotate = useSimulatorStore((s) => s.recordRotate); const recordSetProperty = useSimulatorStore((s) => s.recordSetProperty); const recordRemoveWire = useSimulatorStore((s) => s.recordRemoveWire); + const recordUpdateWire = useSimulatorStore((s) => s.recordUpdateWire); // Subscribe to history shape so the undo/redo buttons reactively // enable/disable and their tooltips reflect the next command. const history = useSimulatorStore((s) => s.history);