diff --git a/docs/cli/settings.md b/docs/cli/settings.md index d699323d86..e7fe0dd1ee 100644 --- a/docs/cli/settings.md +++ b/docs/cli/settings.md @@ -116,6 +116,12 @@ they appear in the UI. | Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` | | Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` | +### Advanced + +| UI Label | Setting | Description | Default | +| --------------------------------- | ------------------------------ | --------------------------------------------- | ------- | +| Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `false` | + ### Experimental | UI Label | Setting | Description | Default | diff --git a/packages/cli/src/config/settingsSchema.test.ts b/packages/cli/src/config/settingsSchema.test.ts index 1be3de209b..d83ac705f7 100644 --- a/packages/cli/src/config/settingsSchema.test.ts +++ b/packages/cli/src/config/settingsSchema.test.ts @@ -224,7 +224,7 @@ describe('SettingsSchema', () => { expect( getSettingsSchema().advanced.properties.autoConfigureMemory .showInDialog, - ).toBe(false); + ).toBe(true); }); it('should infer Settings type correctly', () => { diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index 2d2fd01067..cc9e12f06f 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -1413,7 +1413,7 @@ const SETTINGS_SCHEMA = { requiresRestart: true, default: false, description: 'Automatically configure Node.js memory limits', - showInDialog: false, + showInDialog: true, }, dnsResolutionOrder: { type: 'string', diff --git a/packages/cli/src/utils/settingsUtils.test.ts b/packages/cli/src/utils/settingsUtils.test.ts index 51b1566968..75bdeb65e6 100644 --- a/packages/cli/src/utils/settingsUtils.test.ts +++ b/packages/cli/src/utils/settingsUtils.test.ts @@ -85,6 +85,17 @@ describe('SettingsUtils', () => { default: {}, description: 'Advanced settings for power users.', showInDialog: false, + properties: { + autoConfigureMemory: { + type: 'boolean', + label: 'Auto Configure Max Old Space Size', + category: 'Advanced', + requiresRestart: true, + default: false, + description: 'Automatically configure Node.js memory limits', + showInDialog: true, + }, + }, }, ui: { type: 'object', @@ -395,11 +406,15 @@ describe('SettingsUtils', () => { expect(uiKeys).not.toContain('ui.theme'); // This is now marked false }); - it('should not include Advanced category settings', () => { + it('should include Advanced category settings', () => { const categories = getDialogSettingsByCategory(); - // Advanced settings should be filtered out - expect(categories['Advanced']).toBeUndefined(); + // Advanced settings should now be included because of autoConfigureMemory + expect(categories['Advanced']).toBeDefined(); + const advancedSettings = categories['Advanced']; + expect(advancedSettings.map((s) => s.key)).toContain( + 'advanced.autoConfigureMemory', + ); }); it('should include settings with showInDialog=true', () => {