Corrected persisting logic in versioncompatibility store, corrected placement of component in graphview.vue so that it only loads after the versions are fetched from api and corrected the UI of the banner to be more smooth with better UX

This commit is contained in:
shivansh-gupta4
2025-07-21 00:58:56 +05:30
parent 4f336f7ac3
commit 561bb00850
3 changed files with 14 additions and 7 deletions

View File

@@ -3,11 +3,11 @@
v-if="versionStore.shouldShowWarning"
severity="warn"
icon="pi pi-exclamation-triangle"
class="my-2 mx-2"
:closable="true"
class="my-2 mx-2 version-warning-fix"
:pt="{
root: { class: 'flex-col' },
text: { class: 'flex-1' }
text: { class: 'flex-1' },
icon: { class: 'flex items-start mt-1' }
}"
@close="handleDismiss"
>
@@ -77,3 +77,10 @@ const handleUpdate = () => {
)
}
</script>
<style scoped>
.version-warning-fix :deep(.p-message-icon) {
align-self: flex-start;
margin-top: 0.125rem;
}
</style>

View File

@@ -13,7 +13,9 @@ export const useVersionCompatibilityStore = defineStore(
const settingStore = useSettingStore()
const isDismissed = ref(false)
const dismissedVersion = ref<string | null>(null)
const dismissedVersion = ref<string | null>(
settingStore.get('Comfy.VersionMismatch.DismissedVersion') ?? null
)
const frontendVersion = computed(() => config.app_version)
const backendVersion = computed(

View File

@@ -217,9 +217,6 @@ onMounted(() => {
} catch (e) {
console.error('Failed to init ComfyUI frontend', e)
}
// Initialize version compatibility checking (fire-and-forget)
void versionCompatibilityStore.initialize()
})
onBeforeUnmount(() => {
@@ -257,6 +254,7 @@ const onGraphReady = () => {
// Explicitly initialize nodeSearchService to avoid indexing delay when
// node search is triggered
useNodeDefStore().nodeSearchService.searchNode('')
void versionCompatibilityStore.initialize()
},
{ timeout: 1000 }
)