Skip to content

Comments

feat: split telemetry opt-out into usage (PostHog) and error (Sentry) settings#4119

Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1771573136-split-telemetry-settings
Open

feat: split telemetry opt-out into usage (PostHog) and error (Sentry) settings#4119
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1771573136-split-telemetry-settings

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 20, 2026

feat: split telemetry opt-out into usage (PostHog) and error (Sentry)

Summary

Replaces the single telemetry_consent setting with two independent toggles:

  • telemetry_usage — controls PostHog usage analytics (calls analyticsCommands.setDisabled as a config side effect)
  • telemetry_error — controls Sentry error reporting (toggles Sentry.getClient().getOptions().enabled)

Both default to true. A migration path in transform.ts maps old telemetry_consent values to both new fields so existing users' preferences are preserved on the JS/TinyBase side.

Files changed: settings store mapping, config registry (with new side effects), zod/tinybase schemas, Rust ConfigGeneral struct, settings UI, and persister tests (including a new migration test — all 19 tests pass).

Review & Testing Checklist for Human

  • Rust deserialization of existing configs: config_types.rs replaces telemetry_consent with two new fields but has no #[serde(default)] or #[serde(alias)] on them. Existing persisted Rust-side configs containing telemetry_consent may fail to deserialize. Verify whether this struct is used for on-disk persistence or only as a transient type. This is the highest-risk item.
  • Verify Sentry toggle actually works: Sentry.getClient().getOptions().enabled = value is a direct mutation of the options object — not a documented public API. Disable "Share error reports", trigger an error, and confirm nothing is sent to Sentry. Re-enable and confirm errors flow again.
  • Verify the settings UI renders correctly: Open Settings → App and confirm both "Share usage data" and "Share error reports" toggles appear and function independently.
  • Test migration path: With a settings file that has the old telemetry_consent: false, confirm both new toggles load as disabled after upgrade.
  • Verify PostHog toggle works: Disable "Share usage data" and confirm analyticsCommands.setDisabled(true) is called and analytics stop.

Notes

  • Requested by: @ComputelessComputer
  • Link to Devin run
  • CI note: desktop_ci (linux-aarch64, linux-x86_64, macos) failures are pre-existing pico_args Rust compilation errors unrelated to this PR. The ci job that runs exit 1 is also pre-existing. fmt and the other ci job pass.

@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 6a5343d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69983b3720365d00087e1914

@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 6a5343d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69983b37368d9e00085d6546

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 3 commits February 20, 2026 19:45
… settings

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Split the telemetry usage and error opt-out property updates into
separate analytics commands to ensure both properties are correctly
set independently.
@ComputelessComputer ComputelessComputer force-pushed the devin/1771573136-split-telemetry-settings branch from 1288cab to 6a5343d Compare February 20, 2026 10:45
@ComputelessComputer ComputelessComputer requested review from yujonglee and removed request for ComputelessComputer February 21, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant