feat: Add dashboard chat integration and MCP server

Major changes:
- Dashboard: WebSocket-based chat with session management
- Dashboard: New chat components (ChatPane, ChatInput, ModeToggle)
- Dashboard: Enhanced UI with parallel coordinates chart
- MCP Server: New atomizer-tools server for Claude integration
- Extractors: Enhanced Zernike OPD extractor
- Reports: Improved report generator

New studies (configs and scripts only):
- M1 Mirror: Cost reduction campaign studies
- Simple Beam, Simple Bracket, UAV Arm studies

Note: Large iteration data (2_iterations/, best_design_archive/)
excluded via .gitignore - kept on local Gitea only.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-13 15:53:55 -05:00
parent 69c0d76b50
commit 73a7b9d9f1
1680 changed files with 144922 additions and 723 deletions

View File

@@ -0,0 +1,98 @@
---
active: true
iteration: 1
max_iterations: 0
completion_promise: null
started_at: "2026-01-08T15:17:56Z"
---
Execute docs/plans/DASHBOARD_CHAT_TASKS.md starting at Phase 1
## Progress Log
### Phase 1: MCP Server Foundation - COMPLETE
Created files:
- `mcp-server/atomizer-tools/package.json`
- `mcp-server/atomizer-tools/tsconfig.json`
- `mcp-server/atomizer-tools/src/index.ts`
- `mcp-server/atomizer-tools/src/utils/paths.ts`
- `mcp-server/atomizer-tools/src/tools/study.ts`
- `mcp-server/atomizer-tools/src/tools/optimization.ts`
- `mcp-server/atomizer-tools/src/tools/analysis.ts`
- `mcp-server/atomizer-tools/src/tools/reporting.ts`
- `mcp-server/atomizer-tools/src/tools/physics.ts`
- `mcp-server/atomizer-tools/src/tools/admin.ts`
Tools implemented:
- User Mode: list_studies, get_study_status, create_study, run_optimization, stop_optimization, get_optimization_status, get_trial_data, analyze_convergence, compare_trials, get_best_design, generate_report, export_data, explain_physics, recommend_method, query_extractors
- Power Mode: edit_file, create_file, create_extractor, run_shell_command, search_codebase
Config:
- `.mcp.json` created with atomizer-tools server
- `settings.local.json` updated with enableAllProjectMcpServers
Build status: SUCCESS (npm install + npm run build)
### Phase 2: Backend Session Manager - COMPLETE
Created files:
- `atomizer-dashboard/backend/api/services/conversation_store.py`
- `atomizer-dashboard/backend/api/services/context_builder.py`
- `atomizer-dashboard/backend/api/services/session_manager.py`
Updated files:
- `atomizer-dashboard/backend/api/routes/claude.py` - Added session endpoints
- `atomizer-dashboard/backend/api/main.py` - Added lifespan handler
### Phase 3: Frontend Updates - COMPLETE
Created files:
- `atomizer-dashboard/frontend/src/components/chat/ModeToggle.tsx`
- `atomizer-dashboard/frontend/src/components/chat/ToolCallCard.tsx`
Updated files:
- `atomizer-dashboard/frontend/src/hooks/useChat.ts` - Added WebSocket support, session management
- `atomizer-dashboard/frontend/src/components/chat/ChatMessage.tsx` - Added tool call rendering
- `atomizer-dashboard/frontend/src/components/chat/ChatPane.tsx` - Added mode toggle, connection status
- `atomizer-dashboard/frontend/src/components/chat/index.ts` - Export new components
### Phase 4: Integration Testing - NOTES
Frontend build has pre-existing TypeScript errors in:
- `src/components/charts/NivoParallelCoordinates.tsx` (missing @types)
- `src/components/dashboard/StatusBadge.tsx` (unused import)
- `src/components/tracker/OptimizerStatePanel.tsx` (unused import)
- `src/pages/Analysis.tsx` (unused variable)
- `src/pages/Home.tsx` (unused variables)
- `src/pages/Insights.tsx` (unused imports, type errors)
These are NOT related to new chat implementation - they existed before.
MCP Server: BUILD SUCCESSFUL
Backend: Python files created (needs runtime test)
Frontend: New components created (needs existing issues fixed for full build)
## Summary - Implementation Complete
**Phase 1**: MCP Server Foundation - COMPLETE
- 15 user-mode tools
- 5 power-mode tools
- Build successful
**Phase 2**: Backend Session Manager - COMPLETE
- ConversationStore (SQLite)
- ContextBuilder (prompts)
- SessionManager (subprocess)
- API routes updated
**Phase 3**: Frontend Updates - COMPLETE
- ModeToggle component
- ToolCallCard component
- useChat hook (WebSocket + sessions)
- ChatPane with mode toggle
**Next Steps**:
1. Fix pre-existing TypeScript errors in frontend
2. Runtime test backend with `uvicorn api.main:app`
3. Test WebSocket chat functionality

