From c65aebbe0c37abc36e637a5940655fb8e2adecc9 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Mon, 26 Jan 2026 00:24:54 -0800 Subject: [PATCH] fix(GraphCanvas): add ping-pong guard to palette setting watcher Phase 4: Reactivity Fixes - prevent circular trigger when activePaletteId watcher sets Comfy.ColorPalette setting which would trigger the palette watcher back Amp-Thread-ID: https://ampcode.com/threads/T-019bf966-9b22-70af-a5be-1c9c2deb3d1e Co-authored-by: Amp --- src/components/graph/GraphCanvas.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index b73dabdae..501c69dae 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -322,7 +322,10 @@ watch( watch( () => colorPaletteStore.activePaletteId, async (newValue) => { - await settingStore.set('Comfy.ColorPalette', newValue) + // Guard against ping-pong: only set if value actually differs + if (newValue && settingStore.get('Comfy.ColorPalette') !== newValue) { + await settingStore.set('Comfy.ColorPalette', newValue) + } } )