🤖 refactor: organize IPC tests into namespace folders#2370
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47d8937d44
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review The dynamic import path in |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
6aa0f70 to
8f0d6a0
Compare
e3389ac to
3c42ec8
Compare
Move 44 flat IPC test files into 8 namespace subfolders: workspace/, streaming/, runtime/, terminal/, projects/, agents/, config/, providers/ Update all relative imports for moved files. Drop .integration suffix from system1BashCompaction filename. Normalize openai-web-search to openaiWebSearch.
Fix dynamic import path in sendMessage.basic.test.ts and update Windows smoke test paths in pr.yml to match new folder structure.
3c42ec8 to
8b56667
Compare
## Summary Reorganize 38 flat UI test files into semantic subfolders aligned with docs product areas. Phase 2 of the integration test restructuring (Phase 1 was IPC tests in #2370). ## Background All 38 UI tests lived in a flat `tests/ui/` directory with verbose filenames like `workspaceLifecycle.integration.test.ts`. Finding related tests required scanning every filename. The `.integration` suffix is redundant since being in `tests/` already means "integration test." ## Implementation Created 11 subfolders matching documentation product areas: | Folder | Files | Examples | |--------|-------|---------| | `workspaces/` | 6 | lifecycle, fork, draft, intermediateStatus | | `chat/` | 8 | sections, truncation, streamInterrupt, readMore | | `agents/` | 4 | picker, thinkingPolicy, creationSlashCommands | | `review/` | 3 | baseSelector, focus, refresh | | `tasks/` | 3 | applyGitPatchCommits, awaitVisualization | | `layout/` | 4 | leftSidebarResize, rightSidebar, fileTreeViewMode | | `compaction/` | 2 | compaction, contextExceeded | | `config/` | 2 | customModels, modelOneshot | | `git/` | 3 | initBanner, status, parseStatusOutput | | `gateway/` | 2 | sessionExpired, chatEventAggregator | | `runtime/` | 1 | docker | Shared helpers (`dom.ts`, `helpers.ts`, `harness/`, `renderReviewPanel.tsx`) remain at `tests/ui/` root to minimize import churn. All moves used `git mv` to preserve history. Relative imports updated (one level deeper: `./dom` → `../dom`, `../ipc/` → `../../ipc/`, etc.). ## Validation - 35/35 test suites pass (`TEST_INTEGRATION=1 bun x jest tests/ui`) - `make typecheck` clean - `make lint` clean - `make fmt-check` clean (2 files auto-formatted by `make fmt`) - No CI config changes needed (CI uses directory-level globs `tests/ui/`) Note: 3 `.test.tsx` files aren't discovered by Jest due to pre-existing `testMatch` pattern (`*.test.ts` only) — not caused by this change. --- _Generated with `mux` • Model: `anthropic:claude-opus-4-6` • Thinking: `xhigh` • Cost: `$14.99`_ <!-- mux-attribution: model=anthropic:claude-opus-4-6 thinking=xhigh costs=14.99 -->
Summary
Restructures 44 flat IPC test files into 8 namespace subfolders mirroring oRPC areas, making it easier to find related tests at a glance.
Background
All 46+ IPC tests lived in a single
tests/ipc/directory with no subfolders. Finding related tests required reading every filename. This is Phase 1 of the broader test restructuring plan.Implementation
Moved test files into namespace folders using
git mv:workspace/streaming/runtime/terminal/projects/agents/config/providers/Shared helpers (
setup.ts,helpers.ts,streamCollector.ts,orpcTestClient.ts,sendMessageTestHelpers.ts) stay attests/ipc/top level. Two misc tests (doubleRegister,windowTitle) also stay top-level.File renames in this commit:
openai-web-search.test.ts→providers/openaiWebSearch.test.tsinterruptStream.starting.test.ts→streaming/interrupt.test.tsresumeStream.test.ts→streaming/resume.test.tssystem1BashCompaction.matrix.integration.test.ts→streaming/system1BashCompaction.matrix.test.ts(dropped.integrationsuffix)createWorkspace/projectCreateetc. normalized toworkspace/create/projects/createstyleAll relative imports updated for the new depth (
./setup→../setup,../../src/→../../../src/, etc.).Validation
bun x jest tests/ipc --runInBandafter rebase: 47 suites, 0 failures (8 passed, 39 pending/skipped — the skipped ones requireTEST_INTEGRATION=1with real API keys, same as before)Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$5.82