Skip to content

Commit aeabc24

Browse files
christian-byrneDrJKLactions-user
authored
make support URL dynamic based on distribution (#6205)
## 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 <DrJKL@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
1 parent 56a6ad5 commit aeabc24

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

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
@@ -23,6 +23,7 @@ import { useAssetBrowserDialog } from '@/platform/assets/composables/useAssetBro
2323
import { createModelNodeFromAsset } from '@/platform/assets/utils/createModelNodeFromAsset'
2424
import { isCloud } from '@/platform/distribution/types'
2525
import { useSettingStore } from '@/platform/settings/settingStore'
26+
import { SUPPORT_URL } from '@/platform/support/config'
2627
import { useTelemetry } from '@/platform/telemetry'
2728
import { useToastStore } from '@/platform/updates/common/toastStore'
2829
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
@@ -775,7 +776,7 @@ export function useCoreCommands(): ComfyCommand[] {
775776
label: 'Contact Support',
776777
versionAdded: '1.17.8',
777778
function: () => {
778-
window.open('https://support.comfy.org/', '_blank')
779+
window.open(SUPPORT_URL, '_blank')
779780
}
780781
},
781782
{

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)