[backport core/1.37] fix: version mismatch warning appearing in Playwright tests despite DisableWarnings setting (#8038)

Backport of #8036 to `core/1.37`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8038-backport-core-1-37-fix-version-mismatch-warning-appearing-in-Playwright-tests-despite--2e86d73d3650818c81bacf39eeb54e13)
by [Unito](https://www.unito.io)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2026-01-14 12:43:23 +09:00
committed by GitHub
parent 3377844408
commit c6dfaefbd3
2 changed files with 13 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import { whenever } from '@vueuse/core'
import { computed, onMounted } from 'vue'
import { computed, nextTick, onMounted } from 'vue'
import { useI18n } from 'vue-i18n'
import { useToastStore } from './toastStore'
@@ -65,9 +65,12 @@ export function useFrontendVersionMismatchWarning(
versionCompatibilityStore.dismissWarning()
}
onMounted(() => {
onMounted(async () => {
// Only set up the watcher if immediate is true
if (immediate) {
// Wait for next tick to ensure reactive updates from settings load have propagated
await nextTick()
whenever(
() => versionCompatibilityStore.shouldShowWarning,
() => {

View File

@@ -88,11 +88,16 @@ export const useVersionCompatibilityStore = defineStore(
return Date.now() < dismissedUntil
})
const warningsDisabled = computed(() =>
settingStore.get('Comfy.VersionCompatibility.DisableWarnings')
)
const shouldShowWarning = computed(() => {
const warningsDisabled = settingStore.get(
'Comfy.VersionCompatibility.DisableWarnings'
return (
hasVersionMismatch.value &&
!isDismissed.value &&
!warningsDisabled.value
)
return hasVersionMismatch.value && !isDismissed.value && !warningsDisabled
})
const warningMessage = computed(() => {