feat: workflow sharing and ComfyHub publish flow (#8951)

## Summary

Add workflow sharing by URL and a multi-step ComfyHub publish wizard,
gated by feature flags and an optional profile gate.

## Changes

- **What**: Share dialog with URL generation and asset warnings;
ComfyHub publish wizard (Describe → Examples → Finish) with thumbnail
upload and tags; profile gate flow; shared workflow URL loader with
confirmation dialog
- **Dependencies**: None (new `sharing/` module under
`src/platform/workflow/`)

## Review Focus

- Three new feature flags: `workflow_sharing_enabled`,
`comfyhub_upload_enabled`, `comfyhub_profile_gate_enabled`
- Share service API contract and stale-share detection
(`workflowShareService.ts`)
- Publish wizard and profile gate state management
- Shared workflow URL loading and query-param preservation

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8951-feat-share-workflow-by-URL-30b6d73d3650813ebbfafdad775bfb33)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Alexander Brown
2026-03-05 16:33:06 -08:00
committed by GitHub
parent 6c2680f0ba
commit 1bac5d9bdd
71 changed files with 6448 additions and 598 deletions

View File

@@ -247,7 +247,7 @@ General-purpose composables:
| `useTreeExpansion` | Handles tree node expansion state |
| `useWorkflowAutoSave` | Handles automatic workflow saving |
| `useWorkflowPersistence` | Manages workflow persistence |
| `useWorkflowPersistenceV2` | Manages workflow persistence |
| `useWorkflowValidation` | Validates workflow integrity |
## Usage Guidelines

View File

@@ -23,7 +23,10 @@ export enum ServerFeatureFlag {
TEAM_WORKSPACES_ENABLED = 'team_workspaces_enabled',
USER_SECRETS_ENABLED = 'user_secrets_enabled',
NODE_REPLACEMENTS = 'node_replacements',
NODE_LIBRARY_ESSENTIALS_ENABLED = 'node_library_essentials_enabled'
NODE_LIBRARY_ESSENTIALS_ENABLED = 'node_library_essentials_enabled',
WORKFLOW_SHARING_ENABLED = 'workflow_sharing_enabled',
COMFYHUB_UPLOAD_ENABLED = 'comfyhub_upload_enabled',
COMFYHUB_PROFILE_GATE_ENABLED = 'comfyhub_profile_gate_enabled'
}
/**
@@ -130,6 +133,29 @@ export function useFeatureFlags() {
false
)
)
},
get workflowSharingEnabled() {
// UI is also gated on `isCloud` in TopMenuSection; default false
// to match other flags' opt-in convention.
return resolveFlag(
ServerFeatureFlag.WORKFLOW_SHARING_ENABLED,
remoteConfig.value.workflow_sharing_enabled,
false
)
},
get comfyHubUploadEnabled() {
return resolveFlag(
ServerFeatureFlag.COMFYHUB_UPLOAD_ENABLED,
remoteConfig.value.comfyhub_upload_enabled,
false
)
},
get comfyHubProfileGateEnabled() {
return resolveFlag(
ServerFeatureFlag.COMFYHUB_PROFILE_GATE_ENABLED,
remoteConfig.value.comfyhub_profile_gate_enabled,
false
)
}
})