Skip to content

Commit fcb0181

Browse files
comfy-pr-botchristian-byrneDrJKLactions-user
authored
[backport rh-test] make support URL dynamic based on distribution (#6233)
Backport of #6205 to `rh-test` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6233-backport-rh-test-make-support-URL-dynamic-based-on-distribution-2956d73d365081e5aacecce36a6b9c67) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <[email protected]> Co-authored-by: DrJKL <[email protected]> Co-authored-by: GitHub Action <[email protected]>
1 parent 63c91a6 commit fcb0181

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

browser_tests/tests/dialog.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,20 @@ test.describe('Settings', () => {
301301
})
302302

303303
test.describe('Support', () => {
304-
test('Should open external zendesk link', async ({ comfyPage }) => {
304+
test('Should open external zendesk link with OSS tag', async ({
305+
comfyPage
306+
}) => {
305307
await comfyPage.setSetting('Comfy.UseNewMenu', 'Top')
306308
const pagePromise = comfyPage.page.context().waitForEvent('page')
307309
await comfyPage.menu.topbar.triggerTopbarCommand(['Help', 'Support'])
308310
const newPage = await pagePromise
309311

310312
await newPage.waitForLoadState('networkidle')
311313
await expect(newPage).toHaveURL(/.*support\.comfy\.org.*/)
314+
315+
const url = new URL(newPage.url())
316+
expect(url.searchParams.get('tf_42243568391700')).toBe('oss')
317+
312318
await newPage.close()
313319
})
314320
})

src/composables/useCoreCommands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useAssetBrowserDialog } from '@/platform/assets/composables/useAssetBro
1919
import { createModelNodeFromAsset } from '@/platform/assets/utils/createModelNodeFromAsset'
2020
import { isCloud } from '@/platform/distribution/types'
2121
import { useSettingStore } from '@/platform/settings/settingStore'
22+
import { SUPPORT_URL } from '@/platform/support/config'
2223
import { useTelemetry } from '@/platform/telemetry'
2324
import { useToastStore } from '@/platform/updates/common/toastStore'
2425
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
@@ -771,7 +772,7 @@ export function useCoreCommands(): ComfyCommand[] {
771772
label: 'Contact Support',
772773
versionAdded: '1.17.8',
773774
function: () => {
774-
window.open('https://support.comfy.org/', '_blank')
775+
window.open(SUPPORT_URL, '_blank')
775776
}
776777
},
777778
{

src/platform/support/config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { isCloud } from '@/platform/distribution/types'
2+
3+
/**
4+
* Zendesk ticket form field ID for the distribution tag.
5+
* This field is used to categorize support requests by their source (cloud vs OSS).
6+
*/
7+
const DISTRIBUTION_FIELD_ID = 'tf_42243568391700'
8+
9+
/**
10+
* Support URLs for the ComfyUI platform.
11+
* The URL varies based on whether the application is running in Cloud or OSS distribution.
12+
*
13+
* - Cloud: Includes 'ccloud' tag for identifying cloud-based support requests
14+
* - OSS: Includes 'oss' tag for identifying open-source support requests
15+
*/
16+
const TAG = isCloud ? 'ccloud' : 'oss'
17+
export const SUPPORT_URL = `https://support.comfy.org/hc/en-us/requests/new?${DISTRIBUTION_FIELD_ID}=${TAG}`

0 commit comments

Comments
 (0)