Explorar el Código

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

Michael Henke hace 1 mes
padre
commit
1dd39f3d79
Se han modificado 2 ficheros con 2 adiciones y 6 borrados
  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')) {
       if (command.includes('new-pane')) {
         return createSpawnResult(0, 'terminal_8\n');
         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')) {
       if (command.includes('new-pane')) {
         return createSpawnResult(0, 'terminal_8\n');
         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;
           this.firstPaneUsed = true;
           return { success: true, paneId: this.firstPaneId };
           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
         // fall through to createPaneInAgentTab on failure
       }
       }