Repository navigation
Commit 8815559
committed
fix(levelcode-ai): tear down group + label state on reset / checkpoint restore
Review caught that the new calm-transcript state outlives a log wipe:
- The `reset` handler cleared the log HTML and the card/step maps but left
`curGroup` pointing at the now-detached `.groupbody` and `turnLabeled` set.
The next run would append into disconnected DOM (nothing shows), and the first
assistant line would render as an unlabeled continuation. Reset both now.
- `applyCheckpointRestored` removes this turn's (and later turns') DOM and pruned
only the card maps — the step maps and a possibly-stranded `curGroup` were left
behind. It now prunes editSteps/termSteps/verifySteps too and drops the group
if its element was removed. (This also completes the earlier request to prune
step maps on checkpoint restore, not just on reset.)
- `pruneDetached` is now dual-mode: it follows `.card` for step-map values, so
the same helper works for both card and step maps.
webviewCss +2 static guards. Gate green (22 suites).1 parent 569a320 commit 8815559
2 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2814 | 2814 | | |
2815 | 2815 | | |
2816 | 2816 | | |
2817 | | - | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
2818 | 2820 | | |
2819 | 2821 | | |
2820 | 2822 | | |
2821 | 2823 | | |
2822 | 2824 | | |
| 2825 | + | |
| 2826 | + | |
2823 | 2827 | | |
2824 | 2828 | | |
2825 | 2829 | | |
| |||
2914 | 2918 | | |
2915 | 2919 | | |
2916 | 2920 | | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
2917 | 2925 | | |
2918 | 2926 | | |
2919 | 2927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
117 | 134 | | |
0 commit comments