Browse Source

fix(zellij): reset firstPaneUsed on reuse failure and drop dead test mocks

Michael Henke 4 weeks ago
parent
commit
1dd39f3d79
2 changed files with 2 additions and 6 deletions
  1. 0 6
      src/multiplexer/zellij/index.test.ts
  2. 2 0
      src/multiplexer/zellij/index.ts

+ 0 - 6
src/multiplexer/zellij/index.test.ts

@@ -466,9 +466,6 @@ describe('ZellijMultiplexer', () => {
           ]),
         );
       }
-      if (command.includes('list-panes')) {
-        return createSpawnResult(0, 'PANE ID\nterminal_7\n');
-      }
       if (command.includes('new-pane')) {
         return createSpawnResult(0, 'terminal_8\n');
       }
@@ -522,9 +519,6 @@ describe('ZellijMultiplexer', () => {
           ]),
         );
       }
-      if (command.includes('list-panes')) {
-        return createSpawnResult(0, 'PANE ID\nterminal_7\n');
-      }
       if (command.includes('new-pane')) {
         return createSpawnResult(0, 'terminal_8\n');
       }

+ 2 - 0
src/multiplexer/zellij/index.ts

@@ -115,6 +115,8 @@ export class ZellijMultiplexer implements Multiplexer {
           this.firstPaneUsed = true;
           return { success: true, paneId: this.firstPaneId };
         }
+        // Reuse failed — don't keep retrying a known-bad pane
+        this.firstPaneUsed = true;
         // fall through to createPaneInAgentTab on failure
       }