feat: split telemetry opt-out into usage (PostHog) and error (Sentry) settings#4119
Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Open
feat: split telemetry opt-out into usage (PostHog) and error (Sentry) settings#4119devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Conversation
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
… 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.
1288cab to
6a5343d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: split telemetry opt-out into usage (PostHog) and error (Sentry)
Summary
Replaces the single
telemetry_consentsetting with two independent toggles:telemetry_usage— controls PostHog usage analytics (callsanalyticsCommands.setDisabledas a config side effect)telemetry_error— controls Sentry error reporting (togglesSentry.getClient().getOptions().enabled)Both default to
true. A migration path intransform.tsmaps oldtelemetry_consentvalues 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
ConfigGeneralstruct, settings UI, and persister tests (including a new migration test — all 19 tests pass).Review & Testing Checklist for Human
config_types.rsreplacestelemetry_consentwith two new fields but has no#[serde(default)]or#[serde(alias)]on them. Existing persisted Rust-side configs containingtelemetry_consentmay 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.Sentry.getClient().getOptions().enabled = valueis 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.telemetry_consent: false, confirm both new toggles load as disabled after upgrade.analyticsCommands.setDisabled(true)is called and analytics stop.Notes
desktop_ci(linux-aarch64, linux-x86_64, macos) failures are pre-existingpico_argsRust compilation errors unrelated to this PR. Thecijob that runsexit 1is also pre-existing.fmtand the othercijob pass.