diff --git a/app/(main)/setup/page.tsx b/app/(main)/setup/page.tsx index c40664f5..6f3fd608 100644 --- a/app/(main)/setup/page.tsx +++ b/app/(main)/setup/page.tsx @@ -38,6 +38,7 @@ interface WizardConfig { // Security sessionSecret: string; settingsSyncEnabled: boolean; + telemetryEnabled: boolean; // Logging logFormat: 'text' | 'json'; logLevel: 'error' | 'warn' | 'info' | 'debug'; @@ -66,6 +67,7 @@ const EMPTY_CONFIG: WizardConfig = { oauthIssuerUrl: '', sessionSecret: '', settingsSyncEnabled: true, + telemetryEnabled: false, logFormat: 'text', logLevel: 'info', faviconUrl: '', @@ -1002,8 +1004,11 @@ function SecurityStep({ config, setConfig, onNext, onBack }: Pick = { + // telemetryConsent is persisted to the telemetry state file by the API, + // not to admin config - see app/api/setup/step/route.ts. + const values: Record = { settingsSyncEnabled: config.settingsSyncEnabled, + telemetryConsent: config.telemetryEnabled ? 'on' : 'off', }; if (config.sessionSecret) values.sessionSecret = config.sessionSecret; await onNext('security', values); @@ -1068,6 +1073,15 @@ function SecurityStep({ config, setConfig, onNext, onBack }: Pick + +
+ setConfig({ ...config, telemetryEnabled: v })} + label="Send anonymous usage stats to help improve Bulwark" + hint="Off by default. One anonymous heartbeat per day with version, platform, and which features are enabled - never email addresses, hostnames, or IPs. You can change this anytime in admin settings." + /> +