From 72fa2c7e6518affdb24fd4ded4c6ebabb8409053 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 17 Feb 2026 04:10:35 +0900 Subject: [PATCH] fix(tmux): stop layout override after spawn, use configured main pane size Remove applyLayout(select-layout main-vertical) call after spawn which was destroying grid arrangements by forcing vertical stacking. Now only enforceMainPaneWidth is called, preserving the grid created by manual split directions. Also fix enforceMainPaneWidth to use config's main_pane_size percentage instead of hardcoded 50%. --- src/features/tmux-subagent/action-executor-core.ts | 1 - src/features/tmux-subagent/action-executor.test.ts | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/features/tmux-subagent/action-executor-core.ts b/src/features/tmux-subagent/action-executor-core.ts index 466cbe957..70a8f463e 100644 --- a/src/features/tmux-subagent/action-executor-core.ts +++ b/src/features/tmux-subagent/action-executor-core.ts @@ -72,7 +72,6 @@ export async function executeActionWithDeps( ) if (result.success) { - await deps.applyLayout(ctx.config.layout, ctx.config.main_pane_size) await enforceMainPane(ctx.windowState, ctx.config, deps) } diff --git a/src/features/tmux-subagent/action-executor.test.ts b/src/features/tmux-subagent/action-executor.test.ts index f5ab3d746..18e24b44b 100644 --- a/src/features/tmux-subagent/action-executor.test.ts +++ b/src/features/tmux-subagent/action-executor.test.ts @@ -66,7 +66,7 @@ describe("executeAction", () => { mockSpawnTmuxPane.mockImplementation(async () => ({ success: true, paneId: "%7" })) }) - test("applies configured tmux layout after successful spawn", async () => { + test("enforces main pane width with configured percentage after successful spawn", async () => { // given // when const result = await executeActionWithDeps( @@ -83,8 +83,7 @@ describe("executeAction", () => { // then expect(result).toEqual({ success: true, paneId: "%7" }) - expect(mockApplyLayout).toHaveBeenCalledTimes(1) - expect(mockApplyLayout).toHaveBeenCalledWith("main-horizontal", 55) + expect(mockApplyLayout).not.toHaveBeenCalled() expect(mockEnforceMainPaneWidth).toHaveBeenCalledTimes(1) expect(mockEnforceMainPaneWidth).toHaveBeenCalledWith("%0", 220, 55) })