diff --git a/src/renderer/src/lib/launch-worktree-background-terminals.ts b/src/renderer/src/lib/launch-worktree-background-terminals.ts index 354f91b9019..896da11f8e5 100644 --- a/src/renderer/src/lib/launch-worktree-background-terminals.ts +++ b/src/renderer/src/lib/launch-worktree-background-terminals.ts @@ -35,10 +35,9 @@ type BackgroundTerminalLaunch = { color?: string } -const SETUP_TAB_TITLE = translate( - 'auto.lib.launch.worktree.background.terminals.setupTitle', - 'Setup' -) +function getSetupTabTitle(): string { + return translate('auto.lib.launch.worktree.background.terminals.setupTitle', 'Setup') +} export type LaunchWorktreeBackgroundTerminalsArgs = { worktreeId: string @@ -211,7 +210,7 @@ async function addSetupSplit(args: { args.tab.primary, { leafId: setupLeafId, ptyId: setupPtyId }, args.direction, - SETUP_TAB_TITLE + getSetupTabTitle() ) ) registerBackgroundPaneBuffer(args.tab.tabId, setupLeafId, setupPtyId) @@ -286,7 +285,7 @@ export async function launchWorktreeBackgroundTerminals( worktree, connectionId, launch: { - title: SETUP_TAB_TITLE, + title: getSetupTabTitle(), command: buildSetupCommand(args.setup), env: args.setup.envVars } diff --git a/src/renderer/src/lib/worktree-creation-flow.test.ts b/src/renderer/src/lib/worktree-creation-flow.test.ts index ba86f99fd91..ae52215b644 100644 --- a/src/renderer/src/lib/worktree-creation-flow.test.ts +++ b/src/renderer/src/lib/worktree-creation-flow.test.ts @@ -235,7 +235,8 @@ describe('staged background worktree creation', () => { undefined, undefined, undefined, - undefined + undefined, + { activateCreatedTabs: false } ) expect(queueNewWorkspaceTerminalFocus).not.toHaveBeenCalled() expect(store.removePendingWorktreeCreation).toHaveBeenCalledWith('creation-1')