From ef3d547492ac39d0b281cf387ed48f9d8de33fc5 Mon Sep 17 00:00:00 2001 From: Willie Date: Sat, 31 Oct 2026 11:02:24 +0000 Subject: [PATCH] feat(workspace): a dropped workflow offers a deployment that runs it (#21587) When an opened or dropped workflow needs nodes absent from Comfy Cloud, the deployment dialog that opens over the issues card offers to switch to a workspace deployment that can run it. It uses the compatibility check already on main. Stack: 4 of 4, after #21188. Board B of the DES-1254 drop-dialog canvas. - Compatible, ready deployments appear first in Run on. Other deployments remain visible and disabled, with missing-node or unchecked status. Switch asks about unsaved workflows using the current shared confirmation and leave-prompt guard, then selects the deployment; server refusals appear as toasts. - If every deployment was checked and lacks nodes, the dialog offers creation and explains that none can run the workflow. - The issues card shows at once, as in #21188. The dialog waits at most 5 s for the deployments listing, then at most 3 s for the compatibility check. It opens by itself for an empty listing, for Switch, or once every deployment lacks the nodes. With no answer in time, an unchecked deployment, only a deployment that is not ready running it, the feature flag off, or its code failing to load, it stays closed and the issues card offers what the check finds: Switch, or Set up once Comfy Cloud and every deployment are found lacking the nodes. As in #21188, it opens by itself only the first time the page meets a set of missing node types, and not once another workflow is active, the issues card is closed or the editor is in App mode. It also stays closed once the open workflow no longer needs a deployment, which the card's custom deployment row reads too. - The dialog's missing models and agent brief follow Comfy Cloud's model check when it finishes after the dialog opens. The brief drops invisible characters from names taken from the workflow. - The dialog frame, missing-items table and docs link are shared between creation and switching. Run on uses two new props on the design system's `SelectItem` (`textClass`, `reserveIndicator`). The workflow warning callback avoids an import cycle through the workflow service. - The stack's changed suites and GraphView's pass (13 files, 113 tests), including a listing that never answers while another workflow opens. Each fix in cc9bd948 fails a test when reverted. - Pre-commit format, lint, server-fact checks and typecheck, and pre-push dependency audit, knip and Fallow pass. Fallow warns on 7 domain-boundary imports around the missing-nodes notice hook. - Browser verification is still pending; there is no Playwright case yet. --------- Co-authored-by: Benjamin Lu (cherry picked from commit 67016f4d9960ad2631302605844ff5cf0faacb2c) --- src/components/ui/select/SelectItem.vue | 32 ++- src/locales/en/main.json | 11 +- .../workflow/core/services/workflowService.ts | 4 +- .../missingNodesNotice.test.ts | 27 ++ .../nodeReplacement/missingNodesNotice.ts | 24 ++ .../components/CustomDeploymentCard.vue | 263 ++++++++--------- .../components/DeploymentDialogFrame.vue | 29 ++ .../components/DeploymentDocsLink.vue | 22 ++ .../ErrorOverlayDeploymentOffer.test.ts | 48 ++++ .../ErrorOverlayDeploymentOfferRow.vue | 6 +- .../components/MissingItemsTable.vue | 26 ++ .../components/SwitchDeploymentCard.test.ts | 216 ++++++++++++++ .../components/SwitchDeploymentCard.vue | 225 +++++++++++++++ .../WorkflowNeedsDeploymentCard.test.ts | 174 ++++++++++-- .../WorkflowNeedsDeploymentCard.vue | 44 ++- .../composables/useCustomDeploymentOffered.ts | 37 +-- .../workspace/customDeploymentPitch.ts | 7 + .../workspace/deploymentBuildBrief.test.ts | 14 + .../workspace/deploymentBuildBrief.ts | 4 +- .../workspace/noticeMissingNodes.test.ts | 267 +++++++++++++++--- src/platform/workspace/noticeMissingNodes.ts | 95 +++++-- ...CustomDeploymentDialog.loadFailure.test.ts | 7 +- .../workspace/openCustomDeploymentDialog.ts | 31 +- .../workspace/openWorkflowForCheck.test.ts | 54 ++++ .../workspace/openWorkflowForCheck.ts | 34 +++ .../stores/customDeploymentOfferStore.ts | 3 +- .../workspace/workflowDeploymentOffer.test.ts | 167 +++++++++++ .../workspace/workflowDeploymentOffer.ts | 87 ++++++ src/views/GraphView.test.ts | 38 +++ src/views/GraphView.vue | 11 +- 30 files changed, 1732 insertions(+), 275 deletions(-) create mode 100644 src/platform/workflowErrors/nodeReplacement/missingNodesNotice.test.ts create mode 100644 src/platform/workflowErrors/nodeReplacement/missingNodesNotice.ts create mode 100644 src/platform/workspace/components/DeploymentDialogFrame.vue create mode 100644 src/platform/workspace/components/DeploymentDocsLink.vue create mode 100644 src/platform/workspace/components/MissingItemsTable.vue create mode 100644 src/platform/workspace/components/SwitchDeploymentCard.test.ts create mode 100644 src/platform/workspace/components/SwitchDeploymentCard.vue create mode 100644 src/platform/workspace/openWorkflowForCheck.test.ts create mode 100644 src/platform/workspace/openWorkflowForCheck.ts create mode 100644 src/platform/workspace/workflowDeploymentOffer.test.ts create mode 100644 src/platform/workspace/workflowDeploymentOffer.ts diff --git a/src/components/ui/select/SelectItem.vue b/src/components/ui/select/SelectItem.vue index 678853cad98..1d5dd6624ed 100644 --- a/src/components/ui/select/SelectItem.vue +++ b/src/components/ui/select/SelectItem.vue @@ -5,8 +5,19 @@ import type { HTMLAttributes } from 'vue' import { cn } from '@comfyorg/tailwind-utils' -const { class: className, ...restProps } = defineProps< - SelectItemProps & { class?: HTMLAttributes['class'] } +const { + class: className, + textClass, + reserveIndicator = false, + ...restProps +} = defineProps< + SelectItemProps & { + class?: HTMLAttributes['class'] + /** Classes for the item's text, which holds the slot. */ + textClass?: HTMLAttributes['class'] + /** Keeps the check's column on unchecked items too, so text that ends at the right lines up. */ + reserveIndicator?: boolean + } >() @@ -26,12 +37,21 @@ const { class: className, ...restProps } = defineProps< ) " > - + - -