From 7c1007f7121449074415f6c984af73451391819e Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Sat, 14 Feb 2026 06:08:36 +0100 Subject: [PATCH] chore: mark completed tasks in span-annotation tasks.md (sections 1-3) --- openspec/changes/span-annotation/tasks.md | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/openspec/changes/span-annotation/tasks.md b/openspec/changes/span-annotation/tasks.md index 6d4fdc8..4292d7d 100644 --- a/openspec/changes/span-annotation/tasks.md +++ b/openspec/changes/span-annotation/tasks.md @@ -1,23 +1,23 @@ ## 1. Database Schema & Migrations -- [ ] 1.1 Add `span_label_types` table to Drizzle schema (id, name, display_name, color, hotkey, is_active, sort_order, created_at) -- [ ] 1.2 Add `span_annotations` table to Drizzle schema (id, chart_id FK, start_time, end_time, label, confidence, outcome, notes, sub_spans JSON, color, created_at) -- [ ] 1.3 Run migration to create both tables -- [ ] 1.4 Seed `span_label_types` with default labels: bull_flag, bear_flag, head_and_shoulders, double_bottom, wedge_up, wedge_down, custom (with distinct colors and hotkeys 1-7) +- [x] 1.1 Add `span_label_types` table to Drizzle schema (id, name, display_name, color, hotkey, is_active, sort_order, created_at) +- [x] 1.2 Add `span_annotations` table to Drizzle schema (id, chart_id FK, start_time, end_time, label, confidence, outcome, notes, sub_spans JSON, color, created_at) +- [x] 1.3 Run migration to create both tables +- [x] 1.4 Seed `span_label_types` with default labels: bull_flag, bear_flag, head_and_shoulders, double_bottom, wedge_up, wedge_down, custom (with distinct colors and hotkeys 1-7) ## 2. Span Label Types API -- [ ] 2.1 Create `GET /api/span-label-types` endpoint — return all active label types sorted by sort_order -- [ ] 2.2 Create `POST /api/span-label-types` endpoint — create a new label type -- [ ] 2.3 Create `PATCH /api/span-label-types/[id]` endpoint — update label type fields -- [ ] 2.4 Create `DELETE /api/span-label-types/[id]` endpoint — delete a label type +- [x] 2.1 Create `GET /api/span-label-types` endpoint — return all active label types sorted by sort_order +- [x] 2.2 Create `POST /api/span-label-types` endpoint — create a new label type +- [x] 2.3 Create `PATCH /api/span-label-types/[id]` endpoint — update label type fields +- [x] 2.4 Create `DELETE /api/span-label-types/[id]` endpoint — delete a label type ## 3. Span Annotations CRUD API -- [ ] 3.1 Create `GET /api/span-annotations?chartId=X` endpoint — return all span annotations for a chart, sorted by start_time desc -- [ ] 3.2 Create `POST /api/span-annotations` endpoint — create span annotation with start/end time swap validation (start <= end) -- [ ] 3.3 Create `PATCH /api/span-annotations/[id]` endpoint — update label, confidence, outcome, notes, sub_spans -- [ ] 3.4 Create `DELETE /api/span-annotations/[id]` endpoint — delete a span annotation +- [x] 3.1 Create `GET /api/span-annotations?chartId=X` endpoint — return all span annotations for a chart, sorted by start_time desc +- [x] 3.2 Create `POST /api/span-annotations` endpoint — create span annotation with start/end time swap validation (start <= end) +- [x] 3.3 Create `PATCH /api/span-annotations/[id]` endpoint — update label, confidence, outcome, notes, sub_spans +- [x] 3.4 Create `DELETE /api/span-annotations/[id]` endpoint — delete a span annotation ## 4. SpanRectanglePrimitive (Chart Rendering)