From 839a443d0281c89e394436facee51cf69e267860 Mon Sep 17 00:00:00 2001 From: Milan Rother Date: Sat, 9 May 2026 09:35:35 +0200 Subject: [PATCH 01/16] fix: clean up recordingData subscriptions in BlockPropertiesDialog --- src/lib/components/dialogs/BlockPropertiesDialog.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/dialogs/BlockPropertiesDialog.svelte b/src/lib/components/dialogs/BlockPropertiesDialog.svelte index c27783de..58234fce 100644 --- a/src/lib/components/dialogs/BlockPropertiesDialog.svelte +++ b/src/lib/components/dialogs/BlockPropertiesDialog.svelte @@ -76,6 +76,7 @@ unsubscribeDialog(); unsubscribeNodes(); unsubscribeTheme(); + recordingData.destroy(); destroyEditor(); }); From f3538b9eaadb3cc2e667bb71a78f249420311bc3 Mon Sep 17 00:00:00 2001 From: Milan Rother Date: Sat, 9 May 2026 09:35:53 +0200 Subject: [PATCH 02/16] fix: clean up registry/path subscriptions in EventsPanel --- src/lib/components/panels/EventsPanel.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/components/panels/EventsPanel.svelte b/src/lib/components/panels/EventsPanel.svelte index ddf292ea..afcd0e67 100644 --- a/src/lib/components/panels/EventsPanel.svelte +++ b/src/lib/components/panels/EventsPanel.svelte @@ -18,7 +18,7 @@ // Re-derive event types whenever the registry changes (runtime install/uninstall) let registryTick = $state(0); - eventRegistryVersion.subscribe((v) => (registryTick = v)); + const unsubscribeRegistry = eventRegistryVersion.subscribe((v) => (registryTick = v)); const eventTypes = $derived.by(() => { void registryTick; return eventRegistry.getAll(); @@ -26,7 +26,7 @@ // Track if at root level let isAtRoot = $state(true); - graphStore.currentPath.subscribe((path) => { + const unsubscribePath = graphStore.currentPath.subscribe((path) => { isAtRoot = path.length === 0; }); @@ -57,7 +57,11 @@ } } - onDestroy(clearHoverTimers); + onDestroy(() => { + clearHoverTimers(); + unsubscribeRegistry(); + unsubscribePath(); + }); function handleMouseEnter(item: EventTypeDefinition) { if (hoverCloseTimer !== null) { From 738bd3ea600b1fe28464731381b0c710dbfcd45f Mon Sep 17 00:00:00 2001 From: Milan Rother Date: Sat, 9 May 2026 09:36:02 +0200 Subject: [PATCH 03/16] fix: clean up registry subscription in NodeLibrary --- src/lib/components/panels/NodeLibrary.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/components/panels/NodeLibrary.svelte b/src/lib/components/panels/NodeLibrary.svelte index ecf0fd3c..3410e777 100644 --- a/src/lib/components/panels/NodeLibrary.svelte +++ b/src/lib/components/panels/NodeLibrary.svelte @@ -21,7 +21,7 @@ // Registry change counter — read it inside derived blocks so they re-run // whenever a toolbox install/uninstall mutates the registry. let registryTick = $state(0); - registryVersion.subscribe((v) => (registryTick = v)); + const unsubscribeRegistry = registryVersion.subscribe((v) => (registryTick = v)); // Search query let searchQuery = $state(''); @@ -64,7 +64,10 @@ } } - onDestroy(clearHoverTimers); + onDestroy(() => { + clearHoverTimers(); + unsubscribeRegistry(); + }); // Collapsed categories let collapsedCategories = $state>(new Set()); From 2c6c1344323cc6e3f5995e751de6f70b849eac42 Mon Sep 17 00:00:00 2001 From: Milan Rother Date: Sat, 9 May 2026 09:36:22 +0200 Subject: [PATCH 04/16] fix: clean up toolboxes subscription in ToolboxManagerDialog --- src/lib/components/dialogs/ToolboxManagerDialog.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/dialogs/ToolboxManagerDialog.svelte b/src/lib/components/dialogs/ToolboxManagerDialog.svelte index 2363cad2..f3a66368 100644 --- a/src/lib/components/dialogs/ToolboxManagerDialog.svelte +++ b/src/lib/components/dialogs/ToolboxManagerDialog.svelte @@ -1,4 +1,5 @@ - - -{#if state.open && state.options} -