Skip to content

🤖 refactor: organize UI tests into product-area subfolders#2389

Merged
ammario merged 1 commit intomainfrom
tests-rakp
Feb 12, 2026
Merged

🤖 refactor: organize UI tests into product-area subfolders#2389
ammario merged 1 commit intomainfrom
tests-rakp

Conversation

@ammar-agent
Copy link
Collaborator

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

Move 38 flat UI test files into semantic subfolders aligned with docs
product areas: workspaces, compaction, agents, chat, review, tasks,
config, layout, git, runtime, gateway.

- Drop redundant .integration suffix from all filenames
- Normalize verbose prefixes (e.g., workspaceLifecycle → workspaces/lifecycle)
- Update all relative imports (files moved one level deeper)
- Shared helpers (dom.ts, helpers.ts, harness/, renderReviewPanel.tsx) stay at tests/ui/ root

No production code changes. All 35 test suites pass.
@ammario ammario merged commit 1a01c94 into main Feb 12, 2026
22 checks passed
@ammario ammario deleted the tests-rakp branch February 12, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants