@akiojin/gwt 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.ja.md +4 -4
  2. package/README.md +4 -4
  3. package/dist/cli/ui/components/App.d.ts +4 -4
  4. package/dist/cli/ui/components/App.d.ts.map +1 -1
  5. package/dist/cli/ui/components/App.js +144 -105
  6. package/dist/cli/ui/components/App.js.map +1 -1
  7. package/dist/cli/ui/components/common/Confirm.d.ts +1 -1
  8. package/dist/cli/ui/components/common/Confirm.d.ts.map +1 -1
  9. package/dist/cli/ui/components/common/Confirm.js +7 -7
  10. package/dist/cli/ui/components/common/Confirm.js.map +1 -1
  11. package/dist/cli/ui/components/common/ErrorBoundary.d.ts +1 -1
  12. package/dist/cli/ui/components/common/ErrorBoundary.d.ts.map +1 -1
  13. package/dist/cli/ui/components/common/ErrorBoundary.js +4 -4
  14. package/dist/cli/ui/components/common/ErrorBoundary.js.map +1 -1
  15. package/dist/cli/ui/components/common/Input.d.ts +2 -2
  16. package/dist/cli/ui/components/common/Input.d.ts.map +1 -1
  17. package/dist/cli/ui/components/common/Input.js +4 -4
  18. package/dist/cli/ui/components/common/Input.js.map +1 -1
  19. package/dist/cli/ui/components/common/LoadingIndicator.d.ts +1 -1
  20. package/dist/cli/ui/components/common/LoadingIndicator.d.ts.map +1 -1
  21. package/dist/cli/ui/components/common/LoadingIndicator.js +4 -4
  22. package/dist/cli/ui/components/common/LoadingIndicator.js.map +1 -1
  23. package/dist/cli/ui/components/common/Select.d.ts +1 -1
  24. package/dist/cli/ui/components/common/Select.d.ts.map +1 -1
  25. package/dist/cli/ui/components/common/Select.js +11 -12
  26. package/dist/cli/ui/components/common/Select.js.map +1 -1
  27. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +2 -2
  28. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +1 -1
  29. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js +11 -11
  30. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +1 -1
  31. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +1 -1
  32. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +1 -1
  33. package/dist/cli/ui/components/screens/BranchCreatorScreen.js +39 -36
  34. package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +1 -1
  35. package/dist/cli/ui/components/screens/BranchListScreen.d.ts +3 -3
  36. package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -1
  37. package/dist/cli/ui/components/screens/BranchListScreen.js +55 -50
  38. package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
  39. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +2 -2
  40. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +1 -1
  41. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +25 -25
  42. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +1 -1
  43. package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +2 -2
  44. package/dist/cli/ui/components/screens/PRCleanupScreen.js +21 -21
  45. package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +1 -1
  46. package/dist/cli/ui/components/screens/SessionSelectorScreen.js +8 -8
  47. package/dist/cli/ui/components/screens/WorktreeManagerScreen.d.ts +1 -1
  48. package/dist/cli/ui/components/screens/WorktreeManagerScreen.js +8 -8
  49. package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +1 -1
  50. package/dist/cli/ui/screens/BranchActionSelectorScreen.js +7 -4
  51. package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +1 -1
  52. package/dist/cli/ui/types.d.ts.map +1 -1
  53. package/dist/client/assets/{index-V6hDu9KS.js → index-Difv1Hwu.js} +2 -2
  54. package/dist/client/index.html +1 -1
  55. package/dist/config/builtin-tools.d.ts +10 -2
  56. package/dist/config/builtin-tools.d.ts.map +1 -1
  57. package/dist/config/builtin-tools.js +40 -4
  58. package/dist/config/builtin-tools.js.map +1 -1
  59. package/dist/config/index.d.ts.map +1 -1
  60. package/dist/config/index.js.map +1 -1
  61. package/dist/config/tools.d.ts.map +1 -1
  62. package/dist/config/tools.js +4 -3
  63. package/dist/config/tools.js.map +1 -1
  64. package/dist/gemini.d.ts +12 -0
  65. package/dist/gemini.d.ts.map +1 -0
  66. package/dist/gemini.js +154 -0
  67. package/dist/gemini.js.map +1 -0
  68. package/dist/git.d.ts.map +1 -1
  69. package/dist/git.js.map +1 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +30 -0
  72. package/dist/index.js.map +1 -1
  73. package/dist/qwen.d.ts +12 -0
  74. package/dist/qwen.d.ts.map +1 -0
  75. package/dist/qwen.js +154 -0
  76. package/dist/qwen.js.map +1 -0
  77. package/dist/services/git.service.d.ts.map +1 -1
  78. package/dist/services/git.service.js.map +1 -1
  79. package/dist/web/client/src/components/BranchGraph.d.ts.map +1 -1
  80. package/dist/web/client/src/components/BranchGraph.js +1 -1
  81. package/dist/web/client/src/components/BranchGraph.js.map +1 -1
  82. package/dist/web/client/src/components/EnvEditor.d.ts.map +1 -1
  83. package/dist/web/client/src/components/EnvEditor.js +7 -4
  84. package/dist/web/client/src/components/EnvEditor.js.map +1 -1
  85. package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +1 -1
  86. package/dist/web/client/src/pages/BranchDetailPage.js +55 -18
  87. package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
  88. package/dist/web/client/src/pages/BranchListPage.d.ts.map +1 -1
  89. package/dist/web/client/src/pages/BranchListPage.js +10 -4
  90. package/dist/web/client/src/pages/BranchListPage.js.map +1 -1
  91. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -1
  92. package/dist/web/client/src/pages/ConfigManagementPage.js +4 -2
  93. package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -1
  94. package/package.json +2 -1
  95. package/src/cli/ui/__tests__/acceptance/navigation.acceptance.test.tsx +69 -50
  96. package/src/cli/ui/__tests__/components/App.protected-branch.test.tsx +67 -45
  97. package/src/cli/ui/__tests__/components/App.shortcuts.test.tsx +117 -75
  98. package/src/cli/ui/__tests__/components/App.test.tsx +45 -37
  99. package/src/cli/ui/__tests__/components/common/Confirm.test.tsx +35 -22
  100. package/src/cli/ui/__tests__/components/common/ErrorBoundary.test.tsx +22 -22
  101. package/src/cli/ui/__tests__/components/common/Input.test.tsx +29 -22
  102. package/src/cli/ui/__tests__/components/common/LoadingIndicator.test.tsx +40 -34
  103. package/src/cli/ui/__tests__/components/common/Select.memo.test.tsx +57 -66
  104. package/src/cli/ui/__tests__/components/common/Select.test.tsx +121 -91
  105. package/src/cli/ui/__tests__/components/parts/Footer.test.tsx +18 -16
  106. package/src/cli/ui/__tests__/components/parts/Header.test.tsx +13 -13
  107. package/src/cli/ui/__tests__/components/parts/ScrollableList.test.tsx +20 -20
  108. package/src/cli/ui/__tests__/components/parts/Stats.test.tsx +38 -26
  109. package/src/cli/ui/__tests__/components/screens/AIToolSelectorScreen.test.tsx +31 -31
  110. package/src/cli/ui/__tests__/components/screens/BranchCreatorScreen.test.tsx +73 -37
  111. package/src/cli/ui/__tests__/components/screens/BranchListScreen.test.tsx +261 -153
  112. package/src/cli/ui/__tests__/components/screens/ExecutionModeSelectorScreen.test.tsx +38 -32
  113. package/src/cli/ui/__tests__/components/screens/PRCleanupScreen.test.tsx +39 -39
  114. package/src/cli/ui/__tests__/components/screens/SessionSelectorScreen.test.tsx +49 -21
  115. package/src/cli/ui/__tests__/components/screens/WorktreeManagerScreen.test.tsx +52 -28
  116. package/src/cli/ui/__tests__/integration/edgeCases.test.tsx +84 -48
  117. package/src/cli/ui/__tests__/integration/navigation.test.tsx +111 -83
  118. package/src/cli/ui/__tests__/integration/realtimeUpdate.test.tsx +111 -108
  119. package/src/cli/ui/__tests__/performance/branchList.performance.test.tsx +50 -37
  120. package/src/cli/ui/__tests__/performance/useMemoOptimization.test.tsx +75 -76
  121. package/src/cli/ui/components/App.tsx +247 -150
  122. package/src/cli/ui/components/common/Confirm.tsx +13 -9
  123. package/src/cli/ui/components/common/ErrorBoundary.tsx +8 -5
  124. package/src/cli/ui/components/common/Input.tsx +12 -4
  125. package/src/cli/ui/components/common/LoadingIndicator.tsx +8 -5
  126. package/src/cli/ui/components/common/Select.tsx +28 -17
  127. package/src/cli/ui/components/parts/Header.test.tsx +5 -15
  128. package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +19 -13
  129. package/src/cli/ui/components/screens/BranchCreatorScreen.tsx +74 -54
  130. package/src/cli/ui/components/screens/BranchListScreen.tsx +92 -75
  131. package/src/cli/ui/components/screens/ExecutionModeSelectorScreen.tsx +35 -28
  132. package/src/cli/ui/components/screens/PRCleanupScreen.tsx +22 -22
  133. package/src/cli/ui/components/screens/SessionSelectorScreen.tsx +8 -8
  134. package/src/cli/ui/components/screens/WorktreeManagerScreen.tsx +8 -8
  135. package/src/cli/ui/screens/BranchActionSelectorScreen.tsx +9 -4
  136. package/src/cli/ui/types.ts +8 -1
  137. package/src/config/builtin-tools.ts +42 -4
  138. package/src/config/index.ts +2 -12
  139. package/src/config/tools.ts +16 -6
  140. package/src/gemini.ts +202 -0
  141. package/src/git.ts +2 -1
  142. package/src/index.ts +30 -0
  143. package/src/qwen.ts +208 -0
  144. package/src/services/git.service.ts +2 -1
  145. package/src/web/client/src/components/BranchGraph.tsx +3 -2
  146. package/src/web/client/src/components/EnvEditor.tsx +44 -11
  147. package/src/web/client/src/pages/BranchDetailPage.tsx +165 -54
  148. package/src/web/client/src/pages/BranchListPage.tsx +37 -13
  149. package/src/web/client/src/pages/ConfigManagementPage.tsx +28 -9
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @vitest-environment happy-dom
3
3
  */
