candle-annotator/openspec/changes/archive/2026-02-18-ml-ui-connection/proposal.md
2026-02-18 10:21:05 +01:00

2.3 KiB

Why

TA-Lib pattern recognition and ML model training/inference capabilities are fully implemented in the Python backend but require terminal commands to use. Users cannot select TA-Lib patterns, trigger training, or switch between trained models from the UI — making these powerful features inaccessible during normal annotation workflow.

What Changes

  • Add a TA-Lib pattern panel in the sidebar where users can select from the 50 implemented CDL pattern functions, run them on the current chart, and see results as span annotations
  • Add ability to bulk delete TA-Lib-generated annotations (by source) or selectively keep them for ML training
  • Add a training panel where users can select a model type (RandomForest, XGBoost), configure basic parameters, and trigger training from the UI
  • Add a model selector to the existing prediction panel so users can switch between trained models and apply them to the current chart
  • Add new API endpoints to support TA-Lib pattern detection and training triggers from the frontend
  • Expose training run history and status in the UI

Capabilities

New Capabilities

  • talib-pattern-ui: UI panel for selecting and running TA-Lib CDL pattern recognition functions on the current chart, viewing results as span annotations, and managing (keeping/deleting) detected patterns
  • training-ui: UI panel for selecting model type, configuring parameters, triggering training runs, and viewing training history/status
  • model-selector: UI for listing available trained models, switching the active model, and applying predictions to the current chart

Modified Capabilities

  • prediction-ui: Add model selection dropdown to existing prediction panel, integrate with model-selector for switching active model
  • backend-api: New endpoints for TA-Lib pattern detection, training triggers, model listing, and training status

Impact

  • Frontend: New sidebar panels (TA-Lib patterns, training), modifications to PredictionPanel component
  • Backend API (Next.js): New proxy routes for TA-Lib and training endpoints
  • ML Service (FastAPI): New endpoints for pattern detection, training trigger, model listing
  • Database: May need training_runs table exposure via API (already exists in PostgreSQL)
  • Dependencies: No new dependencies — all TA-Lib and ML libraries already installed