From 1a7d4fabf466a331941f4288ee568f555a8fe4f5 Mon Sep 17 00:00:00 2001 From: David Montero Date: Thu, 18 Jun 2026 05:10:00 +0200 Subject: [PATCH] fix(sim): re-solve when a part burns out so the open actually applies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The live solver only re-solved on component/wire/board changes, so a runtime burnout (which changes burntComponents, not components) wouldn't rebuild the netlist — the burnt part stayed in the circuit until something else changed. Trigger a re-solve on burntComponents change too. The monitor skips already- burnt parts, so this converges (one extra solve). --- .../src/simulation/spice/CircuitSimulationService.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/simulation/spice/CircuitSimulationService.ts b/frontend/src/simulation/spice/CircuitSimulationService.ts index f388937b..1fb3e8d7 100644 --- a/frontend/src/simulation/spice/CircuitSimulationService.ts +++ b/frontend/src/simulation/spice/CircuitSimulationService.ts @@ -391,7 +391,14 @@ export class CircuitSimulationService { const unsubscribe = this.simStore.subscribe((next, prev) => { const n = next as ReturnType; const p = prev as ReturnType; - if (n.components !== p.components || n.wires !== p.wires || n.boards !== p.boards) { + if ( + n.components !== p.components || + n.wires !== p.wires || + n.boards !== p.boards || + // P4: a part burning out (or a Reset un-burning it) changes which + // components are in the netlist, so re-solve to apply the open. + n.burntComponents !== p.burntComponents + ) { void this.tick(); } });