@@ -45,6 +45,7 @@ export function TelemetryConsentDialog() {
4545 const loadSettings = useGeneralStore ( state => state . loadSettings )
4646
4747 const hasShownDialogThisSession = useRef ( false )
48+ const isDevelopment = process . env . NODE_ENV === 'development'
4849
4950 useEffect ( ( ) => {
5051 let isMounted = true
@@ -75,19 +76,23 @@ export function TelemetryConsentDialog() {
7576 logger . debug ( 'Settings loaded state:' , {
7677 telemetryNotifiedUser,
7778 telemetryEnabled,
78- hasShownInSession : hasShownDialogThisSession . current
79+ hasShownInSession : hasShownDialogThisSession . current ,
80+ environment : process . env . NODE_ENV
7981 } )
8082
8183 // Only show dialog if:
8284 // 1. Settings are fully loaded from the database
8385 // 2. User has not been notified yet (according to database)
8486 // 3. Telemetry is currently enabled (default)
8587 // 4. Dialog hasn't been shown in this session already (extra protection)
86- if ( settingsLoaded && ! telemetryNotifiedUser && telemetryEnabled && ! hasShownDialogThisSession . current ) {
88+ // 5. We're in development environment
89+ if ( settingsLoaded && ! telemetryNotifiedUser && telemetryEnabled && ! hasShownDialogThisSession . current && isDevelopment ) {
8790 setOpen ( true )
8891 hasShownDialogThisSession . current = true
92+ } else if ( settingsLoaded && ! telemetryNotifiedUser && ! isDevelopment ) {
93+ setTelemetryNotifiedUser ( true )
8994 }
90- } , [ settingsLoaded , telemetryNotifiedUser , telemetryEnabled ] )
95+ } , [ settingsLoaded , telemetryNotifiedUser , telemetryEnabled , setTelemetryNotifiedUser ] )
9196
9297 const handleAccept = ( ) => {
9398 trackEvent ( 'telemetry_consent_accepted' , {
0 commit comments