Deactivate graph poll timer on client disconnect

Prevents 'parent slot deleted' RuntimeError when the timeline
tab is destroyed while the timer is still firing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 22:59:24 +01:00
parent 15047016b9
commit 08338746e2
+5
View File
@@ -467,6 +467,11 @@ def render_timeline_tab(state: AppState):
graph_timer = ui.timer(0.5, _poll_graph_click) graph_timer = ui.timer(0.5, _poll_graph_click)
def _cleanup_timer():
if graph_timer is not None:
graph_timer.active = False
ui.context.client.on_disconnect(_cleanup_timer)
_graphviz_svg_cache: dict[str, str] = {} _graphviz_svg_cache: dict[str, str] = {}
_GRAPHVIZ_CACHE_MAX = 20 _GRAPHVIZ_CACHE_MAX = 20