mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
744ea46425
🎉 Major Release: Phase 3 Dashboards & Visualization This release completes Phase 3 from the Unified GOAP Implementation Plan, delivering a production-ready real-time visualization system for agent observability and decision-making transparency. ## Key Achievements (10/12 actions complete - 83%) ### Grafana Dashboards (2,280 LOC) - Executive dashboard with quality trends and costs - Developer dashboard with trace explorer and logs - QA dashboard with test metrics and coverage ### Backend Visualization API (2,004 LOC) - REST API with 6 endpoints for historical data - WebSocket server for real-time streaming (587 LOC) - Data transformer for graph visualization (556 LOC) ### Interactive React Frontend (12,969 LOC) - MindMap Component (Cytoscape.js): 6 layout algorithms, 1000+ nodes - QualityMetrics Panel (Recharts): 7-dimension radar chart, trends - Timeline View (react-window): Virtual scrolling for 1000+ events - Detail Panel: Drill-down functionality ### Infrastructure - React 18.3.1 + TypeScript 5.8.3 + Vite 6.4.1 - React Query 5.90.10 for data fetching - WebSocket client with reconnection logic - Complete type definitions (306 lines) ### Comprehensive Tests (3,681 LOC) - Integration tests (14/14 passing) - Component unit tests (22 files) - Performance tests for MindMap - Test-to-code ratio: 17% ## Performance Results (9/9 criteria PASSED) Backend: - ✅ 185.84 events/sec write (186% of target) - ✅ <1ms query latency (99% better than target) - ✅ 10-50ms WebSocket lag (95% better than target) Frontend: - ✅ <100ms render (100 nodes) - ✅ <500ms render (1000 nodes) - ✅ 0 TypeScript errors - ✅ 6.38s build time ## Documentation (8,161 LOC) - PHASE3-COMPLETE.md - Quick start guide - Phase 3 completion reports and reviews - Frontend architecture and testing guides - Component implementation documentation ## Services Running - Backend WebSocket: ws://localhost:8080 - Backend REST API: http://localhost:3001 - Frontend: http://localhost:3000 - Database: ./data/agentic-qe.db (1040+ events) ## Grade: B (83/100) - Production Ready ## Deferred to Phase 4 or v1.9.1 - OTEL Collector integration (#71) - Prometheus/Jaeger deployment (#71) - Test coverage metrics (#71) - Bundle code-splitting (#71) ## References - Issue #63 - Phase 3: Dashboards & Visualization (CLOSED) - Issue #69 - Phase 4: Integration & Orchestration - Issue #70 - Phase 5: Production Readiness - Issue #71 - Phase 3 Remaining Work Total Phase 3 Code: 21,434 LOC Total Documentation: 8,161 LOC Files Changed: 137 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
239 lines
5.1 KiB
Markdown
239 lines
5.1 KiB
Markdown
# MindMap Quick Start Guide
|
|
|
|
## Installation
|
|
|
|
The MindMap component is already included in the Phase 3 frontend. No additional installation required.
|
|
|
|
## Basic Usage
|
|
|
|
### 1. Import the Component
|
|
|
|
```typescript
|
|
import { MindMap } from '@/components/MindMap';
|
|
import { WebSocketProvider } from '@/contexts/WebSocketContext';
|
|
```
|
|
|
|
### 2. Add to Your Page
|
|
|
|
```typescript
|
|
function DashboardPage() {
|
|
return (
|
|
<WebSocketProvider>
|
|
<div className="h-screen">
|
|
<MindMap sessionId="my-session" />
|
|
</div>
|
|
</WebSocketProvider>
|
|
);
|
|
}
|
|
```
|
|
|
|
### 3. Start the Backend Services
|
|
|
|
```bash
|
|
# Terminal 1: Start REST API server
|
|
cd /workspaces/agentic-qe-cf
|
|
npm run start:express
|
|
|
|
# Terminal 2: Start WebSocket server
|
|
npm run start:websocket
|
|
|
|
# Terminal 3: Start frontend
|
|
cd frontend
|
|
npm run dev
|
|
```
|
|
|
|
### 4. Open the Application
|
|
|
|
Navigate to `http://localhost:5173`
|
|
|
|
## Quick Controls
|
|
|
|
### Layout Algorithms
|
|
- **Hierarchical**: Tree structure, top-down
|
|
- **Circular**: Nodes in a circle
|
|
- **Force**: Physics-based layout
|
|
- **COSE**: Optimized for large graphs (default)
|
|
|
|
### View Controls
|
|
- **Eye Icon**: Toggle node labels
|
|
- **E on/off**: Toggle edge labels
|
|
- **Zoom +/-**: Zoom in/out
|
|
- **Maximize**: Fit to screen
|
|
|
|
### Export
|
|
- **PNG**: Export as image
|
|
- **JSON**: Export graph data
|
|
|
|
## Filtering
|
|
|
|
### By Agent Type
|
|
Click agent type buttons to filter:
|
|
- coordinator
|
|
- researcher
|
|
- coder
|
|
- tester
|
|
- reviewer
|
|
- analyzer
|
|
|
|
### By Status
|
|
Click status buttons to filter:
|
|
- idle
|
|
- running
|
|
- completed
|
|
- error
|
|
|
|
### Search
|
|
Type in the search box to find nodes by name or ID.
|
|
|
|
## Interactions
|
|
|
|
### Select a Node
|
|
Click on any node to select it and view details in the side panel.
|
|
|
|
### Expand/Collapse
|
|
Double-click a node to expand or collapse its connections.
|
|
|
|
### Zoom and Pan
|
|
- Mouse wheel: Zoom
|
|
- Click and drag: Pan
|
|
- Pinch (touch): Zoom
|
|
|
|
## Performance Tips
|
|
|
|
### For Small Graphs (<100 nodes)
|
|
- Use any layout algorithm
|
|
- Keep all labels visible
|
|
- Enable animations
|
|
|
|
### For Medium Graphs (100-500 nodes)
|
|
- Use COSE or Hierarchical layout
|
|
- Keep node labels, hide edge labels
|
|
- Reduce animation duration
|
|
|
|
### For Large Graphs (500-1000+ nodes)
|
|
- Use COSE layout
|
|
- Hide edge labels
|
|
- Use filtering to show subsets
|
|
- Disable animations
|
|
|
|
## Common Scenarios
|
|
|
|
### Scenario 1: Monitor Agent Coordination
|
|
1. Start with COSE layout
|
|
2. Filter by status: "running"
|
|
3. Watch real-time updates via WebSocket
|
|
|
|
### Scenario 2: Debug Agent Relationships
|
|
1. Search for specific agent
|
|
2. Double-click to expand connections
|
|
3. Switch to Hierarchical layout
|
|
|
|
### Scenario 3: Export for Documentation
|
|
1. Fit to screen
|
|
2. Adjust labels as needed
|
|
3. Export as PNG
|
|
4. Include in reports
|
|
|
|
### Scenario 4: Analyze Performance
|
|
1. Load historical session
|
|
2. Filter by agent type
|
|
3. Export JSON for analysis
|
|
|
|
## Integration Examples
|
|
|
|
### With Custom Session Data
|
|
```typescript
|
|
const [sessionId, setSessionId] = useState('default');
|
|
|
|
return (
|
|
<div>
|
|
<select onChange={(e) => setSessionId(e.target.value)}>
|
|
<option value="session-1">Session 1</option>
|
|
<option value="session-2">Session 2</option>
|
|
</select>
|
|
<MindMap sessionId={sessionId} />
|
|
</div>
|
|
);
|
|
```
|
|
|
|
### With State Management
|
|
```typescript
|
|
const [selectedNode, setSelectedNode] = useState<string | null>(null);
|
|
const { setSelectedNode: setWsSelectedNode } = useWebSocket();
|
|
|
|
useEffect(() => {
|
|
if (selectedNode) {
|
|
setWsSelectedNode(selectedNode);
|
|
}
|
|
}, [selectedNode, setWsSelectedNode]);
|
|
|
|
return <MindMap sessionId="my-session" />;
|
|
```
|
|
|
|
### With Detail Panel
|
|
```typescript
|
|
import { MindMap } from '@/components/MindMap';
|
|
import { DetailPanel } from '@/components/DetailPanel';
|
|
import { useWebSocket } from '@/contexts/WebSocketContext';
|
|
|
|
function GraphView() {
|
|
const { selectedNode } = useWebSocket();
|
|
|
|
return (
|
|
<div className="flex h-screen">
|
|
<div className="flex-1">
|
|
<MindMap sessionId="current" />
|
|
</div>
|
|
{selectedNode && (
|
|
<div className="w-96 border-l">
|
|
<DetailPanel nodeId={selectedNode} />
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Problem: Graph not loading
|
|
**Solution**: Check that backend services are running:
|
|
```bash
|
|
curl http://localhost:3000/api/health
|
|
curl http://localhost:3001/health
|
|
```
|
|
|
|
### Problem: WebSocket not connecting
|
|
**Solution**: Verify WebSocket server is running on port 3001:
|
|
```bash
|
|
npm run start:websocket
|
|
```
|
|
|
|
### Problem: Slow performance
|
|
**Solutions**:
|
|
1. Reduce visible nodes with filtering
|
|
2. Switch to COSE layout
|
|
3. Hide edge labels
|
|
4. Use search to find specific nodes
|
|
|
|
### Problem: Layout looks messy
|
|
**Solutions**:
|
|
1. Try different layout algorithms
|
|
2. Use "Fit to Screen" button
|
|
3. Manually zoom and pan
|
|
4. Filter to reduce node count
|
|
|
|
## Next Steps
|
|
|
|
- Read the full [MindMap Implementation Guide](./MindMap-Implementation.md)
|
|
- Check out [Performance Testing](./MindMap-Performance.md)
|
|
- Learn about [WebSocket Integration](../../docs/websocket-server-implementation.md)
|
|
- Explore [Visualization API](../../docs/phase3/visualization-api-spec.md)
|
|
|
|
## Support
|
|
|
|
For issues or questions:
|
|
1. Check the [documentation](./MindMap-Implementation.md)
|
|
2. Review [common issues](./MindMap-Implementation.md#troubleshooting)
|
|
3. Open an issue on GitHub
|