mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
feat: enable feedback button on nightly releases (#8220)
## Summary Enables the feedback button on nightly releases to collect user feedback and distinguish it from stable releases in Zendesk. ## Changes - Add distribution tracking to feedback URL (cloud/nightly/stable) - Export `getDistribution()` and `ZENDESK_FIELDS` from support config for reuse - Enable feedback button for both cloud and nightly builds - Track distribution in Zendesk as: `ccloud`, `oss-nightly`, or `oss` - Fix type signatures for `normalizeIndustry`/`normalizeUseCase` to accept `unknown` ## Requirements - [ ] Support team needs to add `oss-nightly` as a valid value for the distribution field in Zendesk ## Test plan - [ ] Build and run nightly version, verify feedback button appears - [ ] Click feedback button, verify Zendesk form opens with correct distribution parameter - [ ] Verify cloud builds still show feedback button as before - [ ] Verify stable OSS builds don't show feedback button ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8220-feat-enable-feedback-button-on-nightly-releases-2ef6d73d3650816db81ef970919770a4) by [Unito](https://www.unito.io)
This commit is contained in:
committed by
GitHub
parent
a08ccb55c1
commit
524c7e9b95
@@ -1,9 +1,9 @@
|
||||
import { isCloud } from '@/platform/distribution/types'
|
||||
import { isCloud, isNightly } from '@/platform/distribution/types'
|
||||
|
||||
/**
|
||||
* Zendesk ticket form field IDs.
|
||||
*/
|
||||
const ZENDESK_FIELDS = {
|
||||
export const ZENDESK_FIELDS = {
|
||||
/** Distribution tag (cloud vs OSS) */
|
||||
DISTRIBUTION: 'tf_42243568391700',
|
||||
/** User email (anonymous requester) */
|
||||
@@ -14,6 +14,16 @@ const ZENDESK_FIELDS = {
|
||||
USER_ID: 'tf_42515251051412'
|
||||
} as const
|
||||
|
||||
/**
|
||||
* Gets the distribution identifier for Zendesk tracking.
|
||||
* Helps distinguish feedback from different build types.
|
||||
*/
|
||||
export function getDistribution(): 'ccloud' | 'oss-nightly' | 'oss' {
|
||||
if (isCloud) return 'ccloud'
|
||||
if (isNightly) return 'oss-nightly'
|
||||
return 'oss'
|
||||
}
|
||||
|
||||
const SUPPORT_BASE_URL = 'https://support.comfy.org/hc/en-us/requests/new'
|
||||
|
||||
/**
|
||||
@@ -28,7 +38,7 @@ export function buildSupportUrl(params?: {
|
||||
userId?: string | null
|
||||
}): string {
|
||||
const searchParams = new URLSearchParams({
|
||||
[ZENDESK_FIELDS.DISTRIBUTION]: isCloud ? 'ccloud' : 'oss'
|
||||
[ZENDESK_FIELDS.DISTRIBUTION]: getDistribution()
|
||||
})
|
||||
|
||||
if (params?.userEmail) {
|
||||
|
||||
@@ -526,7 +526,7 @@ const useCaseFuse = new Fuse(USE_CASE_CATEGORIES, FUSE_OPTIONS)
|
||||
/**
|
||||
* Normalize industry responses using Fuse.js fuzzy search
|
||||
*/
|
||||
export function normalizeIndustry(rawIndustry: string): string {
|
||||
export function normalizeIndustry(rawIndustry: unknown): string {
|
||||
if (!rawIndustry || typeof rawIndustry !== 'string') {
|
||||
return 'Other / Undefined'
|
||||
}
|
||||
@@ -554,7 +554,7 @@ export function normalizeIndustry(rawIndustry: string): string {
|
||||
/**
|
||||
* Normalize use case responses using Fuse.js fuzzy search
|
||||
*/
|
||||
export function normalizeUseCase(rawUseCase: string): string {
|
||||
export function normalizeUseCase(rawUseCase: unknown): string {
|
||||
if (!rawUseCase || typeof rawUseCase !== 'string') {
|
||||
return 'Other / Undefined'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user