Commit graph

7 commits

Author SHA1 Message Date
Marko Djordjevic
5e58c26810 task 9.6: create src/types/index.ts barrel file re-exporting all types 2026-02-18 15:45:58 +01:00
Marko Djordjevic
18b2afe4a5 task 9.5: create src/types/span-annotations.ts
Add SpanAnnotation, SpanLabelType, and SubSpan interfaces extracted from
duplicate inline definitions across SpanAnnotationManager, SpanAnnotationList,
SpanPopover, Toolbox, and page.tsx components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:45:30 +01:00
Marko Djordjevic
3eea7e5cfd task 9.3: create src/types/charts.ts with Chart interface
Adds a shared Chart interface matching the DB schema (id, name, created_at)
and the existing usages in page.tsx and ChartSelector.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:43:30 +01:00
Marko Djordjevic
f05a0081f7 feat: add shared Annotation, AnnotationType, Geometry interfaces in src/types/annotations.ts
Creates src/types/annotations.ts with typed interfaces matching actual
usage in CandleChart.tsx, page.tsx, and DB schema. Marks task 9.2 done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:27:13 +01:00
Marko Djordjevic
8b40a2cb9a feat: create src/types/candles.ts with Candle interface (task 9.1)
Add shared Candle interface with time, open, high, low, close, and
optional volume fields. Volume is optional because the DB schema does
not store volume but the predict/patterns API routes accept it as an
optional field.

Mark task 9.1 as complete in tasks.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:26:14 +01:00
Marko Djordjevic
5a7c901980 fix(frontend): update ModelInfoResponse types to match backend structure
- Update TypeScript types to match flat backend response structure
- Remove nested model_info and metrics objects
- Remove label_config, use labels array and per_class_metrics array
- Update all component references to use new structure
- Generate default colors for prediction labels in CandleChart
- Fix TypeScript type errors for nullable model_version
- Remove accuracy/F1 metrics display (not in new response)
2026-02-15 21:39:38 +01:00
Marko Djordjevic
28ebe2c5d1 feat(ui): add prediction state management and PredictionPanel component
- Create prediction type definitions in src/types/predictions.ts
- Add prediction state management to page.tsx with caching
- Implement PredictionPanel component with:
  - Master visibility toggle
  - Model info display (name, version, type, metrics)
  - Action buttons (Run on Visible, Predict All)
  - Confidence threshold slider
  - Label filter checkboxes with per-class metrics
  - Disagreement filter toggle
  - Prediction summary display
  - Model server offline banner
- Add on-demand and batch prediction fetching
- Implement prediction caching by chart and model version
- Add health polling for inference API (30s interval when offline)
- Ensure annotation tools work independently of prediction API

Tasks completed: 9.1-9.5, 12.1-12.3 (59/78 total)
2026-02-15 16:20:07 +01:00