View File

@@ -21,25 +21,51 @@
"Bash(curl:*)",
"Read",
"Skill(dashboard:*)",
"Bash(C:Usersantoianaconda3envsatomizerpython.exe:*)",
"Bash(del \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V5\\\\3_results\\\\study.db\")",
"Bash(C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe -c:*)",
"Bash(C:Usersantoianaconda3envsatomizerpython.exe run_optimization.py --trials 1)",
"Bash(C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe -m py_compile:*)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver analyze \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\")",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_V12\")",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_V2\")",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_V11\")",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_V11\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V3\")",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V3\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V6\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V1\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_flat_back_V5\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction_V12\" --execute)",
"Bash(\"C:\\\\Users\\\\antoi\\\\anaconda3\\\\envs\\\\atomizer\\\\python.exe\" -m optimization_engine.utils.study_archiver cleanup \"C:\\\\Users\\\\antoi\\\\Atomizer\\\\studies\\\\M1_Mirror\\\\m1_mirror_cost_reduction\" --execute)"
"Bash(C:/Users/antoi/anaconda3/envs/atomizer/python.exe:*)",
"Bash(C:\\Users\\antoi\\anaconda3\\envs\\atomizer\\python.exe:*)",
"Bash(\"C:\\Users\\antoi\\anaconda3\\envs\\atomizer\\python.exe\":*)",
"Bash(ls:*)",
"Bash(mkdir:*)",
"Bash(timeout:*)",
"Bash(sqlite3:*)",
"Bash(bash:*)",
"Bash(sh:*)",
"Skill(ralph-wiggum:ralph-loop)",
"Skill(ralph-wiggum:ralph-loop:*)",
"Skill(ralph-wiggum:help)",
"Skill(ralph-wiggum:help:*)",
"Skill(study-builder)",
"Skill(study-builder:*)",
"Bash(cat:*)",
"Bash(du:*)",
"Bash(for file in docs/protocols/operations/OP_*.md)",
"Bash(do basename \"$file\")",
"Bash(done)",
"Bash(for file in docs/protocols/system/SYS_*.md)",
"Bash(for file in docs/protocols/extensions/EXT_*.md)",
"Bash(grep:*)",
"Bash(wc:*)",
"Bash(.claude/skills/00_BOOTSTRAP.md )",
"Bash(.claude/skills/00_BOOTSTRAP_V2.md )",
"Bash(.claude/skills/archive/00_BOOTSTRAP_V2.0_archived.md )",
"Bash(.claude/skills/01_CHEATSHEET.md )",
"Bash(.claude/skills/modules/OPTIMIZATION_ENGINE_MIGRATION_PLAN.md )",
"Bash(.claude/skills/modules/insights-catalog.md )",
"Bash(CLAUDE.md )",
"Bash(docs/06_PHYSICS/ )",
"Bash(docs/api/CONTEXT_ENGINEERING_API.md )",
"Bash(docs/protocols/ )",
"Bash(knowledge_base/playbook.json )",
"Bash(docs/plans/RESTRUCTURING_PLAN.md)",
"Bash(.claude/skills/archive/ )",
"Bash(C:Usersantoianaconda3envsatomizerpython.exe -m uvicorn:*)",
"Bash(xargs -I{} git ls-tree -r -l HEAD {})",
"Bash(sort:*)",
"Bash(C:Usersantoianaconda3envsatomizerpython.exe introspect_model.py)",
"Bash(xargs:*)"
],
"deny": [],
"ask": []
}
},
"enableAllProjectMcpServers": true
}