LCOV - code coverage report
Current view: top level - src/platform/surveys - surveyRegistry.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 42.9 % 7 3
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { FeatureSurveyConfig } from './useSurveyEligibility'
       2              : 
       3              : /**
       4              :  * Registry of all feature surveys.
       5              :  * Add new surveys here when targeting specific features for feedback.
       6              :  */
       7         2355 : export const FEATURE_SURVEYS: Record<string, FeatureSurveyConfig> = {
       8              :   'node-search': {
       9              :     featureId: 'node-search',
      10              :     typeformId: 'goZLqjKL',
      11              :     triggerThreshold: 3,
      12              :     delayMs: 5000
      13              :   },
      14              :   'queue-progress-overlay': {
      15              :     featureId: 'queue-progress-overlay',
      16              :     typeformId: 'HZ5saxry',
      17              :     triggerThreshold: 16,
      18              :     delayMs: 5000
      19              :   },
      20              :   'error-panel': {
      21              :     featureId: 'error-panel',
      22              :     typeformId: 'iFp4p4mV',
      23              :     triggerThreshold: 3,
      24              :     presentation: 'inline-cta'
      25              :   },
      26              :   'example-workflows': {
      27              :     featureId: 'example-workflows',
      28              :     typeformId: 'OnKJQYLE',
      29              :     triggerThreshold: 3,
      30              :     delayMs: 5000
      31              :   }
      32              : }
      33              : 
      34         6825 : export function getSurveyConfig(
      35              :   featureId: string
      36              : ): FeatureSurveyConfig | undefined {
      37         6825 :   return FEATURE_SURVEYS[featureId]
      38              : }
      39              : 
      40            0 : export function getEnabledSurveys(): FeatureSurveyConfig[] {
      41            0 :   return Object.values(FEATURE_SURVEYS).filter(
      42              :     (config) => config.enabled !== false
      43              :   )
      44              : }
      45              : 
      46              : /**
      47              :  * Surveys that should auto-popup via the global controller.
      48              :  * Inline-CTA surveys are excluded because their feature-site renders them.
      49              :  */
      50            0 : export function getFloatingSurveys(): FeatureSurveyConfig[] {
      51            0 :   return getEnabledSurveys().filter(
      52              :     (config) => (config.presentation ?? 'floating') === 'floating'
      53              :   )
      54              : }
        

Generated by: LCOV version 2.0-1