You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
diagram: charts keep showing the old run after the model stops simulating #813
When an edit makes the model fail to simulate, the editor keeps showing the last successful run's curves in sparklines and the details chart as if they were current.
The status indicator turns to error, but the curves give no sign they are out of date, so a modeler can read results from a model that no longer exists.
Curves should either disappear or be clearly marked stale until the model simulates again.
Example
Simulate any model, then change a flow's equation to reference an undefined variable.
Click a stock that still has a valid equation: its chart shows the pre-edit run.
Fix
ProjectController.data is set only after a successful run and never cleared. runSim returns early when isSimulatable() is false, or when both the normal run and the retry without LTM fail, leaving the old series attached to the new project.
Recommended: clear the series (and seriesByIdent) on those early returns; this is a few lines.
Alternative: keep the last good series but carry a stale flag in the snapshot and dim the charts; nicer, but touches every chart consumer.
Pointers
src/diagram/project-controller.ts (runSim, data, seriesByIdent, render attaches series via projectAttachSeries)
changed the title [-]diagram: stale pre-edit sim curves shown (no staleness indicator) after an edit makes the model non-simulatable[/-][+]diagram: charts keep showing the old run after the model stops simulating[/+]on Oct 12, 2026
Activity
[-]diagram: stale pre-edit sim curves shown (no staleness indicator) after an edit makes the model non-simulatable[/-][+]diagram: charts keep showing the old run after the model stops simulating[/+]