feat(settings): rename negative settings to positive naming (disable* -> enable*) (#14142)

Co-authored-by: jacob314 <jacob314@gmail.com>
This commit is contained in:
Alexander Farber
2026-01-16 23:33:49 +01:00
committed by GitHub
parent f2d3b76389
commit 608da23393
25 changed files with 785 additions and 243 deletions
@@ -283,7 +283,7 @@ describe('Composer', () => {
thought: { subject: 'Hidden', description: 'Should not show' },
});
const config = createMockConfig({
getAccessibility: vi.fn(() => ({ disableLoadingPhrases: true })),
getAccessibility: vi.fn(() => ({ enableLoadingPhrases: false })),
});
const { lastFrame } = renderComposer(uiState, undefined, config);
+2 -2
View File
@@ -58,12 +58,12 @@ export const Composer = () => {
<LoadingIndicator
thought={
uiState.streamingState === StreamingState.WaitingForConfirmation ||
config.getAccessibility()?.disableLoadingPhrases
config.getAccessibility()?.enableLoadingPhrases === false
? undefined
: uiState.thought
}
currentLoadingPhrase={
config.getAccessibility()?.disableLoadingPhrases
config.getAccessibility()?.enableLoadingPhrases === false
? undefined
: uiState.currentLoadingPhrase
}
@@ -320,9 +320,9 @@ describe('SettingsDialog', () => {
// 'general.vimMode' has description 'Enable Vim keybindings' in settingsSchema.ts
expect(output).toContain('Vim Mode');
expect(output).toContain('Enable Vim keybindings');
// 'general.disableAutoUpdate' has description 'Disable automatic updates'
expect(output).toContain('Disable Auto Update');
expect(output).toContain('Disable automatic updates');
// 'general.enableAutoUpdate' has description 'Enable automatic updates.'
expect(output).toContain('Enable Auto Update');
expect(output).toContain('Enable automatic updates.');
});
});
@@ -353,7 +353,7 @@ describe('SettingsDialog', () => {
});
await waitFor(() => {
expect(lastFrame()).toContain('Disable Auto Update');
expect(lastFrame()).toContain('Enable Auto Update');
});
// Navigate up
@@ -1236,7 +1236,7 @@ describe('SettingsDialog', () => {
expect(lastFrame()).toContain('nonexistentsetting');
expect(lastFrame()).toContain('');
expect(lastFrame()).not.toContain('Vim Mode'); // Should not contain any settings
expect(lastFrame()).not.toContain('Disable Auto Update'); // Should not contain any settings
expect(lastFrame()).not.toContain('Enable Auto Update'); // Should not contain any settings
});
unmount();
@@ -1263,7 +1263,7 @@ describe('SettingsDialog', () => {
userSettings: {
general: {
vimMode: true,
disableAutoUpdate: true,
enableAutoUpdate: false,
debugKeystrokeLogging: true,
enablePromptCompletion: true,
},
@@ -1274,7 +1274,7 @@ describe('SettingsDialog', () => {
showLineNumbers: true,
showCitations: true,
accessibility: {
disableLoadingPhrases: true,
enableLoadingPhrases: false,
screenReader: true,
},
},
@@ -1287,7 +1287,7 @@ describe('SettingsDialog', () => {
respectGitIgnore: true,
respectGeminiIgnore: true,
enableRecursiveFileSearch: true,
disableFuzzySearch: false,
enableFuzzySearch: true,
},
},
tools: {
@@ -1310,7 +1310,7 @@ describe('SettingsDialog', () => {
userSettings: {
general: {
vimMode: false,
disableAutoUpdate: true,
enableAutoUpdate: false,
},
ui: {
showMemoryUsage: true,
@@ -1348,7 +1348,7 @@ describe('SettingsDialog', () => {
userSettings: {
ui: {
accessibility: {
disableLoadingPhrases: true,
enableLoadingPhrases: false,
screenReader: true,
},
showMemoryUsage: true,
@@ -1370,7 +1370,7 @@ describe('SettingsDialog', () => {
respectGitIgnore: false,
respectGeminiIgnore: true,
enableRecursiveFileSearch: false,
disableFuzzySearch: true,
enableFuzzySearch: false,
},
loadMemoryFromIncludeDirectories: true,
discoveryMaxDirs: 100,
@@ -1409,7 +1409,7 @@ describe('SettingsDialog', () => {
userSettings: {
general: {
vimMode: false,
disableAutoUpdate: false,
enableAutoUpdate: true,
debugKeystrokeLogging: false,
enablePromptCompletion: false,
},
@@ -1420,7 +1420,7 @@ describe('SettingsDialog', () => {
showLineNumbers: false,
showCitations: false,
accessibility: {
disableLoadingPhrases: false,
enableLoadingPhrases: true,
screenReader: false,
},
},
@@ -1433,7 +1433,7 @@ describe('SettingsDialog', () => {
respectGitIgnore: false,
respectGeminiIgnore: false,
enableRecursiveFileSearch: false,
disableFuzzySearch: false,
enableFuzzySearch: true,
},
},
tools: {
@@ -16,8 +16,8 @@ exports[`SettingsDialog > Initial Rendering > should render settings list with v
│ Vim Mode false │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -62,8 +62,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'accessibility settings
│ Vim Mode true* │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -108,8 +108,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'all boolean settings d
│ Vim Mode false* │
│ Enable Vim keybindings │
│ │
Disable Auto Update false* │
Disable automatic updates │
Enable Auto Update true* │
Enable automatic updates.
│ │
│ Enable Prompt Completion false* │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -154,8 +154,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'default state' correct
│ Vim Mode false │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -200,8 +200,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'file filtering setting
│ Vim Mode false │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -246,8 +246,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'focused on scope selec
│ Vim Mode false │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -292,8 +292,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'mixed boolean and numb
│ Vim Mode false* │
│ Enable Vim keybindings │
│ │
Disable Auto Update true* │
Disable automatic updates │
Enable Auto Update false* │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -338,8 +338,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'tools and security set
│ Vim Mode false │
│ Enable Vim keybindings │
│ │
Disable Auto Update false │
Disable automatic updates │
Enable Auto Update true │
Enable automatic updates.
│ │
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -384,8 +384,8 @@ exports[`SettingsDialog > Snapshot Tests > should render 'various boolean settin
│ Vim Mode true* │
│ Enable Vim keybindings │
│ │
Disable Auto Update true* │
Disable automatic updates │
Enable Auto Update false* │
Enable automatic updates.
│ │
│ Enable Prompt Completion true* │
│ Enable AI-powered prompt completion suggestions while typing. │
@@ -48,7 +48,7 @@ describe('useAtCompletion', () => {
respectGeminiIgnore: true,
})),
getEnableRecursiveFileSearch: () => true,
getFileFilteringDisableFuzzySearch: () => false,
getFileFilteringEnableFuzzySearch: () => true,
getResourceRegistry: vi.fn().mockReturnValue({
getAllResources: () => [],
}),
@@ -153,7 +153,7 @@ describe('useAtCompletion', () => {
cache: false,
cacheTtl: 0,
enableRecursiveFileSearch: true,
disableFuzzySearch: false,
enableFuzzySearch: true,
});
await fileSearch.initialize();
@@ -276,7 +276,7 @@ describe('useAtCompletion', () => {
cache: false,
cacheTtl: 0,
enableRecursiveFileSearch: true,
disableFuzzySearch: false,
enableFuzzySearch: true,
});
await realFileSearch.initialize();
@@ -558,7 +558,7 @@ describe('useAtCompletion', () => {
respectGitIgnore: true,
respectGeminiIgnore: true,
})),
getFileFilteringDisableFuzzySearch: () => false,
getFileFilteringEnableFuzzySearch: () => true,
} as unknown as Config;
const { result } = renderHook(() =>
+2 -2
View File
@@ -258,8 +258,8 @@ export function useAtCompletion(props: UseAtCompletionProps): void {
cacheTtl: 30, // 30 seconds
enableRecursiveFileSearch:
config?.getEnableRecursiveFileSearch() ?? true,
disableFuzzySearch:
config?.getFileFilteringDisableFuzzySearch() ?? false,
enableFuzzySearch:
config?.getFileFilteringEnableFuzzySearch() ?? true,
maxFiles: config?.getFileFilteringOptions()?.maxFileCount,
});
await searcher.initialize();
@@ -63,6 +63,8 @@ describe('useAtCompletion with Agents', () => {
})),
getEnableRecursiveFileSearch: () => true,
getFileFilteringDisableFuzzySearch: () => false,
getFileFilteringEnableFuzzySearch: () => true,
getAgentsSettings: () => ({}),
getResourceRegistry: vi.fn().mockReturnValue({
getAllResources: () => [],
}),
@@ -34,7 +34,7 @@ describe('checkForUpdates', () => {
mockSettings = {
merged: {
general: {
disableUpdateNag: false,
enableAutoUpdateNotification: true,
},
},
} as LoadedSettings;
@@ -45,8 +45,8 @@ describe('checkForUpdates', () => {
vi.restoreAllMocks();
});
it('should return null if disableUpdateNag is true', async () => {
mockSettings.merged.general.disableUpdateNag = true;
it('should return null if enableAutoUpdateNotification is false', async () => {
mockSettings.merged.general.enableAutoUpdateNotification = false;
const result = await checkForUpdates(mockSettings);
expect(result).toBeNull();
expect(getPackageJson).not.toHaveBeenCalled();
+1 -1
View File
@@ -51,7 +51,7 @@ export async function checkForUpdates(
settings: LoadedSettings,
): Promise<UpdateObject | null> {
try {
if (settings.merged.general.disableUpdateNag) {
if (!settings.merged.general.enableAutoUpdateNotification) {
return null;
}
// Skip update check when running from source (development mode)