feat: Enhance dashboard with charts, study report viewer, and pruning tracking
- Add ConvergencePlot component with running best, statistics, gradient fill - Add ParameterImportanceChart with Pearson correlation analysis - Add StudyReportViewer with KaTeX math rendering and full markdown support - Update pruning endpoint to query Optuna database directly - Add /report endpoint for STUDY_REPORT.md files - Fix chart data transformation for single/multi-objective studies - Update Protocol 13 documentation with new components - Update generate-report skill with dashboard integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Protocol 13: Real-Time Dashboard Tracking
|
||||
|
||||
**Status**: ✅ COMPLETED
|
||||
**Date**: November 21, 2025
|
||||
**Status**: ✅ COMPLETED (Enhanced December 2025)
|
||||
**Date**: November 21, 2025 (Last Updated: December 3, 2025)
|
||||
**Priority**: P1 (Critical)
|
||||
|
||||
## Overview
|
||||
@@ -130,7 +130,39 @@ Stiffness Mass support_angle tip_thickness
|
||||
| ╱ ╲ |
|
||||
```
|
||||
|
||||
#### 4. Dashboard Integration
|
||||
#### 4. ConvergencePlot Component (NEW - December 2025)
|
||||
**File**: `atomizer-dashboard/frontend/src/components/ConvergencePlot.tsx`
|
||||
|
||||
**Features**:
|
||||
- Dual-line visualization: trial values + running best
|
||||
- Area fill gradient under trial curve
|
||||
- Statistics header: Best value, Improvement %, 90% convergence trial
|
||||
- Summary footer: First value, Mean, Std Dev, Total trials
|
||||
- Step-after interpolation for running best line
|
||||
- Reference line at best value
|
||||
|
||||
#### 5. ParameterImportanceChart Component (NEW - December 2025)
|
||||
**File**: `atomizer-dashboard/frontend/src/components/ParameterImportanceChart.tsx`
|
||||
|
||||
**Features**:
|
||||
- Pearson correlation between parameters and objectives
|
||||
- Horizontal bar chart sorted by absolute importance
|
||||
- Color coding: Green (negative correlation), Red (positive correlation)
|
||||
- Tooltip with percentage and raw correlation coefficient
|
||||
- Requires minimum 3 trials for statistical analysis
|
||||
|
||||
#### 6. StudyReportViewer Component (NEW - December 2025)
|
||||
**File**: `atomizer-dashboard/frontend/src/components/StudyReportViewer.tsx`
|
||||
|
||||
**Features**:
|
||||
- Full-screen modal for viewing STUDY_REPORT.md
|
||||
- KaTeX math equation rendering (`$...$` inline, `$$...$$` block)
|
||||
- GitHub-flavored markdown (tables, code blocks, task lists)
|
||||
- Custom dark theme styling for all markdown elements
|
||||
- Refresh button for live updates
|
||||
- External link to open in system editor
|
||||
|
||||
#### 7. Dashboard Integration
|
||||
**File**: `atomizer-dashboard/frontend/src/pages/Dashboard.tsx`
|
||||
|
||||
**Layout Structure**:
|
||||
@@ -292,6 +324,28 @@ npm run dev # Runs on port 3001
|
||||
- **Real-time writes**: <5ms per trial (JSON serialization)
|
||||
- **Dashboard load time**: <500ms initial render
|
||||
|
||||
## December 2025 Enhancements
|
||||
|
||||
### Completed
|
||||
- [x] **ConvergencePlot**: Enhanced with running best, statistics panel, gradient fill
|
||||
- [x] **ParameterImportanceChart**: Pearson correlation analysis with color-coded bars
|
||||
- [x] **StudyReportViewer**: Full markdown rendering with KaTeX math equation support
|
||||
- [x] **Pruning endpoint**: Now queries Optuna SQLite directly instead of JSON file
|
||||
- [x] **Report endpoint**: New `/studies/{id}/report` endpoint for STUDY_REPORT.md
|
||||
- [x] **Chart data fix**: Proper `values` array transformation for single/multi-objective
|
||||
|
||||
### API Endpoint Additions (December 2025)
|
||||
|
||||
4. **GET `/api/optimization/studies/{study_id}/pruning`** (Enhanced)
|
||||
- Now queries Optuna database directly for PRUNED trials
|
||||
- Returns params, timing, and pruning cause for each trial
|
||||
- Fallback to legacy JSON file if database unavailable
|
||||
|
||||
5. **GET `/api/optimization/studies/{study_id}/report`** (NEW)
|
||||
- Returns STUDY_REPORT.md content as JSON
|
||||
- Searches in 2_results/, 3_results/, and study root
|
||||
- Returns 404 if no report found
|
||||
|
||||
## Future Enhancements (P3)
|
||||
|
||||
- [ ] WebSocket support for instant updates (currently polling)
|
||||
@@ -300,7 +354,6 @@ npm run dev # Runs on port 3001
|
||||
- [ ] Strategy performance comparison charts
|
||||
- [ ] Historical phase duration analysis
|
||||
- [ ] Mobile-responsive design
|
||||
- [ ] Dark/light theme toggle
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user