Bug Fixes: - Fix Atomizer Assistant error with reconnect button and error state handling - Enable connection/edge deletion with keyboard Delete/Backspace keys - Fix drag & drop positioning using screenToFlowPosition correctly - Fix loadFromConfig to create all node types and edges properly UI/UX Improvements: - Minimal responsive header with context breadcrumb - Better contrast with white text on dark backgrounds - Larger font sizes in NodePalette for readability - Study-aware header showing selected study name New Features: - Enhanced ExecuteDialog with Create/Update mode toggle - Select existing study to update or create new study - Home page Canvas Builder button for quick access - Home navigation button in CanvasView header Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Atomizer Canvas - Visual Optimization Workflow Builder
A React Flow-based node graph editor for building FEA optimization workflows visually.
Overview
The Canvas provides a visual interface for constructing optimization configurations. Users drag nodes from a palette, connect them to define data flow, configure parameters, and execute with Claude.
Architecture
Canvas System
├── lib/canvas/ # Core logic
│ ├── schema.ts # Node type definitions
│ ├── intent.ts # Graph → Intent JSON serialization
│ ├── validation.ts # Graph validation rules
│ ├── templates.ts # Pre-built workflow templates
│ └── index.ts # Exports
├── components/canvas/ # UI components
│ ├── nodes/ # 8 node type components
│ ├── palette/ # Drag source palette
│ ├── panels/ # Config, validation, chat panels
│ └── AtomizerCanvas.tsx # Main canvas component
├── hooks/ # State management
│ ├── useCanvasStore.ts # Zustand store
│ ├── useCanvasChat.ts # Chat bridge
│ └── useIntentParser.ts # Message parsing
└── pages/
└── CanvasView.tsx # Canvas page
Node Types
| Node | Icon | Description | Inputs | Outputs |
|---|---|---|---|---|
| Model | 📦 | NX model file (.prt, .fem, .sim) | - | 1 |
| Solver | ⚙️ | Nastran solution type (SOL101-112) | 1 | 1 |
| DesignVar | 📐 | Parameter with min/max bounds | - | 1 |
| Extractor | 🔬 | Physics quantity extraction | 1 | 1 |
| Objective | 🎯 | Optimization goal (min/max) | 1 | 1 |
| Constraint | 🚧 | Limit condition (<=, >=) | 1 | 1 |
| Algorithm | 🧠 | Optimization method (TPE, CMA-ES, etc.) | 1+ | 1 |
| Surrogate | 🚀 | Neural network acceleration | 1 | - |
Data Flow
[DesignVar]──┐
├──▶[Model]──▶[Solver]──▶[Extractor]──┬──▶[Objective]──┬──▶[Algorithm]──▶[Surrogate]
[DesignVar]──┘ └──▶[Constraint]─┘
Usage
Building a Workflow
- Drag nodes from the left palette onto the canvas
- Connect nodes by dragging from output handles (right) to input handles (left)
- Configure nodes by clicking to open the config panel
- Validate to check for errors/warnings
- Execute to send to Claude for processing
Using Templates
Click "Templates" to load pre-configured workflows:
- Mass Minimization - Single-objective mass reduction
- Multi-Objective Pareto - Trade-off analysis with NSGA-II
- Turbo Mode - Accelerated optimization with MLP surrogate
- Mirror Zernike - Optical surface optimization
- Frequency Optimization - Modal analysis with SOL103
Importing Configurations
Click "Import" to load existing configurations:
- File Upload - Select an
optimization_config.jsonfile - Paste JSON - Paste configuration directly
- Load Study - Load from existing study by name
Intent JSON Format
The canvas serializes to an Intent JSON for Claude:
{
"version": "1.0",
"source": "canvas",
"timestamp": "2026-01-14T...",
"model": {
"path": "path/to/model.prt",
"type": "prt"
},
"solver": {
"type": "SOL101"
},
"design_variables": [
{ "name": "thickness", "min": 1.0, "max": 10.0, "unit": "mm" }
],
"extractors": [
{ "id": "E4", "name": "BDF Mass", "config": {} }
],
"objectives": [
{ "name": "mass", "direction": "minimize", "weight": 1.0, "extractor": "E4" }
],
"constraints": [
{ "name": "max_disp", "operator": "<=", "value": 0.5, "extractor": "E1" }
],
"optimization": {
"method": "TPE",
"max_trials": 100
},
"surrogate": {
"enabled": true,
"type": "MLP",
"min_trials": 20
}
}
State Management
Uses Zustand for state management:
const {
nodes, // Current nodes
edges, // Current edges
selectedNode, // Currently selected node ID
validation, // Validation result
// Actions
addNode, // Add node at position
updateNodeData, // Update node configuration
onConnect, // Handle edge creation
validate, // Run validation
toIntent, // Serialize to Intent JSON
loadFromIntent, // Load graph from Intent
loadFromConfig, // Load from optimization_config.json
clear, // Clear canvas
} = useCanvasStore();
Validation Rules
The canvas validates:
- Required nodes: Model, Solver, Objective, Algorithm
- Minimum counts: At least 1 design variable, 1 extractor
- Valid connections: Based on VALID_CONNECTIONS map
- Node configuration: All required fields filled
- Connectivity: Objectives must have connected extractors
Chat Integration
The canvas integrates with Claude via:
- Validate - Get intelligent feedback on workflow
- Analyze - Get optimization recommendations
- Execute with Claude - Create study and optionally run optimization
Files
Core Schema
lib/canvas/schema.ts- All node data types and connection rules
Components
nodes/BaseNode.tsx- Base node with handles, status, animationsnodes/*.tsx- Specific node implementationspalette/NodePalette.tsx- Draggable node listpanels/NodeConfigPanel.tsx- Node configuration formpanels/ValidationPanel.tsx- Error/warning displaypanels/ChatPanel.tsx- Claude response displaypanels/ExecuteDialog.tsx- Study name inputpanels/ConfigImporter.tsx- Import configuration dialogpanels/TemplateSelector.tsx- Template selection dialog
Hooks
useCanvasStore.ts- Main state storeuseCanvasChat.ts- Chat bridge for Claude interactionuseIntentParser.ts- Parse Claude messages for canvas updates