reset() in lib/provider/map_data_state.dart:2984 clears segments, lines, stations, canvas objects, collections and the parent maps, but not _scripts, _scriptParentOf, _prefabs, _customFonts or _glyphs. After File > New the previous map's scripts, prefabs (now pointing at deleted master collections), embedded fonts and glyphs are still there and get saved into the new file.
Evidence:test/review_probes/engine_model_ops_probe.dart (local, untracked) prints after reset: scripts=1 prefabs=1 scriptParentOf=1 collections=0. Fonts and glyphs are from reading the same function.
Fix sketch: clear the five missing collections in reset() and evict the font and glyph caches the way hydrate does.
From the engineering review on 2026-10-13.
`reset()` in `lib/provider/map_data_state.dart:2984` clears segments, lines, stations, canvas objects, collections and the parent maps, but not `_scripts`, `_scriptParentOf`, `_prefabs`, `_customFonts` or `_glyphs`. After File > New the previous map's scripts, prefabs (now pointing at deleted master collections), embedded fonts and glyphs are still there and get saved into the new file.
**Evidence:** `test/review_probes/engine_model_ops_probe.dart` (local, untracked) prints `after reset: scripts=1 prefabs=1 scriptParentOf=1 collections=0`. Fonts and glyphs are from reading the same function.
**Fix sketch:** clear the five missing collections in `reset()` and evict the font and glyph caches the way `hydrate` does.
ImBenji
added the bug label 2026-10-13 02:28:36 +00:00
ImBenji
added this to the Arcs & Angles project 2026-10-13 02:28:36 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From the engineering review on 2026-10-13.
reset()inlib/provider/map_data_state.dart:2984clears segments, lines, stations, canvas objects, collections and the parent maps, but not_scripts,_scriptParentOf,_prefabs,_customFontsor_glyphs. After File > New the previous map's scripts, prefabs (now pointing at deleted master collections), embedded fonts and glyphs are still there and get saved into the new file.Evidence:
test/review_probes/engine_model_ops_probe.dart(local, untracked) printsafter reset: scripts=1 prefabs=1 scriptParentOf=1 collections=0. Fonts and glyphs are from reading the same function.Fix sketch: clear the five missing collections in
reset()and evict the font and glyph caches the wayhydratedoes.