diff --git a/.fallow-baselines/health.json b/.fallow-baselines/health.json
index e0cf95b0377..25d8a297f65 100644
--- a/.fallow-baselines/health.json
+++ b/.fallow-baselines/health.json
@@ -526,7 +526,7 @@
"count": 1
}
},
- "src/components/rightSidePanel/errors/ErrorGroupList.vue": {
+ "src/platform/workflowErrors/panel/ErrorGroupList.vue": {
"complexity_critical": {
"count": 1
},
@@ -3183,7 +3183,7 @@
"src/platform/workflow/templates/components/WorkflowTemplateSelectorDialog.vue:complexity",
"src/utils/executionUtil.ts:complexity",
"src/scripts/metadata/avif.ts:complexity",
- "src/components/rightSidePanel/errors/ErrorGroupList.vue:complexity",
+ "src/platform/workflowErrors/panel/ErrorGroupList.vue:complexity",
"src/renderer/extensions/linearMode/DropZone.vue:complexity",
"src/platform/customNodes/manager/components/manager/ManagerDialog.vue:circular dependency",
"packages/mask-editor/src/useCanvasHistory.ts:circular dependency",
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/desktopWorkflowRelayFixture.ts b/browser_tests/fixtures/desktopWorkflowRelayFixture.ts
new file mode 100644
index 00000000000..35e44a668cf
--- /dev/null
+++ b/browser_tests/fixtures/desktopWorkflowRelayFixture.ts
@@ -0,0 +1,71 @@
+import { randomUUID } from 'node:crypto'
+import { readFile } from 'node:fs/promises'
+import { gzipSync } from 'node:zlib'
+
+import { expect } from '@playwright/test'
+
+import type { DesktopWorkflowHandoff } from '@/platform/openOnCloud/desktopWorkflowHandoff'
+import { liveOpenOnCloudLoginFixture as base } from '@e2e/fixtures/liveOpenOnCloudFixture'
+import { assetPath } from '@e2e/fixtures/utils/paths'
+
+export const desktopWorkflowRelayFixture = base.extend<{
+ relayState: 'valid' | 'missing' | 'expired'
+ relayTransfer: { url: string; fileUrl: string }
+}>({
+ relayState: ['valid', { option: true }],
+ relayTransfer: async (
+ { cloudOrigin, comfyPage, request, relayState },
+ use
+ ) => {
+ const localOrigin = new URL(comfyPage.url)
+ if (
+ localOrigin.protocol !== 'http:' ||
+ localOrigin.hostname !== 'localhost'
+ ) {
+ throw new Error(
+ 'Desktop relay test data requires an HTTP localhost editor'
+ )
+ }
+ const nonce = randomUUID()
+ const file = `open-on-cloud/${nonce}.json`
+ const fileUrl = new URL(
+ `/api/userdata/${encodeURIComponent(file)}`,
+ localOrigin
+ ).href
+ const expiresAt =
+ Date.now() + (relayState === 'expired' ? -60_000 : 10 * 60_000)
+ const workflow: unknown = JSON.parse(
+ await readFile(assetPath('openOnCloud/01-runnable-on-cloud.json'), 'utf8')
+ )
+ const handoff = {
+ filename: 'desktop-relay-workflow.json',
+ workflow,
+ expiresAt
+ } satisfies DesktopWorkflowHandoff
+ const destination = new URL(cloudOrigin)
+ destination.searchParams.set('from_local', nonce)
+ destination.hash = `desktop_workflow=${gzipSync(
+ JSON.stringify(handoff)
+ ).toString('base64')}`
+
+ if (relayState !== 'missing') {
+ const stored = await request.post(`${fileUrl}?overwrite=false`, {
+ headers: { 'Comfy-User': 'default' },
+ data: { destination: destination.href, expiresAt }
+ })
+ expect(stored.status()).toBe(200)
+ }
+
+ const relay = new URL(localOrigin)
+ relay.searchParams.set('desktop_workflow', nonce)
+ relay.searchParams.set('user', 'default')
+ try {
+ await use({ url: relay.href, fileUrl })
+ } finally {
+ const removed = await request.delete(fileUrl, {
+ headers: { 'Comfy-User': 'default' }
+ })
+ expect([204, 404]).toContain(removed.status())
+ }
+ }
+})
diff --git a/browser_tests/fixtures/liveOpenOnCloudFixture.ts b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
new file mode 100644
index 00000000000..69885e3db73
--- /dev/null
+++ b/browser_tests/fixtures/liveOpenOnCloudFixture.ts
@@ -0,0 +1,79 @@
+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)
+ // A completed tutorial keeps the first-run templates dialog from opening
+ // over the editor, so no test races its arrival.
+ const tutorial = await request.post(
+ new URL('/api/settings/Comfy.TutorialCompleted', comfyPage.url).href,
+ { headers: { 'Comfy-User': 'default' }, data: true }
+ )
+ expect(tutorial.status()).toBe(200)
+ await comfyPage.goto()
+ await comfyPage.waitForAppReady()
+ 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://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'
+ ])
+ }
+})
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/playwrightSelection.test.ts b/browser_tests/playwrightSelection.test.ts
index 3aa22b6103f..d0303350cce 100644
--- a/browser_tests/playwrightSelection.test.ts
+++ b/browser_tests/playwrightSelection.test.ts
@@ -8,7 +8,7 @@ describe('Live billing opt-in', () => {
{
name: 'disabled',
enabled: '0',
- args: ['tests/liveCloud'],
+ args: [],
status: 1,
count: 0,
hooks: true
@@ -35,7 +35,15 @@ describe('Live billing opt-in', () => {
({ enabled, args, status, count, hooks }) => {
const result = spawnSync(
'pnpm',
- ['exec', 'playwright', 'test', ...args, '--list', '--reporter=json'],
+ [
+ 'exec',
+ 'playwright',
+ 'test',
+ 'tests/liveCloud/billingSmoke.spec.ts',
+ ...args,
+ '--list',
+ '--reporter=json'
+ ],
{
cwd: process.cwd(),
env: {
diff --git a/browser_tests/tests/liveCloud/desktopWorkflowRelay.spec.ts b/browser_tests/tests/liveCloud/desktopWorkflowRelay.spec.ts
new file mode 100644
index 00000000000..e3677344b4b
--- /dev/null
+++ b/browser_tests/tests/liveCloud/desktopWorkflowRelay.spec.ts
@@ -0,0 +1,93 @@
+import { expect } from '@playwright/test'
+
+import { desktopWorkflowRelayFixture as test } from '@e2e/fixtures/desktopWorkflowRelayFixture'
+
+test.use({ trace: 'off' })
+
+test.describe(
+ 'Desktop workflow relay transport and Cloud login',
+ { tag: ['@cloud-live', '@smoke', '@ui'] },
+ () => {
+ test('consumes the real local transfer before opening Cloud login', async ({
+ cloudOrigin,
+ comfyPage,
+ relayTransfer,
+ request
+ }) => {
+ await test.step('Open the external-browser relay and consume its userdata record', async () => {
+ const readPromise = comfyPage.page.waitForResponse(
+ (response) =>
+ response.url() === relayTransfer.fileUrl &&
+ response.request().method() === 'GET'
+ )
+ const consumePromise = comfyPage.page.waitForResponse(
+ (response) =>
+ response.url() === relayTransfer.fileUrl &&
+ response.request().method() === 'DELETE'
+ )
+ await comfyPage.page.goto(relayTransfer.url, {
+ waitUntil: 'domcontentloaded'
+ })
+ const read = await readPromise
+ const consumed = await consumePromise
+
+ expect(read.status()).toBe(200)
+ expect(await read.serverAddr()).not.toBeNull()
+ expect(consumed.status()).toBe(204)
+ expect(await consumed.serverAddr()).not.toBeNull()
+ })
+
+ await test.step('Reach the selected Cloud login with no reusable local transfer', async () => {
+ await expect
+ .poll(() => new URL(comfyPage.page.url()).origin)
+ .toBe(cloudOrigin)
+ await expect(
+ comfyPage.page.getByRole('heading', {
+ name: 'Log in to your account',
+ exact: true
+ })
+ ).toBeVisible()
+ const remaining = await request.get(relayTransfer.fileUrl, {
+ headers: { 'Comfy-User': 'default' }
+ })
+ expect(remaining.status()).toBe(404)
+ await comfyPage.attachScreenshot('desktop-relay-cloud-login.png', {
+ runInCI: true
+ })
+ })
+ })
+
+ for (const relayState of ['missing', 'expired'] as const) {
+ test.describe(`${relayState} local transfer`, () => {
+ test.use({ relayState })
+
+ test('shows the transfer failure instead of navigating to Cloud', async ({
+ comfyPage,
+ relayTransfer
+ }) => {
+ await test.step('Open the stale external-browser relay link', async () => {
+ await comfyPage.page.goto(relayTransfer.url, {
+ waitUntil: 'domcontentloaded'
+ })
+ })
+
+ await test.step('Explain that Desktop must start the transfer again', async () => {
+ await expect(
+ comfyPage.page.getByText(
+ 'Your workflow could not be transferred. Click Open on Comfy Cloud in Desktop again.',
+ { exact: true }
+ )
+ ).toBeVisible()
+ expect(new URL(comfyPage.page.url()).origin).toBe(
+ new URL(comfyPage.url).origin
+ )
+ await comfyPage.attachScreenshot(
+ `desktop-relay-${relayState}.png`,
+ { runInCI: true }
+ )
+ })
+ })
+ })
+ }
+ }
+)
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/browser_tests/tests/openOnCloudGate.spec.ts b/browser_tests/tests/openOnCloudGate.spec.ts
new file mode 100644
index 00000000000..40308d21d9f
--- /dev/null
+++ b/browser_tests/tests/openOnCloudGate.spec.ts
@@ -0,0 +1,48 @@
+import type { Request } from '@playwright/test'
+import { expect } from '@playwright/test'
+
+import { comfyPageFixture as test } from '@e2e/fixtures/ComfyPage'
+
+function isOpenOnCloudTraffic(request: Request): boolean {
+ const url = new URL(request.url())
+ return (
+ url.pathname.endsWith('/api/cloud/compatibility') ||
+ decodeURIComponent(url.pathname).includes('/userdata/open-on-cloud/')
+ )
+}
+
+// CI serves a production build, where the `ff:` localStorage override is
+// tree-shaken, so the gate is driven through the server feature-flag handshake.
+test.describe('Open on Cloud gate', { tag: ['@ui'] }, () => {
+ test('boots, loads and hovers the top menu without any Open on Cloud surface or traffic while the gate is off', async ({
+ comfyPage
+ }) => {
+ await comfyPage.featureFlags.seedServerFlags({
+ open_on_cloud_enabled: false
+ })
+ const traffic: string[] = []
+ comfyPage.page.on('request', (request) => {
+ if (isOpenOnCloudTraffic(request)) traffic.push(request.url())
+ })
+
+ await comfyPage.workflow.reloadAndWaitForApp()
+ await comfyPage.workflow.loadWorkflow('openOnCloud/01-runnable-on-cloud')
+ await comfyPage.page.getByTestId('top-menu-actionbars').hover()
+
+ await expect(comfyPage.page.getByTestId('cloud-button')).toHaveCount(0)
+ expect(comfyPage.page.url()).not.toContain('desktop_workflow')
+ expect(traffic).toEqual([])
+ })
+
+ test('shows the Cloud button while the gate is on, proving the gate-off check looks at the right control', async ({
+ comfyPage
+ }) => {
+ await comfyPage.featureFlags.seedServerFlags({
+ open_on_cloud_enabled: true
+ })
+
+ await comfyPage.workflow.reloadAndWaitForApp()
+
+ await expect(comfyPage.page.getByTestId('cloud-button')).toBeVisible()
+ })
+})
diff --git a/docs/adr/CLOUD-HANDOFF-0053-desktop-workflows-cross-through-the-local-browser.md b/docs/adr/CLOUD-HANDOFF-0053-desktop-workflows-cross-through-the-local-browser.md
new file mode 100644
index 00000000000..3f144f23a87
--- /dev/null
+++ b/docs/adr/CLOUD-HANDOFF-0053-desktop-workflows-cross-through-the-local-browser.md
@@ -0,0 +1,44 @@
+# ADR-CLOUD-HANDOFF-0053: Desktop workflows cross through the local browser
+
+Date: 2026-11-06
+
+## Status
+
+Proposed
+
+## Context
+
+Desktop opens external links in the system browser. That browser has no opener
+relationship with the embedded editor, so the browser-to-browser message
+handoff cannot carry its workflow. A workflow embedded in the external-open
+URL also encounters operating-system URL length limits.
+
+## Decision
+
+Stage a short-lived transfer record through ComfyUI's existing userdata API.
+Open a short local relay URL in the system browser. The relay reads and deletes
+that record, then navigates its own tab to Cloud with a compressed workflow in
+the URL fragment. The large payload never crosses the operating-system
+external-open boundary or appears in an HTTP request URL.
+
+Cloud removes the fragment before initializing telemetry or routing, keeps the
+transfer in that tab's session storage through sign-in, and consumes it through
+the existing workflow validator. Transfers expire after ten minutes. Encoded
+and decompressed payload limits bound browser resource use. Unsupported or
+failed staging retains the existing file-download fallback.
+
+Use the published native-host bridge as well as the legacy Desktop distribution
+to choose this transport. Newer Desktop hosts serve localhost frontend builds.
+
+## Consequences
+
+No new Cloud API, cross-origin upload permission or Desktop bridge version is
+required. Local userdata must be available. A stopped Desktop process can leave
+an expired transfer record on the local installation; the receiver refuses it.
+The browser relay deletes a successfully consumed record, and the originating
+editor also schedules its deletion at expiry while it remains open.
+
+Direct external links containing the full workflow were rejected because of
+operating-system length limits. A Cloud storage handoff would require a new
+authentication and cross-origin upload contract. Treating an Electron popup as
+a browser tab was rejected because the host deliberately opens it externally.
diff --git a/docs/testing/open-on-cloud-e2e.md b/docs/testing/open-on-cloud-e2e.md
new file mode 100644
index 00000000000..659118e2d6d
--- /dev/null
+++ b/docs/testing/open-on-cloud-e2e.md
@@ -0,0 +1,61 @@
+# 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 compatibility and login 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.
+
+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
+
+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.
+
+A verified `@comfy.org` employee can use the existing Cloud override `?ff=open_on_cloud_enabled:true` for controlled import acceptance. To carry it automatically into a new browser or Desktop handoff tab, configure the local frontend's `VITE_STAGING_CLOUD_BASE_URL` as `https://fe-pr-22949.testenvs.comfy.org/?ff=open_on_cloud_enabled:true`. The handoff retains configured `ff` parameters; the Cloud receiver still checks the real signed-in employee identity. This changes the rollout configuration without replacing authentication, API responses or the workflow loader.
+
+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 stages a short-lived transfer in the real local userdata API and opens a local relay through its native external browser. The relay consumes that record and carries the compressed workflow in a Cloud URL fragment. Cloud removes the fragment before telemetry, preserves the transfer in tab session storage through sign-in and imports it through the normal validator. Ten-minute expiry and payload limits retain download/manual-import fallback when transport is unavailable.
+
+`browser_tests/tests/liveCloud/desktopWorkflowRelay.spec.ts` covers the real userdata GET/DELETE and hosted login, plus missing and expired records. Run it with the same live-suite environment variables. It proves browser relay transport; authenticated import and native Desktop window acceptance are additional checks.
diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts
index 3ca1e98b42e..938a83d8210 100644
--- a/src/components/TopMenuSection.test.ts
+++ b/src/components/TopMenuSection.test.ts
@@ -14,6 +14,7 @@ import {
onTestFinished,
vi
} from 'vitest'
+import type { DetachedWindowAPI } from 'happy-dom'
import { computed, defineComponent, h, nextTick, onMounted, ref } from 'vue'
import type { Component } from 'vue'
import { createI18n } from 'vue-i18n'
@@ -64,6 +65,7 @@ vi.mock(import('@/platform/distribution/types'), () => ({
get isCloud() {
return distribution.isCloud
},
+ isDesktop: false,
isNightly: false
}))
@@ -738,6 +740,52 @@ describe('TopMenuSection', () => {
)
})
+ describe('Cloud button', () => {
+ function servedFrom(origin: string) {
+ const { happyDOM } = window as unknown as { happyDOM: DetachedWindowAPI }
+ const previous = window.location.href
+ happyDOM.setURL(`${origin}/`)
+ onTestFinished(() => happyDOM.setURL(previous))
+ }
+
+ it.for([
+ { origin: 'http://127.0.0.1:8188', count: 1 },
+ { origin: 'http://192.168.1.20:8188', count: 1 },
+ { origin: 'https://comfy.example.com', count: 0 }
+ ])(
+ 'renders $count Cloud button when ComfyUI is served from $origin',
+ ({ origin, count }) => {
+ servedFrom(origin)
+ Object.assign(useFeatureFlags().flags, { openOnCloudEnabled: true })
+
+ createWrapper({ stubs: { FreeTierQuota: true } })
+
+ expect(screen.queryAllByTestId('cloud-button')).toHaveLength(count)
+ }
+ )
+
+ it.for([
+ { openOnCloudEnabled: false, cloud: 0, deploy: 1 },
+ { openOnCloudEnabled: true, cloud: 1, deploy: 0 }
+ ])(
+ 'renders $cloud Cloud and $deploy deploy buttons when the Open on Cloud gate is $openOnCloudEnabled',
+ ({ openOnCloudEnabled, cloud, deploy }) => {
+ servedFrom('http://127.0.0.1:8188')
+ Object.assign(useFeatureFlags().flags, {
+ openOnCloudEnabled,
+ deployToCloud: true
+ })
+
+ createWrapper({ stubs: { FreeTierQuota: true } })
+
+ expect(screen.queryAllByTestId('cloud-button')).toHaveLength(cloud)
+ expect(
+ screen.queryAllByRole('button', { name: 'Deploy to Comfy API' })
+ ).toHaveLength(deploy)
+ }
+ )
+ })
+
describe('Deploy to Comfy API button', () => {
function enableDeployButton() {
Object.assign(useFeatureFlags().flags, { deployToCloud: true })
diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue
index 074237c0f6a..45866bb8c3a 100644
--- a/src/components/TopMenuSection.vue
+++ b/src/components/TopMenuSection.vue
@@ -86,8 +86,9 @@
class="absolute top-0.5 right-1 size-2 rounded-full bg-destructive"
/>
+
+
@@ -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),
diff --git a/src/platform/workspace/composables/useBriefCopy.ts b/src/platform/workspace/composables/useBriefCopy.ts
index a0aed640cff..712c8308b6f 100644
--- a/src/platform/workspace/composables/useBriefCopy.ts
+++ b/src/platform/workspace/composables/useBriefCopy.ts
@@ -8,16 +8,21 @@ export function useBriefCopy() {
const isCopying = ref(false)
const copied = ref(false)
- async function copy(brief: string) {
+ /** Runs a copy that resolves whether it landed; ignored while one runs. */
+ async function copyWith(write: () => Promise) {
if (isCopying.value) return
isCopying.value = true
copied.value = false
try {
- copied.value = await copyToClipboard(brief, { toastOnSuccess: false })
+ copied.value = await write()
} finally {
isCopying.value = false
}
}
- return { isCopying, copied, copy }
+ function copy(brief: string) {
+ return copyWith(() => copyToClipboard(brief, { toastOnSuccess: false }))
+ }
+
+ return { isCopying, copied, copy, copyWith }
}
diff --git a/src/platform/workspace/openCustomDeploymentDialog.ts b/src/platform/workspace/openCustomDeploymentDialog.ts
index 5308148494b..ff1bc145501 100644
--- a/src/platform/workspace/openCustomDeploymentDialog.ts
+++ b/src/platform/workspace/openCustomDeploymentDialog.ts
@@ -18,7 +18,8 @@ function cardOf(module: { default?: Component } | undefined): Component {
return module.default
}
-async function openCardDialog(
+/** Lazily opens a headless deployment card; a failed load shows a toast and resolves false. */
+export async function openCardDialog(
key: string,
load: () => Promise<{ default?: Component } | undefined>,
props: Record
diff --git a/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts b/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts
index 5a425a0d300..0c5d27b7b57 100644
--- a/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts
+++ b/src/workbench/extensions/agent/composables/agent/useAgentConsent.test.ts
@@ -26,7 +26,8 @@ import { useAgentConsent } from './useAgentConsent'
vi.mock(import('@/composables/auth/useCurrentUser'))
vi.mock(import('@/config/comfyApi'), () => ({
- getComfyApiBaseUrl: () => 'https://api.comfy.test'
+ getComfyApiBaseUrl: () => 'https://api.comfy.test',
+ getComfyCloudBaseUrl: () => 'https://cloud.comfy.test'
}))
const distribution = vi.hoisted(() => ({ isCloud: false }))
@@ -669,7 +670,7 @@ describe('useAgentConsent', () => {
await vi.waitFor(() => {
expect(fetchWithUnifiedRemint).toHaveBeenLastCalledWith(
- 'https://api.comfy.test/api/global-settings',
+ 'https://cloud.comfy.test/api/global-settings',
expect.objectContaining({
method: 'POST',
headers: expect.objectContaining({
@@ -880,7 +881,7 @@ describe('useAgentConsent', () => {
expect(useTeamWorkspaceStore().initialize).toHaveBeenCalledOnce()
expect(fetchWithUnifiedRemint).toHaveBeenCalledOnce()
expect(fetchWithUnifiedRemint).toHaveBeenCalledWith(
- 'https://api.comfy.test/api/global-settings',
+ 'https://cloud.comfy.test/api/global-settings',
expect.objectContaining({
method: 'POST',
body: JSON.stringify({ key: stored.key, value: true })