Commit 4aeefea
Emit incremental turtle snapshots on sleep and fix stacking
When user code calls time.sleep(), emit the current turtle SVG so the
drawing updates live rather than only appearing at the end. Deduplicate
via _last_emitted_turtle_svg so identical frames are never sent twice,
and apply the same dedup to _render_turtle and turtle.done()/mainloop().
Consolidate the three separate SVG-fetch-encode-emit blocks (turtle_hook
render closure, debug frame_callback, _render_turtle) into the single
_emit_turtle_snapshot helper.
Fix the frontend regression where incremental SVGs were appended instead
of replacing the previous frame by removing the debugger-only guard from
the "show only latest SVG" filter in Output.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c561d93 commit 4aeefea
File tree
3 files changed
+30
-38
lines changed- src
- backend/workers/python/papyros
- frontend/components
3 files changed
+30
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
| |||
222 | 234 | | |
223 | 235 | | |
224 | 236 | | |
| 237 | + | |
225 | 238 | | |
226 | 239 | | |
227 | 240 | | |
| |||
256 | 269 | | |
257 | 270 | | |
258 | 271 | | |
259 | | - | |
260 | 272 | | |
261 | 273 | | |
262 | 274 | | |
263 | 275 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 63 | + | |
72 | 64 | | |
73 | 65 | | |
74 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments