mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
Add API error monitoring tests and error context snapshots for various browsers
- Created error context snapshots for Firefox, WebKit, and Chromium to capture UI state during API error monitoring. - Implemented e2e tests for API error detection, including console errors, failed API requests, and proxy errors. - Added functionality to ignore specific API patterns in monitoring assertions. - Ensured tests validate the monitoring system's ability to detect and report errors effectively.
This commit is contained in:
@@ -568,7 +568,7 @@ function sortTaskIds(a: string, b: string): number {
|
||||
* @param workflowDir - Path to .workflow directory
|
||||
* @returns Project overview data or null if not found
|
||||
*/
|
||||
function loadProjectOverview(workflowDir: string): ProjectOverview | null {
|
||||
export function loadProjectOverview(workflowDir: string): ProjectOverview | null {
|
||||
const techFile = join(workflowDir, 'project-tech.json');
|
||||
const guidelinesFile = join(workflowDir, 'project-guidelines.json');
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
*/
|
||||
import { getAllManifests } from '../manifest.js';
|
||||
import { listTools } from '../../tools/index.js';
|
||||
import { loadProjectOverview } from '../data-aggregator.js';
|
||||
import { resolvePath } from '../../utils/path-resolver.js';
|
||||
import { join } from 'path';
|
||||
import type { RouteContext } from './types.js';
|
||||
|
||||
/**
|
||||
@@ -13,6 +16,19 @@ import type { RouteContext } from './types.js';
|
||||
export async function handleCcwRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
const { pathname, url, req, res, initialPath, handlePostRequest, broadcastToClients } = ctx;
|
||||
|
||||
// API: Project Overview
|
||||
if (pathname === '/api/ccw' && req.method === 'GET') {
|
||||
const projectPath = url.searchParams.get('path') || initialPath;
|
||||
const resolvedPath = resolvePath(projectPath);
|
||||
const workflowDir = join(resolvedPath, '.workflow');
|
||||
|
||||
const projectOverview = loadProjectOverview(workflowDir);
|
||||
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ projectOverview }));
|
||||
return true;
|
||||
}
|
||||
|
||||
// API: CCW Installation Status
|
||||
if (pathname === '/api/ccw/installations') {
|
||||
const manifests = getAllManifests();
|
||||
|
||||
Reference in New Issue
Block a user