-
-
-
-
-
-
diff --git a/src/platform/openOnCloud/modelUpload.test.ts b/src/platform/openOnCloud/modelUpload.test.ts
deleted file mode 100644
index 9a64a3b2f08..00000000000
--- a/src/platform/openOnCloud/modelUpload.test.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import type { CloudMissingModel } from '@/platform/openOnCloud/cloudWorkflowCheck'
-import {
- formatBytes,
- uploadFiles,
- uploadPercent
-} from '@/platform/openOnCloud/modelUpload'
-
-const lora: CloudMissingModel = {
- name: 'add-detail-xl.safetensors',
- folder: 'loras',
- bytes: 218_000_000
-}
-const checkpoint: CloudMissingModel = {
- name: 'juggernautXL_v9.safetensors',
- folder: 'checkpoints',
- bytes: 6_600_000_000
-}
-
-describe(uploadFiles, () => {
- it.for<{ name: string; uploadedBytes: number; expected: number[] }>([
- { name: 'nothing sent yet', uploadedBytes: 0, expected: [0, 0] },
- {
- name: 'the first model part way',
- uploadedBytes: 100_000_000,
- expected: [100_000_000, 0]
- },
- {
- name: 'the first model done, the second part way',
- uploadedBytes: 2_618_000_000,
- expected: [218_000_000, 2_400_000_000]
- },
- {
- name: 'every model done',
- uploadedBytes: 6_818_000_000,
- expected: [218_000_000, 6_600_000_000]
- }
- ])('fills the models in order: $name', ({ uploadedBytes, expected }) => {
- expect(
- uploadFiles([lora, checkpoint], uploadedBytes).map(
- (file) => file.uploadedBytes
- )
- ).toEqual(expected)
- })
-})
-
-describe(uploadPercent, () => {
- it('rounds down, so it reads 100% only once every byte is sent', () => {
- expect(uploadPercent([lora, checkpoint], 6_817_000_000)).toBe(99)
- expect(uploadPercent([lora, checkpoint], 2_618_000_000)).toBe(38)
- })
-})
-
-describe(formatBytes, () => {
- it.for<{
- bytes: number
- options?: Parameters[2]
- expected: string
- }>([
- { bytes: 218_000_000, expected: '218 MB' },
- { bytes: 6_818_000_000, expected: '6.8 GB' },
- {
- bytes: 2_400_000_000,
- options: { scaleBytes: 6_600_000_000, withUnit: false },
- expected: '2.4'
- }
- ])('formats $bytes as $expected', ({ bytes, options, expected }) => {
- expect(formatBytes('en', bytes, options)).toBe(expected)
- })
-})
diff --git a/src/platform/openOnCloud/modelUpload.ts b/src/platform/openOnCloud/modelUpload.ts
deleted file mode 100644
index 69644440c11..00000000000
--- a/src/platform/openOnCloud/modelUpload.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { sumBy } from 'es-toolkit'
-
-import type { CloudMissingModel } from '@/platform/openOnCloud/cloudWorkflowCheck'
-
-export type ModelUploadState =
- | { phase: 'idle' }
- | { phase: 'uploading'; models: CloudMissingModel[]; uploadedBytes: number }
-
-export interface ModelUploadFile {
- model: CloudMissingModel
- uploadedBytes: number
-}
-
-export function totalBytes(models: readonly CloudMissingModel[]): number {
- return sumBy(models, (model) => model.bytes ?? 0)
-}
-
-export function uploadFiles(
- models: readonly CloudMissingModel[],
- uploadedBytes: number
-): ModelUploadFile[] {
- return models.map((model, index) => {
- const before = totalBytes(models.slice(0, index))
- return {
- model,
- uploadedBytes: Math.min(
- model.bytes ?? 0,
- Math.max(0, uploadedBytes - before)
- )
- }
- })
-}
-
-export function uploadPercent(
- models: readonly CloudMissingModel[],
- uploadedBytes: number
-): number {
- const total = totalBytes(models)
- return total === 0 ? 100 : Math.floor((uploadedBytes / total) * 100)
-}
-
-const BYTE_UNITS = [
- { unit: 'gigabyte', bytes: 1e9 },
- { unit: 'megabyte', bytes: 1e6 },
- { unit: 'kilobyte', bytes: 1e3 }
-] as const
-
-function unitFor(bytes: number) {
- return BYTE_UNITS.find((unit) => bytes >= unit.bytes) ?? BYTE_UNITS[2]
-}
-
-export function formatBytes(
- locale: string,
- bytes: number,
- { scaleBytes = bytes, withUnit = true } = {}
-): string {
- const { unit, bytes: unitBytes } = unitFor(scaleBytes)
- return new Intl.NumberFormat(locale, {
- maximumFractionDigits: 1,
- ...(withUnit && { style: 'unit', unit })
- }).format(bytes / unitBytes)
-}
diff --git a/src/platform/openOnCloud/runOnCloudModalState.test.ts b/src/platform/openOnCloud/runOnCloudModalState.test.ts
index d2ed3693063..a4a752b0e64 100644
--- a/src/platform/openOnCloud/runOnCloudModalState.test.ts
+++ b/src/platform/openOnCloud/runOnCloudModalState.test.ts
@@ -5,19 +5,16 @@ import type {
CloudWorkflowCheckState,
CloudWorkflowGaps
} from '@/platform/openOnCloud/cloudWorkflowCheck'
-import type { ModelUploadState } from '@/platform/openOnCloud/modelUpload'
import type { RunOnCloudModalState } from '@/platform/openOnCloud/runOnCloudModalState'
import { runOnCloudModalState } from '@/platform/openOnCloud/runOnCloudModalState'
const lora: CloudMissingModel = {
name: 'add-detail-xl.safetensors',
- folder: 'loras',
- bytes: 200
+ folder: 'loras'
}
const checkpoint: CloudMissingModel = {
name: 'juggernautXL_v9.safetensors',
- folder: 'checkpoints',
- bytes: 800
+ folder: 'checkpoints'
}
const packsOnly: CloudWorkflowGaps = {
@@ -33,8 +30,6 @@ const modelsOnly: CloudWorkflowGaps = {
models: [lora, checkpoint]
}
-const idleUpload: ModelUploadState = { phase: 'idle' }
-
function answered(
verdict: Extract['verdict']
): CloudWorkflowCheckState {
@@ -79,41 +74,19 @@ describe(runOnCloudModalState, () => {
signedOut: { kind: 'deploySetup' }
},
{
- name: 'only models missing: Upload models, which signs a signed-out person in first',
+ name: 'only models missing: show the missing models',
check: answered({ kind: 'missing', gaps: modelsOnly }),
signedIn: {
- kind: 'uploadModels',
- models: [lora, checkpoint],
- signInToUpload: false
+ kind: 'missingModels',
+ models: [lora, checkpoint]
},
signedOut: {
- kind: 'uploadModels',
- models: [lora, checkpoint],
- signInToUpload: true
+ kind: 'missingModels',
+ models: [lora, checkpoint]
}
}
])('$name', ({ check, signedIn, signedOut }) => {
- expect(runOnCloudModalState(check, idleUpload, { signedIn: true })).toEqual(
- signedIn
- )
- expect(
- runOnCloudModalState(check, idleUpload, { signedIn: false })
- ).toEqual(signedOut)
- })
-
- it('shows a running upload and how far it has got over the answer', () => {
- const upload: ModelUploadState = {
- phase: 'uploading',
- models: [lora, checkpoint],
- uploadedBytes: 380
- }
-
- expect(
- runOnCloudModalState(
- answered({ kind: 'missing', gaps: modelsOnly }),
- upload,
- { signedIn: true }
- )
- ).toEqual({ kind: 'uploading', models: [lora, checkpoint], percent: 38 })
+ expect(runOnCloudModalState(check, { signedIn: true })).toEqual(signedIn)
+ expect(runOnCloudModalState(check, { signedIn: false })).toEqual(signedOut)
})
})
diff --git a/src/platform/openOnCloud/runOnCloudModalState.ts b/src/platform/openOnCloud/runOnCloudModalState.ts
index fc0b69e091d..d89bc6b3d93 100644
--- a/src/platform/openOnCloud/runOnCloudModalState.ts
+++ b/src/platform/openOnCloud/runOnCloudModalState.ts
@@ -2,31 +2,17 @@ import type {
CloudMissingModel,
CloudWorkflowCheckState
} from '@/platform/openOnCloud/cloudWorkflowCheck'
-import type { ModelUploadState } from '@/platform/openOnCloud/modelUpload'
-import { uploadPercent } from '@/platform/openOnCloud/modelUpload'
export type RunOnCloudModalState =
| { kind: 'checking' }
| { kind: 'ready'; asksToSignIn: boolean }
| { kind: 'deploySetup' }
- | {
- kind: 'uploadModels'
- models: CloudMissingModel[]
- signInToUpload: boolean
- }
- | { kind: 'uploading'; models: CloudMissingModel[]; percent: number }
+ | { kind: 'missingModels'; models: CloudMissingModel[] }
export function runOnCloudModalState(
check: CloudWorkflowCheckState,
- upload: ModelUploadState,
{ signedIn }: { signedIn: boolean }
): RunOnCloudModalState {
- if (upload.phase === 'uploading')
- return {
- kind: 'uploading',
- models: upload.models,
- percent: uploadPercent(upload.models, upload.uploadedBytes)
- }
if (check.phase !== 'answered') return { kind: 'checking' }
const { verdict } = check
switch (verdict.kind) {
@@ -36,9 +22,8 @@ export function runOnCloudModalState(
return verdict.gaps.nodePacks.length > 0
? { kind: 'deploySetup' }
: {
- kind: 'uploadModels',
- models: verdict.gaps.models,
- signInToUpload: !signedIn
+ kind: 'missingModels',
+ models: verdict.gaps.models
}
}
}
diff --git a/src/platform/openOnCloud/stores/cloudWorkflowCheckStore.ts b/src/platform/openOnCloud/stores/cloudWorkflowCheckStore.ts
index a30f5763041..9177ae4c8d2 100644
--- a/src/platform/openOnCloud/stores/cloudWorkflowCheckStore.ts
+++ b/src/platform/openOnCloud/stores/cloudWorkflowCheckStore.ts
@@ -1,53 +1,30 @@
-import { defineStore, storeToRefs } from 'pinia'
-import { computed, ref, shallowRef, watch } from 'vue'
+import { defineStore } from 'pinia'
+import { shallowRef, watch } from 'vue'
+import { useCurrentUser } from '@/composables/auth/useCurrentUser'
+import { checkCloudCompatibility } from '@/platform/openOnCloud/cloudCompatibilityApi'
import type {
- CloudWorkflowChecker,
CloudWorkflowCheckEvent,
- CloudWorkflowCheckState,
- PrototypeScenario
-} from '@/platform/openOnCloud/cloudWorkflowCheck'
-import {
- prototypeCloudWorkflowChecker,
- prototypeVerdict,
- reduceCloudWorkflowCheck
+ CloudWorkflowCheckState
} from '@/platform/openOnCloud/cloudWorkflowCheck'
-import { checkCloudCompatibility } from '@/platform/openOnCloud/cloudCompatibilityApi'
-import { useLocalSignInStore } from '@/platform/openOnCloud/stores/localSignInStore'
-import type { ComfyWorkflowJSON } from '@comfyorg/graph-model/workflowSchema'
+import { reduceCloudWorkflowCheck } from '@/platform/openOnCloud/cloudWorkflowCheck'
export const useCloudWorkflowCheckStore = defineStore(
'cloudWorkflowCheck',
() => {
- const { signedIn } = storeToRefs(useLocalSignInStore())
- const prototypeScenario = ref('live')
- const uploadedModels = ref([])
+ const { isLoggedIn } = useCurrentUser()
const state = shallowRef({ phase: 'idle' })
- const pick = () => ({
- scenario:
- prototypeScenario.value === 'live'
- ? ('compatible' as const)
- : prototypeScenario.value,
- signedIn: signedIn.value,
- libraryHasModels: false,
- uploadedModels: uploadedModels.value
- })
- const checker = prototypeCloudWorkflowChecker(pick)
let lastRun = 0
- let lastWorkflow: ComfyWorkflowJSON | undefined
function dispatch(event: CloudWorkflowCheckEvent) {
state.value = reduceCloudWorkflowCheck(state.value, event)
}
- async function run(
- workflow: ComfyWorkflowJSON,
- ask: CloudWorkflowChecker
- ): Promise {
+ async function check(): Promise {
const run = ++lastRun
dispatch({ type: 'started', run })
try {
- const verdict = await ask(workflow)
+ const verdict = await checkCloudCompatibility()
dispatch(
verdict ? { type: 'answered', run, verdict } : { type: 'failed', run }
)
@@ -56,47 +33,10 @@ export const useCloudWorkflowCheckStore = defineStore(
}
}
- function check(workflow: ComfyWorkflowJSON): Promise {
- lastWorkflow = workflow
- return run(workflow, preview.value ? checker : checkCloudCompatibility)
- }
-
- const preview = computed(
- () => import.meta.env.DEV && prototypeScenario.value !== 'live'
- )
-
- function answerFromPanel() {
- const run = ++lastRun
- dispatch({ type: 'started', run })
- const verdict = prototypeVerdict(pick())
- if (verdict) dispatch({ type: 'answered', run, verdict })
- }
-
- function markUploaded(names: readonly string[]) {
- uploadedModels.value = [...uploadedModels.value, ...names]
- }
-
- function forgetUploads() {
- uploadedModels.value = []
- }
-
- watch([prototypeScenario, uploadedModels], () => {
- if (!lastWorkflow) return
- if (preview.value) answerFromPanel()
- else void check(lastWorkflow)
- })
-
- watch(signedIn, () => {
- if (lastWorkflow) void check(lastWorkflow)
+ watch(isLoggedIn, () => {
+ if (lastRun) void check()
})
- return {
- state,
- preview,
- prototypeScenario,
- check,
- markUploaded,
- forgetUploads
- }
+ return { state, check }
}
)
diff --git a/src/platform/openOnCloud/stores/localSignInStore.ts b/src/platform/openOnCloud/stores/localSignInStore.ts
deleted file mode 100644
index 27c48bc9b34..00000000000
--- a/src/platform/openOnCloud/stores/localSignInStore.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { defineStore } from 'pinia'
-import { computed, ref } from 'vue'
-
-import { useAuthDialogs } from '@/composables/auth/useAuthDialogs'
-import { useCurrentUser } from '@/composables/auth/useCurrentUser'
-
-export const useLocalSignInStore = defineStore('openOnCloudLocalSignIn', () => {
- const { showSignInDialog } = useAuthDialogs()
- const { isLoggedIn } = useCurrentUser()
- const previewSignedIn = ref(false)
- const signedIn = computed(
- () => isLoggedIn.value || (import.meta.env.DEV && previewSignedIn.value)
- )
-
- async function signIn(preview: boolean) {
- if (import.meta.env.DEV && preview) {
- previewSignedIn.value = true
- return
- }
- await showSignInDialog()
- }
-
- return { signedIn, previewSignedIn, signIn }
-})
diff --git a/src/platform/openOnCloud/stores/modelUploadStore.ts b/src/platform/openOnCloud/stores/modelUploadStore.ts
deleted file mode 100644
index 56b26de0324..00000000000
--- a/src/platform/openOnCloud/stores/modelUploadStore.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { defineStore } from 'pinia'
-import { shallowRef } from 'vue'
-
-import type { CloudMissingModel } from '@/platform/openOnCloud/cloudWorkflowCheck'
-import type { ModelUploadState } from '@/platform/openOnCloud/modelUpload'
-import { totalBytes } from '@/platform/openOnCloud/modelUpload'
-import { useCloudWorkflowCheckStore } from '@/platform/openOnCloud/stores/cloudWorkflowCheckStore'
-
-const PROTOTYPE_UPLOAD_MS = 20_000
-const PROTOTYPE_UPLOAD_TICK_MS = 250
-
-export const useModelUploadStore = defineStore('openOnCloudModelUpload', () => {
- const checkStore = useCloudWorkflowCheckStore()
- const state = shallowRef({ phase: 'idle' })
- let ticker: ReturnType | undefined
-
- function stopTicking() {
- clearInterval(ticker)
- ticker = undefined
- }
-
- function tick(models: CloudMissingModel[], step: number) {
- const current = state.value
- if (current.phase !== 'uploading') return
- const uploadedBytes = current.uploadedBytes + step
- if (uploadedBytes < totalBytes(models)) {
- state.value = { ...current, uploadedBytes }
- return
- }
- stopTicking()
- state.value = { phase: 'idle' }
- checkStore.markUploaded(models.map((model) => model.name))
- }
-
- function start(models: CloudMissingModel[]) {
- stopTicking()
- const step =
- totalBytes(models) / (PROTOTYPE_UPLOAD_MS / PROTOTYPE_UPLOAD_TICK_MS)
- state.value = { phase: 'uploading', models, uploadedBytes: 0 }
- ticker = setInterval(() => tick(models, step), PROTOTYPE_UPLOAD_TICK_MS)
- }
-
- function cancel() {
- stopTicking()
- state.value = { phase: 'idle' }
- }
-
- function reset() {
- cancel()
- checkStore.forgetUploads()
- }
-
- return { state, start, cancel, reset }
-})
From ca82d8c6ddc08b6ba326b526b3fa45dd2f3810c8 Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 19:15:25 +0800
Subject: [PATCH 03/39] test: cover live Open on Cloud compatibility flows
---
.../openOnCloud/01-runnable-on-cloud.json | 54 ++++
.../openOnCloud/02-missing-cloud-node.json | 69 +++++
.../openOnCloud/03-missing-cloud-model.json | 262 ++++++++++++++++++
.../fixtures/liveOpenOnCloudFixture.ts | 78 ++++++
.../fixtures/networkIsolationFixture.ts | 28 +-
.../tests/liveCloud/openOnCloud.spec.ts | 174 ++++++++++++
.../tests/liveCloud/openOnCloudLogin.spec.ts | 49 ++++
docs/testing/open-on-cloud-e2e.md | 47 ++++
8 files changed, 757 insertions(+), 4 deletions(-)
create mode 100644 browser_tests/assets/openOnCloud/01-runnable-on-cloud.json
create mode 100644 browser_tests/assets/openOnCloud/02-missing-cloud-node.json
create mode 100644 browser_tests/assets/openOnCloud/03-missing-cloud-model.json
create mode 100644 browser_tests/fixtures/liveOpenOnCloudFixture.ts
create mode 100644 browser_tests/tests/liveCloud/openOnCloud.spec.ts
create mode 100644 browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts
create mode 100644 docs/testing/open-on-cloud-e2e.md
diff --git a/browser_tests/assets/openOnCloud/01-runnable-on-cloud.json b/browser_tests/assets/openOnCloud/01-runnable-on-cloud.json
new file mode 100644
index 00000000000..1e85f8b64f5
--- /dev/null
+++ b/browser_tests/assets/openOnCloud/01-runnable-on-cloud.json
@@ -0,0 +1,54 @@
+{
+ "last_node_id": 2,
+ "last_link_id": 1,
+ "nodes": [
+ {
+ "id": 1,
+ "type": "EmptyImage",
+ "pos": [150, 140],
+ "size": [270, 130],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [1],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "EmptyImage"
+ },
+ "widgets_values": [256, 256, 1, 42920]
+ },
+ {
+ "id": 2,
+ "type": "SaveImage",
+ "pos": [480, 140],
+ "size": [300, 285],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 1
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "Node name for S&R": "SaveImage"
+ },
+ "widgets_values": ["open-on-cloud-validation"]
+ }
+ ],
+ "links": [[1, 1, 0, 2, 0, "IMAGE"]],
+ "groups": [],
+ "config": {},
+ "extra": {},
+ "version": 0.4
+}
diff --git a/browser_tests/assets/openOnCloud/02-missing-cloud-node.json b/browser_tests/assets/openOnCloud/02-missing-cloud-node.json
new file mode 100644
index 00000000000..d37e52265fb
--- /dev/null
+++ b/browser_tests/assets/openOnCloud/02-missing-cloud-node.json
@@ -0,0 +1,69 @@
+{
+ "last_node_id": 72,
+ "last_link_id": 83,
+ "nodes": [
+ {
+ "id": 63,
+ "type": "VAELoader",
+ "pos": [150, 140],
+ "size": [320, 106.65625],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "links": [83]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAELoader",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.73",
+ "models": [
+ {
+ "name": "ae.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors",
+ "directory": "vae"
+ }
+ ],
+ "enableTabs": false,
+ "tabWidth": 65,
+ "tabXOffset": 10,
+ "hasSecondTab": false,
+ "secondTabText": "Send Back",
+ "secondTabOffset": 80,
+ "secondTabWidth": 65
+ },
+ "widgets_values": ["ae.safetensors"]
+ },
+ {
+ "id": 72,
+ "type": "VAESave",
+ "pos": [480, 140],
+ "size": [275, 85],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 83
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "Node name for S&R": "VAESave"
+ },
+ "widgets_values": ["vae/open-on-cloud-preview"]
+ }
+ ],
+ "links": [[83, 63, 0, 72, 0, "VAE"]],
+ "groups": [],
+ "config": {},
+ "extra": {},
+ "version": 0.4
+}
diff --git a/browser_tests/assets/openOnCloud/03-missing-cloud-model.json b/browser_tests/assets/openOnCloud/03-missing-cloud-model.json
new file mode 100644
index 00000000000..b121b6295b5
--- /dev/null
+++ b/browser_tests/assets/openOnCloud/03-missing-cloud-model.json
@@ -0,0 +1,262 @@
+{
+ "last_node_id": 9,
+ "last_link_id": 9,
+ "nodes": [
+ {
+ "id": 7,
+ "type": "CLIPTextEncode",
+ "pos": [413, 389],
+ "size": {
+ "0": 425.27801513671875,
+ "1": 180.6060791015625
+ },
+ "flags": {},
+ "order": 3,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 5
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [6],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": ["text, watermark"]
+ },
+ {
+ "id": 6,
+ "type": "CLIPTextEncode",
+ "pos": [415, 186],
+ "size": {
+ "0": 422.84503173828125,
+ "1": 164.31304931640625
+ },
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 3
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [4],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
+ ]
+ },
+ {
+ "id": 5,
+ "type": "EmptyLatentImage",
+ "pos": [473, 609],
+ "size": {
+ "0": 315,
+ "1": 106
+ },
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [2],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "EmptyLatentImage"
+ },
+ "widgets_values": [512, 512, 1]
+ },
+ {
+ "id": 3,
+ "type": "KSampler",
+ "pos": [863, 186],
+ "size": {
+ "0": 315,
+ "1": 262
+ },
+ "flags": {},
+ "order": 4,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 1
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 4
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 6
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 2
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [7],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "KSampler"
+ },
+ "widgets_values": [
+ 156680208700286,
+ "randomize",
+ 20,
+ 8,
+ "euler",
+ "normal",
+ 1
+ ]
+ },
+ {
+ "id": 8,
+ "type": "VAEDecode",
+ "pos": [1209, 188],
+ "size": {
+ "0": 210,
+ "1": 46
+ },
+ "flags": {},
+ "order": 5,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "samples",
+ "type": "LATENT",
+ "link": 7
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 8
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [9],
+ "slot_index": 0
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAEDecode"
+ }
+ },
+ {
+ "id": 9,
+ "type": "SaveImage",
+ "pos": [1451, 189],
+ "size": {
+ "0": 210,
+ "1": 58
+ },
+ "flags": {},
+ "order": 6,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 9
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "SaveImage"
+ },
+ "widgets_values": ["ComfyUI"]
+ },
+ {
+ "id": 4,
+ "type": "CheckpointLoaderSimple",
+ "pos": [26, 474],
+ "size": {
+ "0": 315,
+ "1": 98
+ },
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "links": [1],
+ "slot_index": 0
+ },
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "links": [3, 5],
+ "slot_index": 1
+ },
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "links": [8],
+ "slot_index": 2
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CheckpointLoaderSimple"
+ },
+ "widgets_values": ["3Guofeng3_v32Light.safetensors"]
+ }
+ ],
+ "links": [
+ [1, 4, 0, 3, 0, "MODEL"],
+ [2, 5, 0, 3, 3, "LATENT"],
+ [3, 4, 1, 6, 0, "CLIP"],
+ [4, 6, 0, 3, 1, "CONDITIONING"],
+ [5, 4, 1, 7, 0, "CLIP"],
+ [6, 7, 0, 3, 2, "CONDITIONING"],
+ [7, 3, 0, 8, 0, "LATENT"],
+ [8, 4, 2, 8, 1, "VAE"],
+ [9, 8, 0, 9, 0, "IMAGE"]
+ ],
+ "groups": [],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 0.8264462809917354,
+ "offset": [565.6800000000005, -43.919999999999995]
+ }
+ },
+ "version": 0.4
+}
diff --git a/browser_tests/fixtures/liveOpenOnCloudFixture.ts b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
new file mode 100644
index 00000000000..55b6372e941
--- /dev/null
+++ b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
@@ -0,0 +1,78 @@
+import { expect } from '@playwright/test'
+import { z } from 'zod'
+
+import { ComfyPage } from '@e2e/fixtures/ComfyPage'
+import { networkIsolationFixture as base } from '@e2e/fixtures/networkIsolationFixture'
+
+const cloudOriginSchema = z
+ .url()
+ .refine((value) => {
+ const url = new URL(value)
+ return (
+ url.protocol === 'https:' &&
+ url.href === `${url.origin}/` &&
+ /^(testcloud\.comfy\.org|stagingcloud\.comfy\.org|(?:fe-)?pr-\d+\.testenvs\.comfy\.org)$/.test(
+ url.hostname
+ )
+ )
+ }, 'OPEN_ON_CLOUD_URL must be a test, staging, or PR preview origin')
+ .transform((value) => new URL(value).origin)
+
+export const liveOpenOnCloudFixture = base.extend<{
+ cloudOrigin: string
+ comfyPage: ComfyPage
+}>({
+ baseURL: process.env.PLAYWRIGHT_TEST_URL,
+ cloudOrigin: [
+ process.env.OPEN_ON_CLOUD_URL?.replace(/\/$/, '') ?? '',
+ { option: true }
+ ],
+ liveNetworkOrigins: async ({ cloudOrigin }, use) => {
+ await use([
+ cloudOriginSchema.parse(cloudOrigin),
+ 'https://api.comfy.org',
+ 'https://stagingapi.comfy.org',
+ 'https://cloud.comfy.org',
+ 'https://testcloud.comfy.org',
+ 'https://media.comfy.org',
+ 'https://identitytoolkit.googleapis.com',
+ 'https://securetoken.googleapis.com',
+ 'https://dreamboothy-dev.firebaseapp.com',
+ 'https://apis.google.com',
+ 'https://www.gstatic.com',
+ 'https://fonts.googleapis.com',
+ 'https://fonts.gstatic.com',
+ 'https://huggingface.co'
+ ])
+ },
+ comfyPage: async ({ page, request }, use) => {
+ const comfyPage = new ComfyPage(page, request)
+ await comfyPage.goto()
+ await comfyPage.waitForAppReady()
+ const templates = page.getByRole('dialog', {
+ name: 'Get Started with a Template',
+ exact: true
+ })
+ if (await templates.isVisible()) {
+ await templates
+ .getByRole('button', { name: 'Close dialog', exact: true })
+ .press('Escape')
+ }
+ await expect(comfyPage.canvas).toBeVisible()
+ await use(comfyPage)
+ }
+})
+
+export const liveOpenOnCloudLoginFixture = liveOpenOnCloudFixture.extend({
+ liveNetworkOrigins: async ({ liveNetworkOrigins }, use) => {
+ await use([
+ ...liveNetworkOrigins,
+ 'https://browser-intake-us5-datadoghq.com',
+ 'https://utt.impactcdn.com',
+ 'https://cdn.sy-d.io',
+ 'https://t.comfy.org',
+ 'https://o4507954455314432.ingest.us.sentry.io',
+ 'https://cdp.customer.io'
+ ])
+ }
+})
diff --git a/browser_tests/fixtures/networkIsolationFixture.ts b/browser_tests/fixtures/networkIsolationFixture.ts
index 799d3a8b9ec..96bb01c1764 100644
--- a/browser_tests/fixtures/networkIsolationFixture.ts
+++ b/browser_tests/fixtures/networkIsolationFixture.ts
@@ -59,13 +59,19 @@ function guardApiRequests(
export const networkIsolationFixture = base.extend<{
liveCloudBillingConfig: LiveCloudBillingConfig | undefined
+ liveNetworkOrigins: string[]
networkPolicy: NetworkPolicy
toast: ToastHelper
}>({
serviceWorkers: 'block',
liveCloudBillingConfig: [undefined, { option: true }],
+ liveNetworkOrigins: [[], { option: true }],
networkPolicy: [
- async ({ baseURL, liveCloudBillingConfig }, use, testInfo) => {
+ async (
+ { baseURL, liveCloudBillingConfig, liveNetworkOrigins },
+ use,
+ testInfo
+ ) => {
const frontend =
process.env.PLAYWRIGHT_TEST_URL || 'http://localhost:8188'
const origins = liveCloudBillingConfig
@@ -82,7 +88,8 @@ export const networkIsolationFixture = base.extend<{
frontend,
baseURL,
process.env.PLAYWRIGHT_SETUP_API_URL,
- process.env.DEV_SERVER_COMFYUI_URL
+ process.env.DEV_SERVER_COMFYUI_URL,
+ ...liveNetworkOrigins
].flatMap((url) => (url ? [new URL(url).origin] : []))
)
const unexpected = new Set()
@@ -98,7 +105,9 @@ export const networkIsolationFixture = base.extend<{
liveCloudBillingConfig ? blocked.filter(isReportedViolation) : blocked,
liveCloudBillingConfig
? 'Forbidden live Cloud requests'
- : 'Unexpected external requests. Add a local mock.'
+ : liveNetworkOrigins.length > 0
+ ? 'Unexpected external requests during a live test'
+ : 'Unexpected external requests. Add a local mock.'
).toEqual([])
},
{ auto: true }
@@ -123,7 +132,13 @@ export const networkIsolationFixture = base.extend<{
restore()
},
context: async (
- { context, baseURL, networkPolicy, liveCloudBillingConfig },
+ {
+ context,
+ baseURL,
+ networkPolicy,
+ liveCloudBillingConfig,
+ liveNetworkOrigins
+ },
use
) => {
const { origins, unexpected } = networkPolicy
@@ -151,6 +166,11 @@ export const networkIsolationFixture = base.extend<{
await socket.close()
}
)
+ if (liveNetworkOrigins.length > 0) {
+ await use(context)
+ restore()
+ return
+ }
await context.route('https://huggingface.co/**/resolve/**', (route) =>
route.request().method() === 'HEAD'
? route.fulfill({ status: 200, body: '' })
diff --git a/browser_tests/tests/liveCloud/openOnCloud.spec.ts b/browser_tests/tests/liveCloud/openOnCloud.spec.ts
new file mode 100644
index 00000000000..1a609b50ea4
--- /dev/null
+++ b/browser_tests/tests/liveCloud/openOnCloud.spec.ts
@@ -0,0 +1,174 @@
+import { expect } from '@playwright/test'
+
+import { zCloudCompatibility } from '@comfyorg/ingest-types/zod'
+import { liveOpenOnCloudFixture as test } from '@e2e/fixtures/liveOpenOnCloudFixture'
+
+test.describe(
+ 'Open on Cloud live compatibility',
+ { tag: ['@cloud-live', '@smoke', '@ui'] },
+ () => {
+ test('offers to open a workflow that Cloud can run', async ({
+ comfyPage,
+ cloudOrigin
+ }) => {
+ await test.step('Load the runnable workflow', async () => {
+ await comfyPage.workflow.loadWorkflow(
+ 'openOnCloud/01-runnable-on-cloud'
+ )
+ })
+
+ await test.step('Check compatibility against the real Cloud server', async () => {
+ const responsePromise = comfyPage.page.waitForResponse(
+ (response) =>
+ response.url() === `${cloudOrigin}/api/cloud/compatibility` &&
+ response.request().method() === 'POST'
+ )
+ await comfyPage.page.getByTestId('cloud-button').click()
+ const response = await responsePromise
+
+ expect(response.status()).toBe(200)
+ expect(await response.serverAddr()).not.toBeNull()
+ const compatibility = zCloudCompatibility.parse(await response.json())
+ expect(compatibility.cloud.missing_node_types).toEqual([])
+ expect(compatibility.cloud.missing_models).toEqual([])
+ })
+
+ await test.step('Offer Cloud execution with the signed-out explanation', async () => {
+ await expect(
+ comfyPage.page.getByRole('heading', {
+ name: 'Run on Comfy Cloud',
+ exact: true
+ })
+ ).toBeVisible()
+ await expect(
+ comfyPage.page.getByRole('button', {
+ name: 'Open on Comfy Cloud',
+ exact: true
+ })
+ ).toBeVisible()
+ await expect(
+ comfyPage.page.getByText('Comfy Cloud will ask you to sign in.', {
+ exact: true
+ })
+ ).toBeVisible()
+ await comfyPage.attachScreenshot('runnable-on-cloud.png', {
+ runInCI: true
+ })
+ })
+ })
+
+ test('offers deployment when Cloud lacks a workflow node', async ({
+ comfyPage,
+ cloudOrigin
+ }) => {
+ await test.step('Load the workflow containing VAESave', async () => {
+ await comfyPage.workflow.loadWorkflow(
+ 'openOnCloud/02-missing-cloud-node'
+ )
+ })
+
+ await test.step('Read the missing node from the real Cloud server', async () => {
+ const responsePromise = comfyPage.page.waitForResponse(
+ (response) =>
+ response.url() === `${cloudOrigin}/api/cloud/compatibility` &&
+ response.request().method() === 'POST'
+ )
+ await comfyPage.page.getByTestId('cloud-button').click()
+ const response = await responsePromise
+
+ expect(response.status()).toBe(200)
+ expect(await response.serverAddr()).not.toBeNull()
+ const compatibility = zCloudCompatibility.parse(await response.json())
+ expect(compatibility.cloud.missing_node_types).toContain('VAESave')
+ expect(compatibility.cloud.missing_models).toEqual([])
+ })
+
+ await test.step('Offer the deployment and desktop agent choices', async () => {
+ await expect(
+ comfyPage.page.getByRole('heading', {
+ name: 'Deploy your setup to Comfy Cloud',
+ exact: true
+ })
+ ).toBeVisible()
+ await comfyPage.page
+ .getByRole('button', { name: 'Build with your agent', exact: true })
+ .click()
+ await expect(
+ comfyPage.page.getByRole('menuitem', {
+ name: 'Open in Claude desktop',
+ exact: true
+ })
+ ).toBeVisible()
+ await expect(
+ comfyPage.page.getByRole('menuitem', {
+ name: 'Open in ChatGPT desktop',
+ exact: true
+ })
+ ).toBeVisible()
+ await expect(
+ comfyPage.page.getByRole('menuitem', {
+ name: 'Copy prompt',
+ exact: true
+ })
+ ).toBeVisible()
+ await comfyPage.attachScreenshot('missing-cloud-node.png', {
+ runInCI: true
+ })
+ })
+ })
+
+ test('lists the real missing model when local uploads are unavailable', async ({
+ comfyPage,
+ cloudOrigin
+ }) => {
+ await test.step('Load the workflow using the unavailable checkpoint', async () => {
+ await comfyPage.workflow.loadWorkflow(
+ 'openOnCloud/03-missing-cloud-model'
+ )
+ })
+
+ await test.step('Read the missing model from the real Cloud server', async () => {
+ const responsePromise = comfyPage.page.waitForResponse(
+ (response) =>
+ response.url() === `${cloudOrigin}/api/cloud/compatibility` &&
+ response.request().method() === 'POST'
+ )
+ await comfyPage.page.getByTestId('cloud-button').click()
+ const response = await responsePromise
+
+ expect(response.status()).toBe(200)
+ expect(await response.serverAddr()).not.toBeNull()
+ const compatibility = zCloudCompatibility.parse(await response.json())
+ expect(compatibility.cloud.missing_node_types).toEqual([])
+ expect(compatibility.cloud.missing_models).toEqual([
+ {
+ folder: 'checkpoints',
+ name: '3Guofeng3_v32Light.safetensors'
+ }
+ ])
+ })
+
+ await test.step('Identify the missing model and the upload limitation', async () => {
+ const dialog = comfyPage.page.getByRole('dialog')
+ await expect(
+ dialog.getByRole('heading', { name: 'Missing 1 model', exact: true })
+ ).toBeVisible()
+ await expect(
+ dialog.getByText('3Guofeng3_v32Light.safetensors', { exact: true })
+ ).toBeVisible()
+ await expect(
+ dialog.getByText(
+ 'Add these models to Comfy Cloud to run this workflow. Uploads from this ComfyUI are currently unavailable.',
+ { exact: true }
+ )
+ ).toBeVisible()
+ await expect(
+ dialog.getByRole('button', { name: 'Upload', exact: true })
+ ).toHaveCount(0)
+ await comfyPage.attachScreenshot('missing-cloud-model.png', {
+ runInCI: true
+ })
+ })
+ })
+ }
+)
diff --git a/browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts b/browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts
new file mode 100644
index 00000000000..ee1f4465a78
--- /dev/null
+++ b/browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts
@@ -0,0 +1,49 @@
+import { expect } from '@playwright/test'
+
+import { liveOpenOnCloudLoginFixture as test } from '@e2e/fixtures/liveOpenOnCloudFixture'
+
+test.describe(
+ 'Open on Cloud live sign-in handoff',
+ { tag: ['@cloud-live', '@smoke', '@ui'] },
+ () => {
+ test('opens the selected Cloud deployment login page for a signed-out user', async ({
+ comfyPage,
+ cloudOrigin
+ }) => {
+ await test.step('Load the runnable workflow and check compatibility', async () => {
+ await comfyPage.workflow.loadWorkflow(
+ 'openOnCloud/01-runnable-on-cloud'
+ )
+ await comfyPage.page.getByTestId('cloud-button').click()
+ await expect(
+ comfyPage.page.getByRole('heading', {
+ name: 'Run on Comfy Cloud',
+ exact: true
+ })
+ ).toBeVisible()
+ })
+
+ await test.step('Open the real Cloud sign-in page for the workflow', async () => {
+ const cloudTabPromise = comfyPage.page.waitForEvent('popup')
+ await comfyPage.page
+ .getByRole('button', { name: 'Open on Comfy Cloud', exact: true })
+ .click()
+ const cloudTab = await cloudTabPromise
+ await expect
+ .poll(() => new URL(cloudTab.url()).origin)
+ .toBe(cloudOrigin)
+ await expect(
+ cloudTab.getByRole('heading', {
+ name: 'Log in to your account',
+ exact: true
+ })
+ ).toBeVisible()
+ await test.info().attach('cloud-sign-in.png', {
+ body: await cloudTab.screenshot(),
+ contentType: 'image/png'
+ })
+ await cloudTab.close()
+ })
+ })
+ }
+)
diff --git a/docs/testing/open-on-cloud-e2e.md b/docs/testing/open-on-cloud-e2e.md
new file mode 100644
index 00000000000..54574bd9ca6
--- /dev/null
+++ b/docs/testing/open-on-cloud-e2e.md
@@ -0,0 +1,47 @@
+# Live Open on Cloud E2E
+
+The suite uses a real local ComfyUI backend and a deployed Cloud test or PR environment. Every compatibility response comes from the configured Cloud origin. The fixture permits the app's required external services and retains the shared network guard. It installs no response replacements, auth stubs, or workflow scenario switches.
+
+## Prerequisites
+
+- Start a local ComfyUI backend.
+- Start the frontend with the Cloud destination set to the deployment under test.
+
+```sh
+VITE_STAGING_CLOUD_BASE_URL=https://fe-pr-22949.testenvs.comfy.org pnpm dev --host localhost --port 5173 --strictPort
+```
+
+- Confirm `http://localhost:8188/system_stats` and `http://localhost:5173/` respond.
+- Install the Chromium version required by the repository's Playwright dependency.
+- The local development build enables `open_on_cloud_enabled`. The three tests use fresh signed-out browser contexts.
+
+## Run
+
+```sh
+PLAYWRIGHT_CLOUD_LIVE=1 \
+PLAYWRIGHT_TEST_URL=http://localhost:5173 \
+PLAYWRIGHT_SETUP_API_URL=http://127.0.0.1:8188 \
+OPEN_ON_CLOUD_URL=https://fe-pr-22949.testenvs.comfy.org \
+pnpm test:browser browser_tests/tests/liveCloud/openOnCloud.spec.ts \
+ --project=cloud-live --workers=1 --reporter=line,html
+```
+
+Set both the development server's Cloud destination and `OPEN_ON_CLOUD_URL` when selecting another deployment. The response assertion checks that the browser contacted that exact origin.
+
+## Acceptance cases
+
+| Priority | Workflow | Expected real response and user outcome |
+| -------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
+| P1 | EmptyImage connected to SaveImage | No missing nodes or models. Show Run on Comfy Cloud with the signed-out explanation and the Open on Comfy Cloud action. |
+| P1 | VAELoader connected to VAESave | Cloud reports VAESave missing. Show Deploy your setup and the Claude, ChatGPT, and copy-prompt choices. |
+| P1 | SD workflow using 3Guofeng3_v32Light.safetensors | Cloud reports that checkpoint missing and no missing nodes. Show the exact filename and the local-upload availability notice. |
+
+Each case asserts HTTP 200, a real server address, the parsed compatibility payload, and the corresponding rendered UI. The report includes a screenshot for each result.
+
+## Hosted sign-in handoff
+
+`browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts` separately checks that Open on Comfy Cloud opens the selected deployment's actual login page in a new tab. Run it with the same environment variables, replacing the spec path in the command above. Its fixture permits the hosted application's analytics and diagnostic services as well as its application requests. Follow the execution environment's authorization requirements before running it.
+
+## Remaining acceptance work
+
+Authenticated local-to-Cloud import and Cloud execution require an authenticated Cloud browser context and an enabled receiver flag. These are separate from the three compatibility cases and the signed-out login test. The actual model-upload flow remains incomplete in the implementation and requires its own live upload acceptance once available.
From 14bd23bbbde0859311671dead8f2eec1c0e27b3b Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 19:34:02 +0800
Subject: [PATCH 04/39] test: isolate marketing from live Cloud handoff checks
---
browser_tests/fixtures/liveOpenOnCloudFixture.ts | 16 +++++++++++++++-
docs/testing/open-on-cloud-e2e.md | 4 +++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/browser_tests/fixtures/liveOpenOnCloudFixture.ts b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
index 55b6372e941..9771354259e 100644
--- a/browser_tests/fixtures/liveOpenOnCloudFixture.ts
+++ b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
@@ -68,11 +68,25 @@ export const liveOpenOnCloudLoginFixture = liveOpenOnCloudFixture.extend({
await use([
...liveNetworkOrigins,
'https://browser-intake-us5-datadoghq.com',
- 'https://utt.impactcdn.com',
'https://cdn.sy-d.io',
'https://t.comfy.org',
'https://o4507954455314432.ingest.us.sentry.io',
'https://cdp.customer.io'
])
+ },
+ context: async ({ context }, use, testInfo) => {
+ const blockedMarketingRequests: string[] = []
+ await context.route(
+ 'https://utt.impactcdn.com/A6951770-3747-434a-9ac7-4e582e67d91f1.js',
+ async (route) => {
+ blockedMarketingRequests.push(route.request().url())
+ await route.abort('blockedbyclient')
+ }
+ )
+ await use(context)
+ await testInfo.attach('blocked-marketing-requests.json', {
+ body: JSON.stringify(blockedMarketingRequests),
+ contentType: 'application/json'
+ })
}
})
diff --git a/docs/testing/open-on-cloud-e2e.md b/docs/testing/open-on-cloud-e2e.md
index 54574bd9ca6..4d0a4df6ce8 100644
--- a/docs/testing/open-on-cloud-e2e.md
+++ b/docs/testing/open-on-cloud-e2e.md
@@ -40,7 +40,9 @@ Each case asserts HTTP 200, a real server address, the parsed compatibility payl
## Hosted sign-in handoff
-`browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts` separately checks that Open on Comfy Cloud opens the selected deployment's actual login page in a new tab. Run it with the same environment variables, replacing the spec path in the command above. Its fixture permits the hosted application's analytics and diagnostic services as well as its application requests. Follow the execution environment's authorization requirements before running it.
+`browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts` separately checks that Open on Comfy Cloud opens the selected deployment's actual login page in a new tab. Run it with the same environment variables, replacing the spec path in the command above.
+
+The login fixture aborts the exact Impact marketing bootstrap script before download, preventing its downstream attribution requests. It records the blocked script requests in the report. It does not replace responses or change application APIs, authentication, or popup assertions. Marketing attribution is outside this suite's acceptance scope. The fixture permits the hosted application's other analytics and diagnostic services; follow the execution environment's authorization requirements before running it.
## Remaining acceptance work
From 92a238ffce8103e793b61de75ba2b432d3c5deb7 Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 19:51:28 +0800
Subject: [PATCH 05/39] test: allow real attribution requests in Cloud handoff
---
.../fixtures/liveOpenOnCloudFixture.ts | 19 ++++---------------
docs/testing/open-on-cloud-e2e.md | 2 +-
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/browser_tests/fixtures/liveOpenOnCloudFixture.ts b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
index 9771354259e..e04b020a6d3 100644
--- a/browser_tests/fixtures/liveOpenOnCloudFixture.ts
+++ b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
@@ -68,25 +68,14 @@ export const liveOpenOnCloudLoginFixture = liveOpenOnCloudFixture.extend({
await use([
...liveNetworkOrigins,
'https://browser-intake-us5-datadoghq.com',
+ 'https://utt.impactcdn.com',
+ 'https://comfyui.sjv.io',
+ 'https://d.impct.site',
+ 'https://www.ojrq.net',
'https://cdn.sy-d.io',
'https://t.comfy.org',
'https://o4507954455314432.ingest.us.sentry.io',
'https://cdp.customer.io'
])
- },
- context: async ({ context }, use, testInfo) => {
- const blockedMarketingRequests: string[] = []
- await context.route(
- 'https://utt.impactcdn.com/A6951770-3747-434a-9ac7-4e582e67d91f1.js',
- async (route) => {
- blockedMarketingRequests.push(route.request().url())
- await route.abort('blockedbyclient')
- }
- )
- await use(context)
- await testInfo.attach('blocked-marketing-requests.json', {
- body: JSON.stringify(blockedMarketingRequests),
- contentType: 'application/json'
- })
}
})
diff --git a/docs/testing/open-on-cloud-e2e.md b/docs/testing/open-on-cloud-e2e.md
index 4d0a4df6ce8..dfededdc28e 100644
--- a/docs/testing/open-on-cloud-e2e.md
+++ b/docs/testing/open-on-cloud-e2e.md
@@ -42,7 +42,7 @@ Each case asserts HTTP 200, a real server address, the parsed compatibility payl
`browser_tests/tests/liveCloud/openOnCloudLogin.spec.ts` separately checks that Open on Comfy Cloud opens the selected deployment's actual login page in a new tab. Run it with the same environment variables, replacing the spec path in the command above.
-The login fixture aborts the exact Impact marketing bootstrap script before download, preventing its downstream attribution requests. It records the blocked script requests in the report. It does not replace responses or change application APIs, authentication, or popup assertions. Marketing attribution is outside this suite's acceptance scope. The fixture permits the hosted application's other analytics and diagnostic services; follow the execution environment's authorization requirements before running it.
+The login fixture permits the hosted application's analytics, diagnostics, and Impact marketing attribution requests, including `www.ojrq.net`. It does not replace responses or suppress the marketing script. Marketing attribution is outside this suite's acceptance assertions. Follow the execution environment's authorization requirements before running it.
## Remaining acceptance work
From a098b30b2eb36108f0cb0c0939589af407ce2838 Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 23:46:50 +0800
Subject: [PATCH 06/39] fix: explain how to retry a lost cloud workflow handoff
Show the recovery instructions when the local opener is gone or no longer answers after sign-in. Focused Open on Cloud and error-panel suites passed: 137 tests; real compatibility and login E2Es passed: 4 tests, zero retries.
---
src/locales/en/main.json | 2 +
.../useLocalHandoffUrlLoader.test.ts | 46 ++++++++++++++++---
.../composables/useLocalHandoffUrlLoader.ts | 17 +++++--
3 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/src/locales/en/main.json b/src/locales/en/main.json
index 604ef39b941..8a2a164cfd9 100644
--- a/src/locales/en/main.json
+++ b/src/locales/en/main.json
@@ -4257,6 +4257,8 @@
"openedFromLocal": "Opened from ComfyUI on your computer",
"openedFromLocalDetail": "Comfy Cloud has every node and model this workflow uses. Press Run when you're ready.",
"handoffFailed": "Couldn't open the workflow from ComfyUI on your computer",
+ "handoffMissing": "Your workflow didn't arrive",
+ "handoffMissingDetail": "ComfyUI stops waiting after 10 minutes. Click Open on Comfy Cloud in ComfyUI again.",
"popupBlocked": "Your browser blocked the Comfy Cloud tab. Allow pop-ups for this page and try again.",
"downloaded": "Workflow downloaded",
"downloadedDetail": "Drop it onto Comfy Cloud in your browser to open it there.",
diff --git a/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.test.ts b/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.test.ts
index 10158320acb..a9879849c95 100644
--- a/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.test.ts
+++ b/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.test.ts
@@ -165,16 +165,48 @@ describe(useLocalHandoffUrlLoader, () => {
expect(app.loadGraphData).not.toHaveBeenCalled()
})
+ it('explains how to retry when the local sender no longer answers', async () => {
+ linkWithNonce()
+ await loadWithOpener()
+
+ await vi.advanceTimersByTimeAsync(60_000)
+
+ expect(useToast().toasts).toContainEqual(
+ expect.objectContaining({
+ kind: 'error',
+ title: "Your workflow didn't arrive",
+ description:
+ 'ComfyUI stops waiting after 10 minutes. Click Open on Comfy Cloud in ComfyUI again.'
+ })
+ )
+ expect(app.loadGraphData).not.toHaveBeenCalled()
+ })
+
+ it('explains how to retry when the local tab is no longer available', async () => {
+ linkWithNonce()
+ await loadWithOpener(null)
+
+ expect(useToast().toasts).toContainEqual(
+ expect.objectContaining({
+ kind: 'error',
+ title: "Your workflow didn't arrive"
+ })
+ )
+ })
+
it.for([
{ name: 'the flag is off', flag: false, opener: window },
{ name: 'no tab opened this one', flag: true, opener: null }
- ])('only strips the param when $name', async ({ flag, opener }) => {
- vi.mocked(useFeatureFlags().flags).openOnCloudEnabled = flag
- linkWithNonce()
+ ])(
+ 'cleans the query without messaging when $name',
+ async ({ flag, opener }) => {
+ vi.mocked(useFeatureFlags().flags).openOnCloudEnabled = flag
+ linkWithNonce()
- await loadWithOpener(opener)
+ await loadWithOpener(opener)
- expect(useRouter().replace).toHaveBeenCalledWith({ query: {} })
- expect(window.postMessage).not.toHaveBeenCalled()
- })
+ expect(useRouter().replace).toHaveBeenCalledWith({ query: {} })
+ expect(window.postMessage).not.toHaveBeenCalled()
+ }
+ )
})
diff --git a/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.ts b/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.ts
index cb8f827287b..590d2ad9484 100644
--- a/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.ts
+++ b/src/platform/openOnCloud/composables/useLocalHandoffUrlLoader.ts
@@ -23,6 +23,13 @@ const NAMESPACE = PRESERVED_QUERY_NAMESPACES.LOCAL_HANDOFF
const HANDOFF_WAIT_MS = 60_000
const NOTICE_MS = 8000
+function showMissingWorkflow() {
+ useToast().error(t('openOnCloud.handoffMissing'), {
+ description: t('openOnCloud.handoffMissingDetail'),
+ duration: NOTICE_MS
+ })
+}
+
async function openHandedOffWorkflow(
filename: string,
data: unknown
@@ -61,7 +68,10 @@ function requestWorkflow(opener: Window, nonce: string): void {
window.removeEventListener('message', onMessage)
clearTimeout(deadline)
}
- const deadline = setTimeout(stop, HANDOFF_WAIT_MS)
+ const deadline = setTimeout(() => {
+ stop()
+ showMissingWorkflow()
+ }, HANDOFF_WAIT_MS)
window.addEventListener('message', onMessage)
opener.postMessage(localHandoffReady(nonce), '*')
}
@@ -91,8 +101,9 @@ export function useLocalHandoffUrlLoader(
clearPreservedQuery(NAMESPACE)
const opener = getOpener()
- if (typeof nonce === 'string' && opener && flags.openOnCloudEnabled) {
- requestWorkflow(opener, nonce)
+ if (typeof nonce === 'string' && flags.openOnCloudEnabled) {
+ if (opener) requestWorkflow(opener, nonce)
+ else showMissingWorkflow()
}
await stripped
}
From 4af7a410772fdc5040d4c303e21aa6c548bce3fa Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 23:49:33 +0800
Subject: [PATCH 07/39] feat: offer cloud deployment from out-of-memory issues
Preserve runtime catalog identity on error groups and open the real setup dialog from the OOM action. The integration test covers catalog resolution through the Issues panel and the dialog store.
---
.../workflowErrors.integration.test.ts | 33 +++++++++++++-
.../components/CloudErrorAction.test.ts | 43 +++++++++++++++++++
.../components/CloudErrorAction.vue | 29 +++++++++++++
.../openOnCloud/openRunOnCloudDialog.ts | 34 ++++++++++++---
.../workflowErrors/panel/ErrorGroupList.vue | 2 +
.../workflowErrors/panel/useErrorGroups.ts | 1 +
6 files changed, 136 insertions(+), 6 deletions(-)
create mode 100644 src/platform/openOnCloud/components/CloudErrorAction.test.ts
create mode 100644 src/platform/openOnCloud/components/CloudErrorAction.vue
diff --git a/src/components/rightSidePanel/workflowErrors.integration.test.ts b/src/components/rightSidePanel/workflowErrors.integration.test.ts
index 0ea4e5cf3cb..f2b954a88c9 100644
--- a/src/components/rightSidePanel/workflowErrors.integration.test.ts
+++ b/src/components/rightSidePanel/workflowErrors.integration.test.ts
@@ -16,6 +16,8 @@ import { defineComponent, nextTick, provide } from 'vue'
import { createMemoryHistory, createRouter } from 'vue-router'
import { testI18n } from '@/utils/__tests__/testI18n'
+import { useFeatureFlags } from '@/composables/useFeatureFlags'
+import { useDialogStore } from '@/stores/dialogStore'
import { useMissingModelStore } from '@/platform/workflowErrors/missingModel/missingModelStore'
import type { WorkspaceDeployment } from '@/platform/workspace/api/workspaceApi'
import { useDeploymentPickStore } from '@/platform/workspace/stores/deploymentPickStore'
@@ -38,13 +40,19 @@ import type {
Subgraph
} from '@/lib/litegraph/src/litegraph'
import { toNodeId } from '@comfyorg/graph-model/nodeId'
-import { nodeError, validationError } from '@/utils/__tests__/nodeErrorHelpers'
+import {
+ nodeError,
+ runtimeError,
+ validationError
+} from '@/utils/__tests__/nodeErrorHelpers'
import { useFocusNode } from '@/composables/canvas/useFocusNode'
import { WorkflowErrorManagerKey } from '@/platform/workflowErrors/workflowErrorManager'
import { createWorkflowErrorManager } from '@/platform/customNodes/manager/composables/workflowErrorManager'
import ErrorGroupList from '@/platform/workflowErrors/panel/ErrorGroupList.vue'
+vi.mock(import('@/composables/useFeatureFlags'))
+
vi.mock(import('@/scripts/app'), () => {
const rootGraph = {
id: 'root',
@@ -252,6 +260,29 @@ describe('ErrorGroupList selection emphasis', () => {
})
})
+ it('opens cloud deployment from a reported out-of-memory issue', async () => {
+ const pinia = getActivePinia()!
+ vi.mocked(useFeatureFlags().flags).openOnCloudEnabled = true
+ useExecutionErrorStore(pinia).recordExecutionError({
+ ...runtimeError('1'),
+ exception_type: 'torch.OutOfMemoryError',
+ exception_message: 'CUDA out of memory'
+ })
+ const { user } = renderList(pinia)
+
+ await user.click(
+ screen.getByRole('button', {
+ name: 'Deploy your setup to Comfy Cloud'
+ })
+ )
+
+ await waitFor(() =>
+ expect(
+ useDialogStore(pinia).isDialogOpen('global-run-on-comfy-cloud')
+ ).toBe(true)
+ )
+ })
+
it('opens only the group named by view details', async () => {
const pinia = getActivePinia()!
seedTwoErrorGroups(pinia)
diff --git a/src/platform/openOnCloud/components/CloudErrorAction.test.ts b/src/platform/openOnCloud/components/CloudErrorAction.test.ts
new file mode 100644
index 00000000000..ea1edf0178d
--- /dev/null
+++ b/src/platform/openOnCloud/components/CloudErrorAction.test.ts
@@ -0,0 +1,43 @@
+import { render, screen, waitFor } from '@testing-library/vue'
+import userEvent from '@testing-library/user-event'
+import { describe, expect, it, vi } from 'vitest'
+
+import { useFeatureFlags } from '@/composables/useFeatureFlags'
+import CloudErrorAction from '@/platform/openOnCloud/components/CloudErrorAction.vue'
+import { useDialogStore } from '@/stores/dialogStore'
+import { testI18n } from '@/utils/__tests__/testI18n'
+
+vi.mock(import('@/composables/useFeatureFlags'))
+
+describe('Cloud deployment from an out-of-memory error', () => {
+ it('opens the deployment dialog from the memory-error action', async () => {
+ vi.mocked(useFeatureFlags().flags).openOnCloudEnabled = true
+ render(CloudErrorAction, {
+ props: { catalogId: 'out_of_memory' },
+ global: { plugins: [testI18n] }
+ })
+
+ await userEvent.click(
+ screen.getByRole('button', { name: 'Deploy your setup to Comfy Cloud' })
+ )
+
+ await waitFor(() =>
+ expect(useDialogStore().isDialogOpen('global-run-on-comfy-cloud')).toBe(
+ true
+ )
+ )
+ })
+
+ it.for([
+ { catalogId: 'out_of_memory', enabled: false },
+ { catalogId: 'image_not_loaded', enabled: true }
+ ])('does not offer deployment for $catalogId with gate $enabled', (row) => {
+ vi.mocked(useFeatureFlags().flags).openOnCloudEnabled = row.enabled
+ render(CloudErrorAction, {
+ props: { catalogId: row.catalogId },
+ global: { plugins: [testI18n] }
+ })
+
+ expect(screen.queryByRole('button')).not.toBeInTheDocument()
+ })
+})
diff --git a/src/platform/openOnCloud/components/CloudErrorAction.vue b/src/platform/openOnCloud/components/CloudErrorAction.vue
new file mode 100644
index 00000000000..737fa310083
--- /dev/null
+++ b/src/platform/openOnCloud/components/CloudErrorAction.vue
@@ -0,0 +1,29 @@
+
+
+
+ {{ $t('openOnCloud.deploySetup') }}
+
+
+
+
diff --git a/src/platform/openOnCloud/openRunOnCloudDialog.ts b/src/platform/openOnCloud/openRunOnCloudDialog.ts
index 56486a0e764..a10f88676da 100644
--- a/src/platform/openOnCloud/openRunOnCloudDialog.ts
+++ b/src/platform/openOnCloud/openRunOnCloudDialog.ts
@@ -1,4 +1,10 @@
+import type { Component } from 'vue'
+
import { useDialogStore } from '@/stores/dialogStore'
+import {
+ DEPLOY_VIDEO_POSTER_SRC,
+ DEPLOY_VIDEO_SOURCES
+} from '@/platform/workflow/deploy/constants'
const RUN_ON_CLOUD_DIALOG_KEY = 'global-run-on-comfy-cloud'
@@ -9,18 +15,36 @@ export function closeRunOnCloudDialog(): boolean {
return true
}
-export async function openRunOnCloudDialog(): Promise {
- const { default: RunOnCloudDialog } =
- await import('@/platform/openOnCloud/components/RunOnCloudDialog.vue')
+function showCloudDialog(component: Component, props: Record) {
const dialogStore = useDialogStore()
const hide = () => dialogStore.closeDialog({ key: RUN_ON_CLOUD_DIALOG_KEY })
dialogStore.showDialog({
key: RUN_ON_CLOUD_DIALOG_KEY,
- component: RunOnCloudDialog,
- props: { titleId: RUN_ON_CLOUD_DIALOG_KEY, onDone: hide, onDismiss: hide },
+ component,
+ props: {
+ ...props,
+ titleId: RUN_ON_CLOUD_DIALOG_KEY,
+ onDone: hide,
+ onDismiss: hide
+ },
dialogComponentProps: {
dismissOnPointerDownOutside: true,
headless: true
}
})
}
+
+export async function openRunOnCloudDialog(): Promise {
+ const { default: component } =
+ await import('@/platform/openOnCloud/components/RunOnCloudDialog.vue')
+ showCloudDialog(component, {})
+}
+
+export async function openDeploySetupDialog(): Promise {
+ const { default: component } =
+ await import('@/platform/openOnCloud/components/DeploySetupCard.vue')
+ showCloudDialog(component, {
+ videoSources: DEPLOY_VIDEO_SOURCES,
+ posterSrc: DEPLOY_VIDEO_POSTER_SRC
+ })
+}
diff --git a/src/platform/workflowErrors/panel/ErrorGroupList.vue b/src/platform/workflowErrors/panel/ErrorGroupList.vue
index 2b1fb2ec987..9ecf4e1db3a 100644
--- a/src/platform/workflowErrors/panel/ErrorGroupList.vue
+++ b/src/platform/workflowErrors/panel/ErrorGroupList.vue
@@ -243,6 +243,7 @@
>
{{ group.displayMessage }}
+
@@ -424,6 +425,7 @@ import MissingModelCard from '@/platform/workflowErrors/missingModel/components/
import MissingMediaCard from '@/platform/workflowErrors/missingMedia/components/MissingMediaCard.vue'
import { isCloud } from '@/platform/distribution/types'
import Button from '@comfyorg/design-system/button/Button'
+import CloudErrorAction from '@/platform/openOnCloud/components/CloudErrorAction.vue'
import DotSpinner from '@comfyorg/design-system/common/DotSpinner'
import { useMissingModelStore } from '@/platform/workflowErrors/missingModel/missingModelStore'
import DeploymentBuildActions from './DeploymentBuildActions.vue'
diff --git a/src/platform/workflowErrors/panel/useErrorGroups.ts b/src/platform/workflowErrors/panel/useErrorGroups.ts
index 588c3864c68..9c12bf08ba5 100644
--- a/src/platform/workflowErrors/panel/useErrorGroups.ts
+++ b/src/platform/workflowErrors/panel/useErrorGroups.ts
@@ -179,6 +179,7 @@ function toSortedGroups(groupsMap: Map): ErrorGroup[] {
type: 'execution' as const,
severity: 'error' as const,
groupKey: `execution:${rawGroupKey}`,
+ catalogId: rawGroupKey,
displayTitle: groupData.displayTitle,
displayMessage: groupData.displayMessage,
count: countExecutionCards(cards),
From d37a10089ba0e3f9e8a892bbac0550ce02e6e28e Mon Sep 17 00:00:00 2001
From: huang47 <157390+huang47@users.noreply.github.com>
Date: Thu, 5 Nov 2026 23:50:46 +0800
Subject: [PATCH 08/39] feat: hand deployment briefs to the available local
agent
Route through the existing command registry and agent consent flow. Preserve the composer draft, reveal chat and close the setup dialog only when the agent opens. Focused unit and integration suites passed: 144 tests. Model-upload backend dependencies and remaining live acceptance are documented.
---
docs/testing/open-on-cloud-e2e.md | 12 ++-
.../images/openOnCloud/local-agent-marks.svg | 22 +++++
src/assets/images/openOnCloud/local-agent.svg | 10 +++
src/extensions/core/index.test.ts | 1 +
src/extensions/core/index.ts | 2 +
.../core/localDeploymentAgent.test.ts | 54 +++++++++++++
src/extensions/core/localDeploymentAgent.ts | 19 +++++
src/locales/en/main.json | 1 +
.../components/DeploySetupAgentMenu.vue | 32 +++++++-
.../localDeploymentAgentCommand.ts | 1 +
.../agent/useLocalDeploymentAgent.test.ts | 81 +++++++++++++++++++
.../agent/useLocalDeploymentAgent.ts | 30 +++++++
12 files changed, 262 insertions(+), 3 deletions(-)
create mode 100644 src/assets/images/openOnCloud/local-agent-marks.svg
create mode 100644 src/assets/images/openOnCloud/local-agent.svg
create mode 100644 src/extensions/core/localDeploymentAgent.test.ts
create mode 100644 src/extensions/core/localDeploymentAgent.ts
create mode 100644 src/platform/openOnCloud/localDeploymentAgentCommand.ts
create mode 100644 src/workbench/extensions/agent/composables/agent/useLocalDeploymentAgent.test.ts
create mode 100644 src/workbench/extensions/agent/composables/agent/useLocalDeploymentAgent.ts
diff --git a/docs/testing/open-on-cloud-e2e.md b/docs/testing/open-on-cloud-e2e.md
index dfededdc28e..dbf33ec5984 100644
--- a/docs/testing/open-on-cloud-e2e.md
+++ b/docs/testing/open-on-cloud-e2e.md
@@ -46,4 +46,14 @@ The login fixture permits the hosted application's analytics, diagnostics, and I
## Remaining acceptance work
-Authenticated local-to-Cloud import and Cloud execution require an authenticated Cloud browser context and an enabled receiver flag. These are separate from the three compatibility cases and the signed-out login test. The actual model-upload flow remains incomplete in the implementation and requires its own live upload acceptance once available.
+Authenticated local-to-Cloud import and Cloud execution require an authenticated Cloud browser context and an enabled receiver flag. These are separate from the three compatibility cases and the signed-out login test.
+
+The deployment menu offers **Use local agent** when the backend reports `agent.state: ready`. Start ComfyUI with `--enable-agent` and the supported agent package installed to exercise it. After the existing consent and sign-in flow, the deployment dialog closes and the agent composer contains the setup brief. The user reviews and sends it. Actual agent execution and release creation still need live acceptance; opening the composer does not prove deployment succeeded.
+
+The Issues panel offers deployment for an out-of-memory error when `open_on_cloud_enabled` is enabled. Its error-catalog routing and dialog action are covered together by the focused integration suite. The live suite does not exhaust GPU memory to produce this condition.
+
+A missing local opener, or a sender that no longer answers after sign-in, shows **Your workflow didn't arrive** with instructions to reopen from local ComfyUI. The sender waits ten minutes; the Cloud receiver waits up to one minute for a response after it loads.
+
+Local model upload, background progress, cancellation, and sign-in-to-upload remain incomplete. The local asset-content API requires ComfyUI's assets system (`--enable-assets`); the live backend used here has it disabled and returns HTTP 503. The Cloud loopback CORS route allowlist permits compatibility checks but does not permit `/api/assets/uploads` or its completion route; the preview's upload preflight returns HTTP 404 without `Access-Control-Allow-Origin`. A supported local model-content capability and Cloud upload transport are required before these user stories can be accepted. The unavailable notice remains visible instead of a nonfunctional Upload button.
+
+Desktop still opens Cloud and downloads workflow JSON for manual import. Automatic Desktop handoff is not covered by the browser suite.
diff --git a/src/assets/images/openOnCloud/local-agent-marks.svg b/src/assets/images/openOnCloud/local-agent-marks.svg
new file mode 100644
index 00000000000..56ccc9cb11e
--- /dev/null
+++ b/src/assets/images/openOnCloud/local-agent-marks.svg
@@ -0,0 +1,22 @@
+
diff --git a/src/assets/images/openOnCloud/local-agent.svg b/src/assets/images/openOnCloud/local-agent.svg
new file mode 100644
index 00000000000..95e6658abb1
--- /dev/null
+++ b/src/assets/images/openOnCloud/local-agent.svg
@@ -0,0 +1,10 @@
+
diff --git a/src/extensions/core/index.test.ts b/src/extensions/core/index.test.ts
index 296201b45c4..5dd42b370ac 100644
--- a/src/extensions/core/index.test.ts
+++ b/src/extensions/core/index.test.ts
@@ -50,6 +50,7 @@ describe('core extensions', () => {
'Comfy.ImageCrop',
'Comfy.LayerEditor',
'Comfy.Load3DLazy',
+ 'Comfy.LocalDeploymentAgent',
'Comfy.MaskEditor',
'Comfy.NoteNode',
'Comfy.Painter',
diff --git a/src/extensions/core/index.ts b/src/extensions/core/index.ts
index a35f566b7cd..34091a9d4ed 100644
--- a/src/extensions/core/index.ts
+++ b/src/extensions/core/index.ts
@@ -21,6 +21,7 @@ import { imageCompositorExtension } from './imageCompositor'
import { imageCropExtension } from './imageCrop'
import { layerEditorExtension } from './layerEditor'
import { load3dLazyExtension } from './load3d/load3dLazy'
+import { localDeploymentAgentExtension } from './localDeploymentAgent'
import { maskEditorExtension } from './maskeditor'
import { noteNodeExtension } from './noteNode'
import { painterExtension } from './painter'
@@ -55,6 +56,7 @@ const baseCoreExtensions: ComfyExtension[] = [
imageCropExtension,
layerEditorExtension,
load3dLazyExtension,
+ localDeploymentAgentExtension,
maskEditorExtension,
noteNodeExtension,
painterExtension,
diff --git a/src/extensions/core/localDeploymentAgent.test.ts b/src/extensions/core/localDeploymentAgent.test.ts
new file mode 100644
index 00000000000..e813bdf3835
--- /dev/null
+++ b/src/extensions/core/localDeploymentAgent.test.ts
@@ -0,0 +1,54 @@
+import { render, screen, waitFor } from '@testing-library/vue'
+import userEvent from '@testing-library/user-event'
+import { computed } from 'vue'
+import { describe, expect, it, vi } from 'vitest'
+
+import { useFeatureFlags } from '@/composables/useFeatureFlags'
+import { localDeploymentAgentExtension } from '@/extensions/core/localDeploymentAgent'
+import { useCommandStore } from '@/platform/keybindings/commandStore'
+import DeploySetupCard from '@/platform/openOnCloud/components/DeploySetupCard.vue'
+import { openDeploySetupDialog } from '@/platform/openOnCloud/openRunOnCloudDialog'
+import { useDialogStore } from '@/stores/dialogStore'
+import { testI18n } from '@/utils/__tests__/testI18n'
+import { useAgentConsent } from '@/workbench/extensions/agent/composables/agent/useAgentConsent'
+import { useAgentComposerStore } from '@/workbench/extensions/agent/stores/agent/agentComposerStore'
+import { useAgentPanelStore } from '@/workbench/extensions/agent/stores/agent/agentPanelStore'
+
+vi.mock(import('@/composables/useFeatureFlags'))
+vi.mock(
+ import('@/workbench/extensions/agent/composables/agent/useAgentConsent')
+)
+
+describe('Deployment dialog local-agent handoff', () => {
+ it('dismisses the dialog so the user can continue with the prepared local agent', async () => {
+ vi.mocked(useFeatureFlags().flags).agent = { state: 'ready' }
+ vi.mocked(useAgentConsent).mockReturnValue({
+ accepted: computed(() => true),
+ isChecking: computed(() => false),
+ withConsent: async (_trigger, onAccept) => onAccept(),
+ resumeAcceptAfterReload: async () => {}
+ })
+ const panel = useAgentPanelStore()
+ panel.enabled = true
+ useCommandStore().loadExtensionCommands(localDeploymentAgentExtension)
+ await openDeploySetupDialog()
+ render(DeploySetupCard, {
+ global: { plugins: [testI18n] }
+ })
+
+ await userEvent.click(
+ screen.getByRole('button', { name: 'Build with your agent' })
+ )
+ await userEvent.click(
+ await screen.findByRole('menuitem', { name: 'Use local agent' })
+ )
+
+ await waitFor(() =>
+ expect(useDialogStore().isDialogOpen('global-run-on-comfy-cloud')).toBe(
+ false
+ )
+ )
+ expect(panel.isVisible).toBe(true)
+ expect(useAgentComposerStore().draft).toContain('Comfy API Build')
+ })
+})
diff --git a/src/extensions/core/localDeploymentAgent.ts b/src/extensions/core/localDeploymentAgent.ts
new file mode 100644
index 00000000000..c8c64762ca6
--- /dev/null
+++ b/src/extensions/core/localDeploymentAgent.ts
@@ -0,0 +1,19 @@
+import { LOCAL_DEPLOYMENT_AGENT_COMMAND } from '@/platform/openOnCloud/localDeploymentAgentCommand'
+import { closeRunOnCloudDialog } from '@/platform/openOnCloud/openRunOnCloudDialog'
+import type { ComfyExtension } from '@/types/comfy'
+
+export const localDeploymentAgentExtension: ComfyExtension = {
+ name: 'Comfy.LocalDeploymentAgent',
+ commands: [
+ {
+ id: LOCAL_DEPLOYMENT_AGENT_COMMAND,
+ function: async (metadata) => {
+ if (typeof metadata?.brief !== 'string') return
+ const { useLocalDeploymentAgent } =
+ await import('@/workbench/extensions/agent/composables/agent/useLocalDeploymentAgent')
+ if (await useLocalDeploymentAgent().open(metadata.brief))
+ closeRunOnCloudDialog()
+ }
+ }
+ ]
+}
diff --git a/src/locales/en/main.json b/src/locales/en/main.json
index 8a2a164cfd9..29348548d2b 100644
--- a/src/locales/en/main.json
+++ b/src/locales/en/main.json
@@ -4273,6 +4273,7 @@
"openOnCloud": "Open on Comfy Cloud"
},
"agentMenu": {
+ "useLocalAgent": "Use local agent",
"openInClaude": "Open in Claude desktop",
"openInChatGpt": "Open in ChatGPT desktop",
"copyPrompt": "Copy prompt"
diff --git a/src/platform/openOnCloud/components/DeploySetupAgentMenu.vue b/src/platform/openOnCloud/components/DeploySetupAgentMenu.vue
index 9d754cd5a87..4721242de5e 100644
--- a/src/platform/openOnCloud/components/DeploySetupAgentMenu.vue
+++ b/src/platform/openOnCloud/components/DeploySetupAgentMenu.vue
@@ -17,12 +17,22 @@
{{ $t('deployToComfyApi.copied') }}
-
+
+
{{ $t('deployToComfyApi.deployWithAgent') }}
+