Files
ComfyUI_frontend/src/platform/surveys/surveyRegistry.ts
Christian Byrne a75444d56a Track node search usage for nightly survey (#9934)
## WIP — waiting on Typeform ID from Alex Tov (Monday)

Pre-wires `trackFeatureUsed('node-search')` in
`NodeSearchBoxPopover.vue`. Increments a localStorage counter each time
the user opens node search. Currently a no-op because the
`FEATURE_SURVEYS` registry is empty.

**Monday**: Alex provides Typeform ID → add registry entry → survey goes
live on nightly builds.

### What this PR does
- Imports `useSurveyFeatureTracking` composable
- Calls `trackFeatureUsed()` in `showNewSearchBox()`

### What's still needed (will update this PR)
- [x] Add `node-search` entry to `FEATURE_SURVEYS` in
`surveyRegistry.ts` with Typeform ID
- [x] Set up Typeform → Slack webhook to
`#frontend-nightly-user-feedback`
- [ ] Test end-to-end on nightly build

### How the survey system works
After 3 uses of node search on a nightly build, a Typeform survey
popover slides in (once per user, 4-day global cooldown between
surveys). Eligibility: nightly + localhost only, respects opt-out.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9934-WIP-Track-node-search-usage-for-nightly-survey-3246d73d365081308847dd4c0085f21c)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
2026-03-17 05:43:32 -07:00

27 lines
664 B
TypeScript

import type { FeatureSurveyConfig } from './useSurveyEligibility'
/**
* Registry of all feature surveys.
* Add new surveys here when targeting specific features for feedback.
*/
export const FEATURE_SURVEYS: Record<string, FeatureSurveyConfig> = {
'node-search': {
featureId: 'node-search',
typeformId: 'goZLqjKL',
triggerThreshold: 3,
delayMs: 5000
}
}
export function getSurveyConfig(
featureId: string
): FeatureSurveyConfig | undefined {
return FEATURE_SURVEYS[featureId]
}
export function getEnabledSurveys(): FeatureSurveyConfig[] {
return Object.values(FEATURE_SURVEYS).filter(
(config) => config.enabled !== false
)
}