Skip to content

Commit cf56679

Browse files
aidandaly24claude
andcommitted
refactor: consolidate TUI harness into src/tui-harness/
Move harness code from two separate directories (src/test-utils/tui-harness/ and src/mcp-harness/) into a single src/tui-harness/ directory with lib/ and mcp/ subdirectories. Also cleans up dead code in tools.ts, derives SpecialKey type from SPECIAL_KEY_VALUES array (single source of truth), and fixes cross-boundary import of createMinimalProjectDir. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 67a9502 commit cf56679

17 files changed

Lines changed: 277 additions & 409 deletions

File tree

esbuild.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ console.log('CLI build complete: dist/cli/index.mjs');
6363

6464
// MCP harness build — only run if the entry point source exists.
6565
// The source file is created separately; skip gracefully until then.
66-
const mcpEntryPoint = './src/mcp-harness/index.ts';
66+
const mcpEntryPoint = './src/tui-harness/mcp/index.ts';
6767

6868
if (fs.existsSync(mcpEntryPoint)) {
6969
await esbuild.build({

integ-tests/tui/helpers.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Re-exports test helpers from the canonical location in src/.
3+
*
4+
* The canonical implementation of createMinimalProjectDir lives in
5+
* src/tui-harness/helpers.ts. This file re-exports it so
6+
* that integ-tests/tui/ test files can import from a local path
7+
* (`./helpers.js`) without reaching into src/.
8+
*/
9+
10+
export { createMinimalProjectDir } from '../../src/tui-harness/helpers.js';
11+
12+
export type { CreateMinimalProjectDirOptions, MinimalProjectDirResult } from '../../src/tui-harness/helpers.js';

src/mcp-harness/tools.ts

Lines changed: 0 additions & 341 deletions
This file was deleted.

src/test-utils/tui-harness/index.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)