Browse Source

style(herdr): biome format fixes for main-vertical implementation

Michael Henke 1 month ago
parent
commit
971d1af103
2 changed files with 85 additions and 23 deletions
  1. 84 18
      src/multiplexer/herdr/index.test.ts
  2. 1 5
      src/multiplexer/herdr/index.ts

+ 84 - 18
src/multiplexer/herdr/index.test.ts

@@ -415,12 +415,26 @@ describe('HerdrMultiplexer', () => {
 
     const splitCommands = commands().filter((c) => c.includes('split'));
     expect(splitCommands[0]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'right', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'right',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
     expect(splitCommands[1]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'right', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'right',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
   });
 
@@ -433,12 +447,26 @@ describe('HerdrMultiplexer', () => {
 
     const splitCommands = commands().filter((c) => c.includes('split'));
     expect(splitCommands[0]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'down', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'down',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
     expect(splitCommands[1]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'down', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'down',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
   });
 
@@ -486,12 +514,26 @@ describe('HerdrMultiplexer', () => {
 
     const splitCommands = commands().filter((c) => c.includes('split'));
     expect(splitCommands[0]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'right', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'right',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
     expect(splitCommands[1]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p2',
-      '--direction', 'down', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p2',
+      '--direction',
+      'down',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
   });
 
@@ -505,8 +547,15 @@ describe('HerdrMultiplexer', () => {
 
     const splitCommands = commands().filter((c) => c.includes('split'));
     expect(splitCommands[2]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p2',
-      '--direction', 'down', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p2',
+      '--direction',
+      'down',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
   });
 
@@ -514,7 +563,12 @@ describe('HerdrMultiplexer', () => {
     const { HerdrMultiplexer } = await importFreshHerdr();
     const herdr = new HerdrMultiplexer('main-vertical', 60);
 
-    const r1 = await herdr.spawnPane('s1', 'A1', 'http://localhost:4096', '/repo');
+    const r1 = await herdr.spawnPane(
+      's1',
+      'A1',
+      'http://localhost:4096',
+      '/repo',
+    );
     // Simulate agent area pane being closed externally
     await herdr.closePane(r1.paneId!);
 
@@ -526,8 +580,15 @@ describe('HerdrMultiplexer', () => {
     expect(splitCommands[0]).toContain('w1:p1');
     // 2nd (after close): parent → right again (w1:p1), not w1:p2
     expect(splitCommands[1]).toEqual([
-      '/usr/bin/herdr', 'pane', 'split', 'w1:p1',
-      '--direction', 'right', '--cwd', '/repo', '--no-focus',
+      '/usr/bin/herdr',
+      'pane',
+      'split',
+      'w1:p1',
+      '--direction',
+      'right',
+      '--cwd',
+      '/repo',
+      '--no-focus',
     ]);
   });
 
@@ -535,7 +596,12 @@ describe('HerdrMultiplexer', () => {
     const { HerdrMultiplexer } = await importFreshHerdr();
     const herdr = new HerdrMultiplexer('main-vertical', 60);
 
-    const r1 = await herdr.spawnPane('s1', 'A1', 'http://localhost:4096', '/repo');
+    const r1 = await herdr.spawnPane(
+      's1',
+      'A1',
+      'http://localhost:4096',
+      '/repo',
+    );
     await herdr.closePane(r1.paneId!);
 
     // @ts-expect-error - accessing private for test

+ 1 - 5
src/multiplexer/herdr/index.ts

@@ -82,11 +82,7 @@ export class HerdrMultiplexer implements Multiplexer {
       if (this.layout === 'main-vertical' && this.agentAreaPaneId) {
         target = [this.agentAreaPaneId];
         direction = 'down';
-        const agentSplit = await this.runSplit(
-          target,
-          direction,
-          directory,
-        );
+        const agentSplit = await this.runSplit(target, direction, directory);
         if (!agentSplit) {
           log('[herdr] agent area split failed, falling back to parent', {
             agentAreaPaneId: this.agentAreaPaneId,