mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-15 02:42:45 +08:00
feat: remove old vanilla JS/CSS frontend, make React SPA the sole entry for ccw view
Remove the entire old template-based frontend (~106K lines) and make the React SPA the only way to access the ccw dashboard via `ccw view`. Key changes: - Delete all old frontend files: dashboard-css/ (37 CSS), dashboard-js/ (59 JS), assets/, dashboard.html, and legacy HTML templates - Delete dashboard-generator.ts and dashboard-generator-patch.ts - Simplify server.ts: remove ~234 lines of old frontend code (template constants, MODULE_CSS_FILES/MODULE_FILES arrays, generateServerDashboard(), /assets/* serving) - Rebase React frontend from /react/ to root / (vite.config.ts, react-frontend.ts) - Add /react/* -> /* 301 redirect for backward compatibility - Remove --frontend and --new CLI flags from view and serve commands - Remove generateDashboard export from public API (index.ts) - Simplify serve.ts and view.ts to always use React without conditional branching - Update all affected tests (unit, e2e) for React-only architecture BREAKING CHANGE: --frontend and --new CLI flags removed; generateDashboard export removed from ccw package; /react/ base path changed to /
This commit is contained in:
@@ -9,7 +9,7 @@ import { setupEnhancedMonitoring } from './helpers/i18n-helpers';
|
||||
test.describe('[Commands] - Commands Management Tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Navigate to commands page directly and wait for full load
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
});
|
||||
|
||||
test('L3.1 - should display commands list', async ({ page }) => {
|
||||
@@ -108,7 +108,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for command items
|
||||
const commandItems = page.getByTestId(/command-item|command-card/).or(
|
||||
@@ -141,7 +141,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for command items
|
||||
const commandItems = page.getByTestId(/command-item|command-card/).or(
|
||||
@@ -174,7 +174,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for command items
|
||||
const commandItems = page.getByTestId(/command-item|command-card/).or(
|
||||
@@ -207,7 +207,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for category filter
|
||||
const categoryFilter = page.getByRole('combobox', { name: /category|filter/i }).or(
|
||||
@@ -242,7 +242,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for search input
|
||||
const searchInput = page.getByRole('textbox', { name: /search|find/i }).or(
|
||||
@@ -278,7 +278,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for command items
|
||||
const commandItems = page.getByTestId(/command-item|command-card/).or(
|
||||
@@ -311,7 +311,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
const monitoring = setupEnhancedMonitoring(page);
|
||||
|
||||
// Navigate to commands page
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Look for command items
|
||||
const commandItems = page.getByTestId(/command-item|command-card/).or(
|
||||
@@ -362,7 +362,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
});
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Debug: Check if page loaded
|
||||
const url = page.url();
|
||||
@@ -405,7 +405,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
// Use domcontentloaded instead of networkidle to avoid hanging on failed requests
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Wait for React Query to complete retries and set error state
|
||||
await page.waitForTimeout(3000);
|
||||
@@ -449,7 +449,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
// Use domcontentloaded instead of networkidle to avoid hanging on failed requests
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Wait for React Query to complete retries and set error state
|
||||
await page.waitForTimeout(3000);
|
||||
@@ -478,7 +478,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
// Use domcontentloaded instead of networkidle to avoid hanging on failed requests
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Wait for React Query to complete retries and set error state
|
||||
await page.waitForTimeout(3000);
|
||||
@@ -507,7 +507,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
// Use domcontentloaded instead of networkidle to avoid hanging on failed requests
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Wait for React Query to complete retries and set error state
|
||||
await page.waitForTimeout(3000);
|
||||
@@ -532,7 +532,7 @@ test.describe('[Commands] - Commands Management Tests', () => {
|
||||
|
||||
// Navigate AFTER mock is set up
|
||||
// Use domcontentloaded instead of networkidle to avoid hanging on failed requests
|
||||
await page.goto('/react/commands', { waitUntil: 'networkidle' as const });
|
||||
await page.goto('/commands', { waitUntil: 'networkidle' as const });
|
||||
|
||||
// Wait for timeout handling
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
Reference in New Issue
Block a user