feat: implement Section 5 - Span Tool State & Integration

- Add SpanAnnotation and SpanLabelType interfaces to page.tsx
- Add span-related state: spanAnnotations, selectedSpanId, spanLabelTypes
- Add fetchSpanAnnotations() and fetchSpanLabelTypes() data fetching functions
- Load span annotations and label types when chart changes
- Add "Span" tool button to Toolbox component with RectangleHorizontal icon
- Mark Section 5 tasks (5.1-5.5) as complete in tasks.md

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Marko Djordjevic 2026-02-14 06:42:24 +01:00
parent 5ea63a613e
commit c9d2cbfc4b
3 changed files with 79 additions and 10 deletions

View file

@ -30,11 +30,11 @@
## 5. Span Tool State & Integration
- [ ] 5.1 Extend `activeTool` type in `page.tsx` to include `'span'` tool mode
- [ ] 5.2 Add span-related state to `page.tsx`: `spanAnnotations[]`, `selectedSpanId`, `spanLabelTypes[]`
- [ ] 5.3 Add `fetchSpanAnnotations(chartId)` and `fetchSpanLabelTypes()` data fetching functions
- [ ] 5.4 Load span annotations and label types when chart changes (alongside existing annotation loading)
- [ ] 5.5 Add "Span" tool button to Toolbox component alongside existing tools
- [x] 5.1 Extend `activeTool` type in `page.tsx` to include `'span'` tool mode
- [x] 5.2 Add span-related state to `page.tsx`: `spanAnnotations[]`, `selectedSpanId`, `spanLabelTypes[]`
- [x] 5.3 Add `fetchSpanAnnotations(chartId)` and `fetchSpanLabelTypes()` data fetching functions
- [x] 5.4 Load span annotations and label types when chart changes (alongside existing annotation loading)
- [x] 5.5 Add "Span" tool button to Toolbox component alongside existing tools
## 6. Two-Click Span Selection & Preview