From aeabc24bf24e63227bacc4409d08af18d9b0820e Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 23 Oct 2025 13:20:48 -0700 Subject: [PATCH] make support URL dynamic based on distribution (#6205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add query param to indicate whether support ticket is from cloud or OSS. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6205-make-support-URL-dynamic-based-on-distribution-2946d73d365081868093c52981021189) by [Unito](https://www.unito.io) --------- Co-authored-by: DrJKL Co-authored-by: GitHub Action --- browser_tests/tests/dialog.spec.ts | 8 +++++++- src/composables/useCoreCommands.ts | 3 ++- src/platform/support/config.ts | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/platform/support/config.ts diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index 7459acf58..9ccd4cd67 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -301,7 +301,9 @@ test.describe('Settings', () => { }) test.describe('Support', () => { - test('Should open external zendesk link', async ({ comfyPage }) => { + test('Should open external zendesk link with OSS tag', async ({ + comfyPage + }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Top') const pagePromise = comfyPage.page.context().waitForEvent('page') await comfyPage.menu.topbar.triggerTopbarCommand(['Help', 'Support']) @@ -309,6 +311,10 @@ test.describe('Support', () => { await newPage.waitForLoadState('networkidle') await expect(newPage).toHaveURL(/.*support\.comfy\.org.*/) + + const url = new URL(newPage.url()) + expect(url.searchParams.get('tf_42243568391700')).toBe('oss') + await newPage.close() }) }) diff --git a/src/composables/useCoreCommands.ts b/src/composables/useCoreCommands.ts index ed1bc7fba..65de98fcc 100644 --- a/src/composables/useCoreCommands.ts +++ b/src/composables/useCoreCommands.ts @@ -23,6 +23,7 @@ import { useAssetBrowserDialog } from '@/platform/assets/composables/useAssetBro import { createModelNodeFromAsset } from '@/platform/assets/utils/createModelNodeFromAsset' import { isCloud } from '@/platform/distribution/types' import { useSettingStore } from '@/platform/settings/settingStore' +import { SUPPORT_URL } from '@/platform/support/config' import { useTelemetry } from '@/platform/telemetry' import { useToastStore } from '@/platform/updates/common/toastStore' import { useWorkflowService } from '@/platform/workflow/core/services/workflowService' @@ -775,7 +776,7 @@ export function useCoreCommands(): ComfyCommand[] { label: 'Contact Support', versionAdded: '1.17.8', function: () => { - window.open('https://support.comfy.org/', '_blank') + window.open(SUPPORT_URL, '_blank') } }, { diff --git a/src/platform/support/config.ts b/src/platform/support/config.ts new file mode 100644 index 000000000..77458ed16 --- /dev/null +++ b/src/platform/support/config.ts @@ -0,0 +1,17 @@ +import { isCloud } from '@/platform/distribution/types' + +/** + * Zendesk ticket form field ID for the distribution tag. + * This field is used to categorize support requests by their source (cloud vs OSS). + */ +const DISTRIBUTION_FIELD_ID = 'tf_42243568391700' + +/** + * Support URLs for the ComfyUI platform. + * The URL varies based on whether the application is running in Cloud or OSS distribution. + * + * - Cloud: Includes 'ccloud' tag for identifying cloud-based support requests + * - OSS: Includes 'oss' tag for identifying open-source support requests + */ +const TAG = isCloud ? 'ccloud' : 'oss' +export const SUPPORT_URL = `https://support.comfy.org/hc/en-us/requests/new?${DISTRIBUTION_FIELD_ID}=${TAG}`