feat: create OpenSpec proposal for annotation enhancements and deployment

This commit is contained in:
Marko Djordjevic 2026-02-12 14:39:41 +01:00
parent 37c3adf42f
commit f1832de7da

View file

@ -0,0 +1,87 @@
## Why
The candle annotator currently has basic line drawing functionality (Phase 1-4 complete: color support, visual feedback, selection, and endpoint dragging). Users need more comprehensive annotation management including bulk deletion, label CRUD operations, production deployment capability, and an improved UI theme. These features are essential for efficient annotation workflows and real-world deployment scenarios.
## What Changes
### Line Management Enhancements
- **Delete Selected Line**: Add ability to delete the currently selected line using keyboard shortcut (Delete/Backspace key)
- **Delete All Lines**: Add button in Toolbox to clear all line annotations at once with confirmation dialog
### Label Management System
- **Delete All Labels**: Add button to remove all break_up/break_down markers with confirmation
- **Select Label**: Make label markers (arrows) clickable to select/highlight them
- **Delete Specific Label**: Delete individual selected label marker (keyboard or UI button)
- **Label CRUD UI**: Add collapsible section in Toolbox sidebar showing:
- List of all label annotations (timestamp, type, color-coded)
- Click to select/highlight on chart
- Delete button per label
- Count of each label type
- Search/filter by type
### Docker Deployment
- **Dockerization**: Create production-ready Docker setup:
- Multi-stage Dockerfile (build + runtime)
- docker-compose.yml for easy deployment
- Volume mounting for persistent SQLite database
- Environment variable configuration
- Health check endpoint
- Production build optimization
- Documentation in DEPLOYMENT.md
### UI Theme Enhancement
- **Hacker-Style Theme**: Transform interface to minimal, terminal-inspired design:
- Monospace fonts throughout
- Matrix-style green (#00ff41) accents on dark background
- Neon glow effects on active elements
- Simplified borders with ASCII-style corners
- Terminal-like command feedback messages
- Minimalist icons or ASCII art alternatives
- High contrast for readability
- Cyber/retro aesthetic without sacrificing usability
## Capabilities
### New Capabilities
- `line-deletion`: Delete selected line or all lines at once
- `label-management`: Complete CRUD interface for label annotations in sidebar
- `docker-deployment`: Containerized deployment with docker-compose
- `hacker-theme`: Terminal-inspired minimal dark theme with neon accents
### Modified Capabilities
- (none - only adding new features, not changing existing requirements)
## Impact
### Code Changes
- **Database**: No schema changes needed (existing tables support all operations)
- **Components**:
- `SvgOverlay.tsx`: Add keyboard delete handlers, bulk delete logic
- `Toolbox.tsx`: Add label list UI, delete buttons, collapsible sections, theme styling
- `CandleChart.tsx`: Add label selection click handlers, highlight logic
- `page.tsx`: Add state for selected label, pass callbacks
- **API Routes**:
- `DELETE /api/annotations`: Add query param for bulk delete (by type or all)
- `GET /api/health`: New endpoint for Docker health checks
- **Styling**: Update `globals.css` and Tailwind config for hacker theme
- **New Files**:
- `Dockerfile`
- `docker-compose.yml`
- `.dockerignore`
- `.env.example`
### Dependencies
- No new npm packages required (existing stack covers all needs)
- Docker runtime required for deployment
### Deployment
- Current dev workflow unchanged
- New production deployment path via Docker
- Database persistence via volume mounts
- Environment-based configuration
### User Experience
- More efficient annotation workflows (bulk operations)
- Better annotation visibility and organization (sidebar list)
- Easier deployment to servers (docker-compose up)
- More visually distinctive theme (hacker aesthetic)