fix(settings) : Disable showing statics in the dialog (#5998)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Ali Al Jufairi 2025-08-19 12:38:55 +09:00 committed by GitHub
parent 92bb4624c4
commit e290a61a52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -187,7 +187,7 @@ describe('SettingsSchema', () => {
expect(SETTINGS_SCHEMA.hideWindowTitle.showInDialog).toBe(true); expect(SETTINGS_SCHEMA.hideWindowTitle.showInDialog).toBe(true);
expect(SETTINGS_SCHEMA.hideTips.showInDialog).toBe(true); expect(SETTINGS_SCHEMA.hideTips.showInDialog).toBe(true);
expect(SETTINGS_SCHEMA.hideBanner.showInDialog).toBe(true); expect(SETTINGS_SCHEMA.hideBanner.showInDialog).toBe(true);
expect(SETTINGS_SCHEMA.usageStatisticsEnabled.showInDialog).toBe(true); expect(SETTINGS_SCHEMA.usageStatisticsEnabled.showInDialog).toBe(false);
// Check that advanced settings are hidden from dialog // Check that advanced settings are hidden from dialog
expect(SETTINGS_SCHEMA.selectedAuthType.showInDialog).toBe(false); expect(SETTINGS_SCHEMA.selectedAuthType.showInDialog).toBe(false);

View File

@ -103,7 +103,7 @@ export const SETTINGS_SCHEMA = {
requiresRestart: true, requiresRestart: true,
default: true, default: true,
description: 'Enable collection of usage statistics', description: 'Enable collection of usage statistics',
showInDialog: true, showInDialog: false, // All details are shown in /privacy and dependent on auth type
}, },
autoConfigureMaxOldSpaceSize: { autoConfigureMaxOldSpaceSize: {
type: 'boolean', type: 'boolean',

View File

@ -239,7 +239,7 @@ describe('SettingsUtils', () => {
expect(shouldShowInDialog('showMemoryUsage')).toBe(true); expect(shouldShowInDialog('showMemoryUsage')).toBe(true);
expect(shouldShowInDialog('vimMode')).toBe(true); expect(shouldShowInDialog('vimMode')).toBe(true);
expect(shouldShowInDialog('hideWindowTitle')).toBe(true); expect(shouldShowInDialog('hideWindowTitle')).toBe(true);
expect(shouldShowInDialog('usageStatisticsEnabled')).toBe(true); expect(shouldShowInDialog('usageStatisticsEnabled')).toBe(false);
}); });
it('should return false for settings marked to hide from dialog', () => { it('should return false for settings marked to hide from dialog', () => {
@ -286,7 +286,7 @@ describe('SettingsUtils', () => {
expect(allKeys).toContain('ideMode'); expect(allKeys).toContain('ideMode');
expect(allKeys).toContain('disableAutoUpdate'); expect(allKeys).toContain('disableAutoUpdate');
expect(allKeys).toContain('showMemoryUsage'); expect(allKeys).toContain('showMemoryUsage');
expect(allKeys).toContain('usageStatisticsEnabled'); expect(allKeys).not.toContain('usageStatisticsEnabled');
expect(allKeys).not.toContain('selectedAuthType'); expect(allKeys).not.toContain('selectedAuthType');
expect(allKeys).not.toContain('coreTools'); expect(allKeys).not.toContain('coreTools');
expect(allKeys).not.toContain('theme'); // Now hidden expect(allKeys).not.toContain('theme'); // Now hidden
@ -302,7 +302,7 @@ describe('SettingsUtils', () => {
expect(keys).toContain('showMemoryUsage'); expect(keys).toContain('showMemoryUsage');
expect(keys).toContain('vimMode'); expect(keys).toContain('vimMode');
expect(keys).toContain('hideWindowTitle'); expect(keys).toContain('hideWindowTitle');
expect(keys).toContain('usageStatisticsEnabled'); expect(keys).not.toContain('usageStatisticsEnabled');
expect(keys).not.toContain('selectedAuthType'); // Advanced setting expect(keys).not.toContain('selectedAuthType'); // Advanced setting
expect(keys).not.toContain('useExternalAuth'); // Advanced setting expect(keys).not.toContain('useExternalAuth'); // Advanced setting
}); });
@ -329,7 +329,7 @@ describe('SettingsUtils', () => {
expect(dialogKeys).toContain('showMemoryUsage'); expect(dialogKeys).toContain('showMemoryUsage');
expect(dialogKeys).toContain('vimMode'); expect(dialogKeys).toContain('vimMode');
expect(dialogKeys).toContain('hideWindowTitle'); expect(dialogKeys).toContain('hideWindowTitle');
expect(dialogKeys).toContain('usageStatisticsEnabled'); expect(dialogKeys).not.toContain('usageStatisticsEnabled');
expect(dialogKeys).toContain('ideMode'); expect(dialogKeys).toContain('ideMode');
expect(dialogKeys).toContain('disableAutoUpdate'); expect(dialogKeys).toContain('disableAutoUpdate');