feat: Dashboard improvements and configuration updates

Dashboard:
- Enhanced terminal components (ClaudeTerminal, GlobalClaudeTerminal)
- Improved MarkdownRenderer for better documentation display
- Updated convergence plots (ConvergencePlot, PlotlyConvergencePlot)
- Refined Home, Analysis, Dashboard, Setup, Results pages
- Added StudyContext improvements
- Updated vite.config for better dev experience

Configuration:
- Updated CLAUDE.md with latest instructions
- Enhanced launch_dashboard.py
- Updated config.py settings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-20 13:47:05 -05:00
parent 1612991d0d
commit 7c700c4606
19 changed files with 478 additions and 173 deletions

View File

@@ -20,8 +20,13 @@ interface Trial {
trial_number: number;
values: number[];
state?: string;
constraint_satisfied?: boolean;
user_attrs?: Record<string, any>;
}
// Penalty threshold - objectives above this are considered failed/penalty trials
const PENALTY_THRESHOLD = 100000;
interface ConvergencePlotProps {
trials: Trial[];
objectiveIndex?: number;
@@ -38,9 +43,22 @@ export function ConvergencePlot({
const convergenceData = useMemo(() => {
if (!trials || trials.length === 0) return [];
// Sort by trial number
// Sort by trial number, filtering out failed/penalty trials
const sortedTrials = [...trials]
.filter(t => t.values && t.values.length > objectiveIndex && t.state !== 'FAIL')
.filter(t => {
// Must have valid values
if (!t.values || t.values.length <= objectiveIndex) return false;
// Filter out failed state
if (t.state === 'FAIL') return false;
// Filter out penalty values (e.g., 1000000 = solver failure)
const val = t.values[objectiveIndex];
if (val >= PENALTY_THRESHOLD) return false;
// Filter out constraint violations
if (t.constraint_satisfied === false) return false;
// Filter out pruned trials
if (t.user_attrs?.pruned === true || t.user_attrs?.fail_reason) return false;
return true;
})
.sort((a, b) => a.trial_number - b.trial_number);
if (sortedTrials.length === 0) return [];