4
- import { describe, it, expect, beforeEach, vi } from 'vitest';
5
- import { render } from '@testing-library/react';
6
- import React from 'react';
7
- import { WorktreeManagerScreen } from '../../../components/screens/WorktreeManagerScreen.js';
8
- import { Window } from 'happy-dom';
4
+ import { describe, it, expect, beforeEach, vi } from "vitest";
5
+ import { render } from "@testing-library/react";
6
+ import React from "react";
7
+ import { WorktreeManagerScreen } from "../../../components/screens/WorktreeManagerScreen.js";
8
+ import { Window } from "happy-dom";
9
9
 
10
- describe('WorktreeManagerScreen', () => {
10
+ describe("WorktreeManagerScreen", () => {
11
11
  beforeEach(() => {
12
12
  // Setup happy-dom
13
13
  const window = new Window();
@@ -17,69 +17,85 @@ describe('WorktreeManagerScreen', () => {
17
17
 
18
18
  const mockWorktrees = [
19
19
  {
20
- branch: 'feature/test-1',
21
- path: '/path/to/worktree-1',
20
+ branch: "feature/test-1",
21
+ path: "/path/to/worktree-1",
22
22
  isAccessible: true,
23
23
  },
24
24
  {
25
- branch: 'feature/test-2',
26
- path: '/path/to/worktree-2',
25
+ branch: "feature/test-2",
26
+ path: "/path/to/worktree-2",
27
27
  isAccessible: true,
28
28
  },
29
29
  ];
30
30
 
31
- it('should render header with title', () => {
31
+ it("should render header with title", () => {
32
32
  const onBack = vi.fn();
33
33
  const onSelect = vi.fn();
34
34
  const { getByText } = render(
35
- <WorktreeManagerScreen worktrees={mockWorktrees} onBack={onBack} onSelect={onSelect} />
35
+ <WorktreeManagerScreen
36
+ worktrees={mockWorktrees}
37
+ onBack={onBack}
38
+ onSelect={onSelect}
39
+ />,
36
40
  );
37
41
 
38
42
  expect(getByText(/Worktree Manager/i)).toBeDefined();
39
43
  });
40
44
 
41
- it('should render worktree list', () => {
45
+ it("should render worktree list", () => {
42
46
  const onBack = vi.fn();
43
47
  const onSelect = vi.fn();
44
48
  const { getByText } = render(
45
- <WorktreeManagerScreen worktrees={mockWorktrees} onBack={onBack} onSelect={onSelect} />
49
+ <WorktreeManagerScreen
50
+ worktrees={mockWorktrees}
51
+ onBack={onBack}
52
+ onSelect={onSelect}
53
+ />,
46
54
  );
47
55
 
48
56
  expect(getByText(/feature\/test-1/)).toBeDefined();
49
57
  expect(getByText(/feature\/test-2/)).toBeDefined();
50
58
  });
51
59
 
52
- it('should render footer with actions', () => {
60
+ it("should render footer with actions", () => {
53
61
  const onBack = vi.fn();
54
62
  const onSelect = vi.fn();
55
63
  const { getAllByText } = render(
56
- <WorktreeManagerScreen worktrees={mockWorktrees} onBack={onBack} onSelect={onSelect} />
64
+ <WorktreeManagerScreen
65
+ worktrees={mockWorktrees}
66
+ onBack={onBack}
67
+ onSelect={onSelect}
68
+ />,
57
69
  );
58
70
 
59
71
  expect(getAllByText(/enter/i).length).toBeGreaterThan(0);
60
72
  expect(getAllByText(/esc/i).length).toBeGreaterThan(0);
61
73
  });
62
74
 
63
- it('should handle empty worktree list', () => {
75
+ it("should handle empty worktree list", () => {
64
76
  const onBack = vi.fn();
65
77
  const onSelect = vi.fn();
66
78
  const { getByText } = render(
67
- <WorktreeManagerScreen worktrees={[]} onBack={onBack} onSelect={onSelect} />
79
+ <WorktreeManagerScreen
80
+ worktrees={[]}
81
+ onBack={onBack}
82
+ onSelect={onSelect}
83
+ />,
68
84
  );
69
85
 
70
86
  expect(getByText(/No worktrees found/i)).toBeDefined();
71
87
  });
72
88
 
73
- it('should display inaccessible worktrees differently', () => {
89
+ it("should display inaccessible worktrees differently", () => {
74
90
  const worktreesWithInaccessible = [
75
91
  {
76
- branch: 'feature/accessible',
77
- path: '/path/accessible',
92
+ branch: "feature/accessible",
93
+ path: "/path/accessible",
78
94
  isAccessible: true,
79
95
  },
80
96
  {
81
- branch: 'feature/inaccessible',
82
- path: '/path/inaccessible',
97
+ branch: "feature/inaccessible",
98
+ path: "/path/inaccessible",
83
99
  isAccessible: false,
84
100
  },
85
101
  ];
@@ -91,21 +107,25 @@ describe('WorktreeManagerScreen', () => {
91
107
  worktrees={worktreesWithInaccessible}
92
108
  onBack={onBack}
93
109
  onSelect={onSelect}
94
- />
110
+ />,
95
111
  );
96
112
 
97
113
  expect(getByText(/feature\/accessible/)).toBeDefined();
98
114
  expect(getByText(/feature\/inaccessible/)).toBeDefined();
99
115
  });
100
116
 
101
- it('should use terminal height for layout calculation', () => {
117
+ it("should use terminal height for layout calculation", () => {
102
118
  const originalRows = process.stdout.rows;
103
119
  process.stdout.rows = 30;
104
120
 
105
121
  const onBack = vi.fn();
106
122
  const onSelect = vi.fn();
107
123
  const { container } = render(
108
- <WorktreeManagerScreen worktrees={mockWorktrees} onBack={onBack} onSelect={onSelect} />
124
+ <WorktreeManagerScreen
125
+ worktrees={mockWorktrees}
126
+ onBack={onBack}
127
+ onSelect={onSelect}
128
+ />,
109
129
  );
110
130
 
111
131
  expect(container).toBeDefined();
@@ -113,11 +133,15 @@ describe('WorktreeManagerScreen', () => {
113
133
  process.stdout.rows = originalRows;
114
134
  });
115
135
 
116
- it('should display worktree count in stats', () => {
136
+ it("should display worktree count in stats", () => {
117
137
  const onBack = vi.fn();
118
138
  const onSelect = vi.fn();
119
139
  const { getByText, getAllByText } = render(
120
- <WorktreeManagerScreen worktrees={mockWorktrees} onBack={onBack} onSelect={onSelect} />
140
+ <WorktreeManagerScreen
141
+ worktrees={mockWorktrees}
142
+ onBack={onBack}
143
+ onSelect={onSelect}
144
+ />,
121
145
  );
122
146
 
123
147
  // Check for worktree count
@@ -2,20 +2,28 @@
2
2
  * @vitest-environment happy-dom
3
3
  * Edge case tests for UI components
4
4
  */
5
- import { describe, it, expect, beforeEach, afterEach, afterAll, vi } from 'vitest';
6
- import { render } from '@testing-library/react';
7
- import React from 'react';
8
- import { App } from '../../components/App.js';
9
- import { BranchListScreen } from '../../components/screens/BranchListScreen.js';
10
- import { Window } from 'happy-dom';
11
- import type { BranchInfo, BranchItem, Statistics } from '../../types.js';
12
- import * as useGitDataModule from '../../hooks/useGitData.js';
5
+ import {
6
+ describe,
7
+ it,
8
+ expect,
9
+ beforeEach,
10
+ afterEach,
11
+ afterAll,
12
+ vi,
13
+ } from "vitest";
14
+ import { render } from "@testing-library/react";
15
+ import React from "react";
16
+ import { App } from "../../components/App.js";
17
+ import { BranchListScreen } from "../../components/screens/BranchListScreen.js";
18
+ import { Window } from "happy-dom";
19
+ import type { BranchInfo, BranchItem, Statistics } from "../../types.js";
20
+ import * as useGitDataModule from "../../hooks/useGitData.js";
13
21
 
14
22
  const mockRefresh = vi.fn();
15
23
  const originalUseGitData = useGitDataModule.useGitData;
16
- const useGitDataSpy = vi.spyOn(useGitDataModule, 'useGitData');
24
+ const useGitDataSpy = vi.spyOn(useGitDataModule, "useGitData");
17
25
 
18
- describe('Edge Cases Integration Tests', () => {
26
+ describe("Edge Cases Integration Tests", () => {
19
27
  beforeEach(() => {
20
28
  // Setup happy-dom
21
29
  const window = new Window();
@@ -31,7 +39,7 @@ describe('Edge Cases Integration Tests', () => {
31
39
  /**
32
40
  * T091: Terminal size極小(10行以下)の動作確認
33
41
  */
34
- it('[T091] should handle minimal terminal size (10 rows)', () => {
42
+ it("[T091] should handle minimal terminal size (10 rows)", () => {
35
43
  // Save original rows
36
44
  const originalRows = process.stdout.rows;
37
45
 
@@ -39,9 +47,9 @@ describe('Edge Cases Integration Tests', () => {
39
47
  process.stdout.rows = 10;
40
48
 
41
49
  const mockBranches: BranchItem[] = [
42
- { name: 'main', label: 'main', value: 'main' },
43
- { name: 'feature/a', label: 'feature/a', value: 'feature/a' },
44
- { name: 'feature/b', label: 'feature/b', value: 'feature/b' },
50
+ { name: "main", label: "main", value: "main" },
51
+ { name: "feature/a", label: "feature/a", value: "feature/a" },
52
+ { name: "feature/b", label: "feature/b", value: "feature/b" },
45
53
  ];
46
54
 
47
55
  const mockStats: Statistics = {
@@ -54,7 +62,11 @@ describe('Edge Cases Integration Tests', () => {
54
62
 
55
63
  const onSelect = vi.fn();
56
64
  const { container } = render(
57
- <BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />
65
+ <BranchListScreen
66
+ branches={mockBranches}
67
+ stats={mockStats}
68
+ onSelect={onSelect}
69
+ />,
58
70
  );
59
71
 
60
72
  // Should render without crashing
@@ -64,12 +76,12 @@ describe('Edge Cases Integration Tests', () => {
64
76
  process.stdout.rows = originalRows;
65
77
  });
66
78
 
67
- it('[T091] should handle extremely small terminal (5 rows)', () => {
79
+ it("[T091] should handle extremely small terminal (5 rows)", () => {
68
80
  const originalRows = process.stdout.rows;
69
81
  process.stdout.rows = 5;
70
82
 
71
83
  const mockBranches: BranchItem[] = [
72
- { name: 'main', label: 'main', value: 'main' },
84
+ { name: "main", label: "main", value: "main" },
73
85
  ];
74
86
 
75
87
  const mockStats: Statistics = {
@@ -82,7 +94,11 @@ describe('Edge Cases Integration Tests', () => {
82
94
 
83
95
  const onSelect = vi.fn();
84
96
  const { getByText } = render(
85
- <BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />
97
+ <BranchListScreen
98
+ branches={mockBranches}
99
+ stats={mockStats}
100
+ onSelect={onSelect}
101
+ />,
86
102
  );
87
103
 
88
104
  // Header should still be visible
@@ -94,15 +110,15 @@ describe('Edge Cases Integration Tests', () => {
94
110
  /**
95
111
  * T092: 非常に長いブランチ名の表示確認
96
112
  */
97
- it('[T092] should handle very long branch names', () => {
113
+ it("[T092] should handle very long branch names", () => {
98
114
  const longBranchName =
99
- 'feature/very-long-branch-name-that-exceeds-normal-terminal-width-and-should-be-handled-gracefully';
115
+ "feature/very-long-branch-name-that-exceeds-normal-terminal-width-and-should-be-handled-gracefully";
100
116
 
101
117
  const mockBranches: BranchItem[] = [
102
118
  {
103
- name: 'main',
104
- label: 'main',
105
- value: 'main',
119
+ name: "main",
120
+ label: "main",
121
+ value: "main",
106
122
  latestCommitTimestamp: 1_700_000_000,
107
123
  },
108
124
  {
@@ -123,27 +139,33 @@ describe('Edge Cases Integration Tests', () => {
123
139
 
124
140
  const onSelect = vi.fn();
125
141
  const { container } = render(
126
- <BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />
142
+ <BranchListScreen
143
+ branches={mockBranches}
144
+ stats={mockStats}
145
+ onSelect={onSelect}
146
+ />,
127
147
  );
128
148
 
129
149
  // Long branch name should be displayed (Ink will handle wrapping/truncation)
130
150
  expect(container.textContent).toMatch(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}/);
131
151
  });
132
152
 
133
- it('[T092] should handle branch names with special characters', () => {
153
+ it("[T092] should handle branch names with special characters", () => {
134
154
  const specialBranchNames = [
135
- 'feature/bug-fix-#123',
136
- 'hotfix/issue@456',
137
- 'release/v1.0.0-beta.1',
138
- 'feature/改善-日本語',
155
+ "feature/bug-fix-#123",
156
+ "hotfix/issue@456",
157
+ "release/v1.0.0-beta.1",
158
+ "feature/改善-日本語",
139
159
  ];
140
160
 
141
- const mockBranches: BranchItem[] = specialBranchNames.map((name, index) => ({
142
- name,
143
- label: name,
144
- value: name,
145
- latestCommitTimestamp: 1_700_001_000 + index * 60,
146
- }));
161
+ const mockBranches: BranchItem[] = specialBranchNames.map(
162
+ (name, index) => ({
163
+ name,
164
+ label: name,
165
+ value: name,
166
+ latestCommitTimestamp: 1_700_001_000 + index * 60,
167
+ }),
168
+ );
147
169
 
148
170
  const mockStats: Statistics = {
149
171
  localCount: mockBranches.length,
@@ -155,7 +177,11 @@ describe('Edge Cases Integration Tests', () => {
155
177
 
156
178
  const onSelect = vi.fn();
157
179
  const { container } = render(
158
- <BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />
180
+ <BranchListScreen
181
+ branches={mockBranches}
182
+ stats={mockStats}
183
+ onSelect={onSelect}
184
+ />,
159
185
  );
160
186
 
161
187
  // All special branch names should be displayed
@@ -167,13 +193,13 @@ describe('Edge Cases Integration Tests', () => {
167
193
  /**
168
194
  * T093: Error Boundary動作確認
169
195
  */
170
- it('[T093] should catch errors in App component', async () => {
196
+ it("[T093] should catch errors in App component", async () => {
171
197
  // Mock useGitData to throw an error after initial render
172
198
  let callCount = 0;
173
199
  useGitDataSpy.mockImplementation(() => {
174
200
  callCount++;
175
201
  if (callCount > 1) {
176
- throw new Error('Simulated error');
202
+ throw new Error("Simulated error");
177
203
  }
178
204
  return {
179
205
  branches: [],
@@ -192,8 +218,8 @@ describe('Edge Cases Integration Tests', () => {
192
218
  expect(container).toBeDefined();
193
219
  });
194
220
 
195
- it('[T093] should display error message when data loading fails', () => {
196
- const testError = new Error('Test error: Failed to load Git data');
221
+ it("[T093] should display error message when data loading fails", () => {
222
+ const testError = new Error("Test error: Failed to load Git data");
197
223
  useGitDataSpy.mockReturnValue({
198
224
  branches: [],
199
225
  worktrees: [],
@@ -211,7 +237,7 @@ describe('Edge Cases Integration Tests', () => {
211
237
  expect(getByText(/Failed to load Git data/i)).toBeDefined();
212
238
  });
213
239
 
214
- it('[T093] should handle empty branches list gracefully', () => {
240
+ it("[T093] should handle empty branches list gracefully", () => {
215
241
  useGitDataSpy.mockReturnValue({
216
242
  branches: [],
217
243
  worktrees: [],
@@ -231,11 +257,11 @@ describe('Edge Cases Integration Tests', () => {
231
257
  /**
232
258
  * Additional edge cases
233
259
  */
234
- it('should handle large number of worktrees', () => {
260
+ it("should handle large number of worktrees", () => {
235
261
  const mockBranches: BranchInfo[] = Array.from({ length: 50 }, (_, i) => ({
236
262
  name: `feature/branch-${i}`,
237
- type: 'local' as const,
238
- branchType: 'feature' as const,
263
+ type: "local" as const,
264
+ branchType: "feature" as const,
239
265
  isCurrent: false,
240
266
  }));
241
267
 
@@ -259,14 +285,14 @@ describe('Edge Cases Integration Tests', () => {
259
285
  expect(container).toBeDefined();
260
286
  });
261
287
 
262
- it('should handle terminal resize gracefully', () => {
288
+ it("should handle terminal resize gracefully", () => {
263
289
  const originalRows = process.stdout.rows;
264
290
 
265
291
  // Start with normal size
266
292
  process.stdout.rows = 30;
267
293
 
268
294
  const mockBranches: BranchItem[] = [
269
- { name: 'main', label: 'main', value: 'main' },
295
+ { name: "main", label: "main", value: "main" },
270
296
  ];
271
297
 
272
298
  const mockStats: Statistics = {
@@ -279,7 +305,11 @@ describe('Edge Cases Integration Tests', () => {
279
305
 
280
306
  const onSelect = vi.fn();
281
307
  const { container, rerender } = render(
282
- <BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />
308
+ <BranchListScreen
309
+ branches={mockBranches}
310
+ stats={mockStats}
311
+ onSelect={onSelect}
312
+ />,
283
313
  );
284
314
 
285
315
  expect(container).toBeDefined();
@@ -288,7 +318,13 @@ describe('Edge Cases Integration Tests', () => {
288
318
  process.stdout.rows = 15;
289
319
 
290
320
  // Re-render
291
- rerender(<BranchListScreen branches={mockBranches} stats={mockStats} onSelect={onSelect} />);
321
+ rerender(
322
+ <BranchListScreen
323
+ branches={mockBranches}
324
+ stats={mockStats}
325
+ onSelect={onSelect}
326
+ />,
327
+ );
292
328
 
293
329
  expect(container).toBeDefined();
294
330