diff --git a/src/main/codex-accounts/runtime-home-service.test.ts b/src/main/codex-accounts/runtime-home-service.test.ts index d820830af8c..ef3ccbfbde4 100644 --- a/src/main/codex-accounts/runtime-home-service.test.ts +++ b/src/main/codex-accounts/runtime-home-service.test.ts @@ -110,6 +110,7 @@ function createSettings(overrides: Partial = {}): GlobalSettings experimentalPet: false, experimentalActivity: true, experimentalWorktreeSymlinks: false, + terminalMacrosEnabled: false, terminalWindowsShell: 'powershell.exe', terminalWindowsPowerShellImplementation: 'powershell.exe', enableGitHubAttribution: true, diff --git a/src/main/codex-accounts/service.test.ts b/src/main/codex-accounts/service.test.ts index f59ff778b07..74dc3ebd2d8 100644 --- a/src/main/codex-accounts/service.test.ts +++ b/src/main/codex-accounts/service.test.ts @@ -103,6 +103,7 @@ function createSettings(overrides: Partial = {}): GlobalSettings experimentalPet: false, experimentalActivity: true, experimentalWorktreeSymlinks: false, + terminalMacrosEnabled: false, terminalWindowsShell: 'powershell.exe', terminalWindowsPowerShellImplementation: 'powershell.exe', enableGitHubAttribution: true, diff --git a/src/main/persistence.test.ts b/src/main/persistence.test.ts index b3f83758067..9785cf3c79b 100644 --- a/src/main/persistence.test.ts +++ b/src/main/persistence.test.ts @@ -224,6 +224,7 @@ describe('Store', () => { expect(settings.openInApplications).toEqual([]) expect(settings.experimentalActivity).toBe(false) expect(settings.experimentalActivityDefaultedOffForAllUsers).toBe(true) + expect(settings.terminalMacrosEnabled).toBe(false) expect(settings.floatingTerminalEnabled).toBe(true) expect(settings.floatingTerminalDefaultedForAllUsers).toBe(true) expect(settings.notifications.customSoundPath).toBeNull() diff --git a/src/renderer/src/components/settings/ExperimentalPane.tsx b/src/renderer/src/components/settings/ExperimentalPane.tsx index 6e8eefaa2ad..b02e25a89e0 100644 --- a/src/renderer/src/components/settings/ExperimentalPane.tsx +++ b/src/renderer/src/components/settings/ExperimentalPane.tsx @@ -156,19 +156,43 @@ export function ExperimentalPane({ description="Named terminal launch presets available from the new-tab menu." keywords={EXPERIMENTAL_SEARCH_ENTRY.terminalMacros.keywords} className="space-y-3 px-1 py-2" + id="terminal-macros" > -
- -

- Define named terminal launch presets that open a new tab, optionally create a split - right or down, and seed each pane with startup text. This remains experimental and - currently only appears in the tab-bar new-tab menu. -

+
+
+ +

+ Define named terminal launch presets that open a new tab, optionally create a split + right or down, and seed the new terminal with startup text. This remains + experimental and appears in the tab-bar new-tab menu only when enabled. +

+
+
- updateSettings({ terminalMacros })} - /> + {settings.terminalMacrosEnabled ? ( + updateSettings({ terminalMacros })} + /> + ) : null} ) : null} diff --git a/src/renderer/src/components/settings/TerminalMacrosSection.tsx b/src/renderer/src/components/settings/TerminalMacrosSection.tsx index c3b8d63c186..107c886e7f2 100644 --- a/src/renderer/src/components/settings/TerminalMacrosSection.tsx +++ b/src/renderer/src/components/settings/TerminalMacrosSection.tsx @@ -34,9 +34,7 @@ export function TerminalMacrosSection({ onChange }: TerminalMacrosSectionProps): React.JSX.Element { const [editor, setEditor] = useState(null) - const visibleMacros = macros.filter( - (macro) => macro.name.trim() || macro.command.trimEnd() || macro.splitCommand?.trimEnd() - ) + const visibleMacros = macros.filter((macro) => macro.name.trim() || macro.command.trimEnd()) const saveMacro = (next: TerminalMacro): void => { if (editor?.mode === 'edit') { @@ -83,7 +81,7 @@ export function TerminalMacrosSection({ {layoutLabel(macro.layout)}
- {macro.command || macro.splitCommand || 'Opens an idle shell'} + {macro.command || 'Opens an idle shell'}