feat: [ENG-3035] rename user-facing analytics setting key analytics.e…#746
Conversation
…nabled to analytics.share The key name now reflects what it controls: local analytics tracking is always on (regardless of auth or this setting); the flag only gates whether collected events are shared with the remote telemetry backend. - Rename the user-facing key value analytics.enabled -> analytics.share across settings set/get/list, the onboarding opt-in script, and the disclosure command reference. Hard rename (no alias) — the feature is unreleased. - Behavior unchanged: tracking stays always-on locally; the flag still gates only remote sharing. - Internals kept (value-only rename): GlobalConfig.analytics field, the globalConfig:setAnalytics transport event, in-process method names, and the key-constant identifier names.
|
Claude finished @bao-byterover's task in 4m 8s —— View job Review:
|
0f44a29
into
proj/analytics-system-tool-mode
| */ | ||
|
|
||
| export const ANALYTICS_ENABLED_KEY = 'analytics.enabled' as const | ||
| export const ANALYTICS_ENABLED_KEY = 'analytics.share' as const |
There was a problem hiding this comment.
nitpick (non-blocking): the constant identifier still reads ANALYTICS_ENABLED_KEY but resolves to the new wire value 'analytics.share'. The commit message explains this is intentional (internals kept, value-only rename), but a one-line comment here would save the next reader from a double-take and grep confusion (e.g. greping ANALYTICS_ENABLED_KEY does not surface the user-facing key name).
| export const ANALYTICS_ENABLED_KEY = 'analytics.share' as const | |
| // Identifier is intentionally retained from M16.2; the literal value is the | |
| // user-facing wire key. Value renamed to `analytics.share` in ENG-3035 to | |
| // reflect that local tracking is always on and the flag only gates remote sharing. | |
| export const ANALYTICS_ENABLED_KEY = 'analytics.share' as const |
|
|
||
| /** | ||
| * Smoke coverage for the post-M16.4 surface of `analytics.enabled`. | ||
| * Smoke coverage for the post-M16.4 surface of `analytics.share`. |
There was a problem hiding this comment.
nitpick (non-blocking): the file is still named analytics-enabled.test.ts but every it(...) / describe(...) inside it now targets analytics.share. Consider git mv-ing this to analytics-share.test.ts so file naming matches the surface it covers — otherwise future grep -r analytics.share test/ won't surface this file by path. (Cosmetic; the tests themselves are correct.)
| @@ -69,7 +69,7 @@ describe('brv settings get analytics.enabled (M16.4 smoke)', () => { | |||
| current: false, | |||
| default: false, | |||
| description: 'Send anonymous telemetry to ByteRover.', | |||
There was a problem hiding this comment.
nitpick (non-blocking): the production descriptor for this key (in src/server/core/domain/entities/settings.ts) reads 'Send anonymous telemetry to ByteRover. Local tracking is always on.'. This stub is missing the second sentence. Since the test only asserts wiring (event + payload), the stale text doesn't break anything — but a future test that does check the description would diverge silently. Worth syncing while you're touching this file.
No description provided.