From 52483b34ed55580959bbbe498a941937d2f8addc Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:29:20 -0800 Subject: [PATCH] fix: improve locale change watcher to wait for settings and i18n in parallel - Remove redundant useVueFeatureFlags() call - Wait for settings and i18n readiness in parallel instead of sequentially - Add warning log when locale changes during error state Amp-Thread-ID: https://ampcode.com/threads/T-019bfb8f-8b22-740f-a77d-9280bcc44be8 Co-authored-by: Amp --- src/components/graph/GraphCanvas.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 5d7e9c199c..a964529157 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -403,7 +403,6 @@ useNodeBadge() useGlobalLitegraph() useContextMenuTranslation() -useVueFeatureFlags() useCopy() usePaste() useWorkflowAutoSave() @@ -413,11 +412,15 @@ watch( () => settingStore.get('Comfy.Locale'), async (_newLocale, oldLocale) => { if (!oldLocale) return - await until(() => isSettingsReady.value || !!settingsError.value).toBe(true) await Promise.all([ - until(() => isI18nReady.value || !!i18nError.value).toBe(true), - newUserService().initializeIfNewUser(settingStore) + until(() => isSettingsReady.value || !!settingsError.value).toBe(true), + until(() => isI18nReady.value || !!i18nError.value).toBe(true) ]) + if (settingsError.value || i18nError.value) { + console.warn( + 'Somehow the Locale setting was changed while the settings or i18n had a setup error' + ) + } await useCommandStore().execute('Comfy.RefreshNodeDefinitions') await useWorkflowService().reloadCurrentWorkflow() }