Commit graph

369 commits

Author SHA1 Message Date
Marko Djordjevic
842a58f12b feat: implement section 11 - span export endpoints (JSON, windowed CSV, BIO-tagged CSV) 2026-02-14 10:14:58 +01:00
Marko Djordjevic
b5e4d6573e feat: implement section 10 - hotkey label assignment for span annotations 2026-02-14 10:14:17 +01:00
Marko Djordjevic
4089aab77c feat: implement section 9 - span annotation sidebar list 2026-02-14 10:13:23 +01:00
Marko Djordjevic
2f05136f20 feat: implement section 8 - span selection, editing, and deletion 2026-02-14 10:11:51 +01:00
Marko Djordjevic
586f02ed69 feat: implement sections 6-7 - span selection, preview, and label assignment popover 2026-02-14 10:10:41 +01:00
Marko Djordjevic
c9d2cbfc4b 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>
2026-02-14 06:42:24 +01:00
Marko Djordjevic
5ea63a613e feat: implement SpanRectanglePrimitive for span annotation rendering
- Created SpanRectanglePrimitive.ts implementing ISeriesPrimitive interface
- Implemented updateAllViews() with coordinate conversion from data-space to pixel-space
- Added semi-transparent rectangle rendering with configurable opacity
- Implemented label tag rendering above rectangles showing pattern names
- Added hitTest() for click detection within span bounds
- Implemented highlight state with thicker borders and increased opacity
- Set zOrder to 'bottom' to render rectangles behind candlesticks
- Completed Section 4 tasks (4.1-4.6) from span-annotation specification

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 06:35:01 +01:00
Marko Djordjevic
7c1007f712 chore: mark completed tasks in span-annotation tasks.md (sections 1-3) 2026-02-14 06:08:36 +01:00
Marko Djordjevic
dadf515406 feat: add database schema, migrations, and API endpoints for span annotations
- Add span_label_types and span_annotations tables to schema
- Seed default span label types (bull_flag, bear_flag, etc.)
- Implement CRUD API endpoints for span label types
- Implement CRUD API endpoints for span annotations
- Add time swap validation in POST endpoint (start_time <= end_time)
2026-02-14 05:56:28 +01:00
Marko Djordjevic
8a7eb1fb08 openspec: span annotation 2026-02-14 05:51:23 +01:00
Marko Djordjevic
88e7347918 archive: add-dark-light-mode change complete 2026-02-13 09:37:18 +01:00
Marko Djordjevic
a8f9327d19 sync: apply add-dark-light-mode delta specs to main specs 2026-02-13 09:37:06 +01:00
Marko Djordjevic
3da4987f89 archive: multi-chart-management change complete 2026-02-13 09:23:33 +01:00
Marko Djordjevic
603b08209b use github action runners 2026-02-13 09:19:08 +01:00
Marko Djordjevic
4121a87875 sync: apply multi-chart-management delta specs to main specs
- Created new chart-management capability spec
- Updated data-ingestion: chart-scoped candles, duplicate filename handling
- Updated backend-api: all endpoints gain chartId parameter, chart CRUD
- Updated chart-canvas: chart switching, scoped data fetching
- Updated label-management: annotations scoped to active chart
- Updated ui-shell: upload creates/selects chart, theme-aware link styling
2026-02-13 09:06:37 +01:00
Marko Djordjevic
7cb308788e test: verify multi-chart management implementation
- Verified ChartSelector uses theme-aware classes
- Tested full workflow: upload, chart creation, switching, annotation scoping
- Verified migration creates default chart with existing data
- Tested chart deletion with cascade delete of candles/annotations
- Tested edge cases: duplicate filenames, deleting last chart, upload with no charts
- Build passes with no type errors
2026-02-13 00:29:21 +01:00
Marko Djordjevic
b9771fe89f feat: wire frontend state and data flow for multi-chart support
- Add activeChartId/charts state to page.tsx with chart fetching on mount
- ChartSelector integrated in sidebar between header and file upload
- CandleChart and SvgOverlay fetch data scoped by activeChartId
- FileUpload returns chart info, auto-selects new chart after upload
- Annotation create/delete flows include chart_id
- Export scoped by activeChartId
- Toolbox receives activeChartId prop
2026-02-13 00:17:09 +01:00
Marko Djordjevic
a3c7137b01 feat: create ChartSelector component with dropdown, delete, and empty state 2026-02-13 00:14:53 +01:00
Marko Djordjevic
90e1e179cc feat: scope candles/annotations/export APIs by chartId query param
- GET /api/candles accepts ?chartId= with fallback to most recent chart
- GET /api/annotations accepts ?chartId= with fallback to most recent chart
- POST /api/annotations now requires chart_id in request body
- GET /api/export accepts ?chartId= to scope exported annotations
- DELETE /api/annotations supports optional chartId scoping
2026-02-13 00:14:22 +01:00
Marko Djordjevic
98e91b047a feat: upload creates new chart from filename with duplicate handling
- POST /api/upload now creates a chart named from the CSV filename
- Duplicate names get numeric suffix (e.g., btc-daily-2)
- Candles inserted with chart_id instead of replacing all data
- Response includes chart id and name
2026-02-13 00:13:23 +01:00
Marko Djordjevic
b53cb1b7d1 feat: add charts API endpoints (GET list, DELETE with cascade) 2026-02-13 00:12:53 +01:00
Marko Djordjevic
92d3339a48 feat: add charts table schema and migration with data backfill
- Add charts table with id, name (unique), created_at
- Add chart_id FK to candles table with composite unique on (chart_id, time)
- Add chart_id FK to annotations table
- Custom migration handles existing data: creates 'Imported Data' chart and backfills chart_id
- Recreates tables for NOT NULL constraint (SQLite limitation)
2026-02-13 00:12:21 +01:00
Marko Djordjevic
178834f3b2 fix: resolve type errors in ThemeProvider and ThemeToggle
- Remove import from 'next-themes/dist/types' (no longer exported)
- Use React.ComponentProps<typeof NextThemesProvider> instead
- Remove unsupported 'asChild' prop from TooltipTrigger
- Remove unsupported 'side' prop from TooltipContent
2026-02-12 23:48:58 +01:00
Marko Djordjevic
9ec571389b night friendly candle colors 2026-02-12 23:38:11 +01:00
Marko Djordjevic
0d235602af feat: implement dark/light mode with system detection
- Install and configure next-themes for theme management
- Add ThemeProvider wrapper component with suppressHydrationWarning
- Define light theme CSS variables (off-white backgrounds, green accents)
- Define dark theme CSS variables (hacker theme: terminal blacks, matrix green)
- Update scrollbar styles for both themes
- Add CRT scanline/glow effects (dark mode only)
- Create ThemeToggle component with system/light/dark cycling
- Add theme toggle to Toolbox sidebar
- Update CandleChart to apply theme-specific colors
- Chart colors update dynamically on theme change
- All components use CSS variables for theme compatibility
- FOUC prevention via next-themes inline script
2026-02-12 23:31:51 +01:00
Marko Djordjevic
4dad24845e chore: archive update-candle-colors change 2026-02-12 23:26:25 +01:00
Marko Djordjevic
cce55c63c1 docs: sync candlestick color spec from update-candle-colors change 2026-02-12 23:26:10 +01:00
Marko Djordjevic
48883e60f0 feat: update candlestick colors to black/white scheme
- Change bullish candles to white interior with black outline
- Change bearish candles to solid black
- Update all wick colors to black
- Enable borders for candlesticks
2026-02-12 23:23:17 +01:00
Marko Djordjevic
62e0c554df use github actions again 2026-02-12 20:23:13 +01:00
Marko Djordjevic
8330566080 docs: update README with CSV replace mode and initial data loading 2026-02-12 18:49:16 +01:00
Marko Djordjevic
6522f501b6 feat: add EURUSD.csv data loading on Docker startup 2026-02-12 18:48:54 +01:00
Marko Djordjevic
011bea2350 feat: delete old candles on CSV upload before inserting new ones 2026-02-12 18:47:11 +01:00
Marko Djordjevic
974d9f5598 feat: add annotation types management system
- Created annotation_types table with name, display_name, color, category, icon
- Implemented CRUD API endpoints for annotation types management
- Built annotation types management UI page at /annotation-types
- Updated Toolbox component to dynamically load and display annotation types
- Updated CandleChart component to use dynamic annotation types for markers
- Added seed functionality for default types (break_up, break_down, line)
- Cleaned up duplicate migration files
2026-02-12 18:17:44 +01:00
Marko Djordjevic
50229e2ccf chore: archive both OpenSpec changes and sync specs to main 2026-02-12 18:17:44 +01:00
exe.dev user
a6e763c153 Switch deploy to webhook-based approach
exe.dev SSH proxy blocks direct SSH from GitHub Actions.
Use webhook listener on port 9000 instead.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 15:22:30 +00:00
Marko Djordjevic
133a0ce50f fix: remove obsolete version attribute from docker-compose.yml 2026-02-12 16:18:14 +01:00
Marko Djordjevic
08e8ebd1e0 design: change to minimalistic and clean light theme
- Replace Matrix/terminal dark theme with modern light design
- Update Tailwind config with clean, professional color palette
- Change from monospace to Inter sans-serif font
- Update chart styling to use white background with subtle grids
- Remove glow effects and neon colors from buttons and UI
- Update color picker with better color options
- Improve sidebar spacing and typography
- Update annotation badges with softer colors
- Change scrollbar styling to match light theme
2026-02-12 16:18:14 +01:00
exe.dev user
42bc3ae757 Add GitHub Actions deploy workflow
Automatically deploys to exe.dev VM on push to master.
Uses SSH to pull latest code and rebuild Docker container.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 15:04:06 +00:00
exe.dev user
e7af29145b Add drizzle migration files and remove drizzle/ from .gitignore
The Docker build was failing because drizzle/ was in .gitignore,
so migration files (meta/_journal.json) were never committed.
Generated initial migration from schema.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 14:47:06 +00:00
Marko Djordjevic
6f965c1cc9 fix: add automatic database migrations on startup and copy drizzle folder to Docker
- Auto-run migrations when db module loads
- Copy drizzle migrations folder to Docker image
- Generate missing color column migration
- Fixes 500 errors on /api/candles and /api/annotations in Docker
2026-02-12 15:40:57 +01:00
Marko Djordjevic
4e13648ebf fix: copy node_modules to Docker container for better-sqlite3 native dependencies 2026-02-12 15:32:19 +01:00
Marko Djordjevic
8646777f8d fix: create public directory and simplify Dockerfile COPY logic 2026-02-12 15:21:01 +01:00
Marko Djordjevic
957663e29a fix: use proper Drizzle query syntax in health endpoint instead of execute() 2026-02-12 15:19:50 +01:00
Marko Djordjevic
1f87950caf fix: update Dockerfile to use Node.js 20-alpine (required by Next.js 16) 2026-02-12 15:18:07 +01:00
Marko Djordjevic
23979ad2df chore: add Input component from shadcn/ui for label search 2026-02-12 15:15:13 +01:00
Marko Djordjevic
83be6bbdfb docs: comprehensive documentation updates for v2.0.0
- Update README.md with Docker quickstart and new features (label management, hacker theme)
- Add detailed Docker deployment section to DEPLOYMENT.md:
  - docker-compose usage
  - Environment configuration
  - Data persistence and backup
  - Container health checks
  - Troubleshooting steps
  - Production deployment guidance
- Create comprehensive CLAUDE_DESCRIPTION.md:
  - Project overview and version info
  - Recent changes in v2.0.0
  - Technical stack details
  - Core features and file structure
  - State management explanation
  - Data flow diagrams
  - API endpoints reference
  - Development workflow
  - Customization points
  - Performance and security notes
2026-02-12 15:13:59 +01:00
Marko Djordjevic
a1fa86fe55 feat: implement label management with sidebar, hacker theme, and Docker support
- Add label selection on chart with visual highlight (size 2x, color change)
- Implement keyboard delete handler (Delete/Backspace keys)
- Add comprehensive label management sidebar with:
  - Collapsible label annotations section
  - Search by timestamp
  - Filter by type (Break Up, Break Down, All)
  - Individual delete buttons
  - Count display
  - Click to select/highlight on chart
- Transform UI with hacker theme:
  - Matrix green (#00ff41) on dark background (#0a0e0a)
  - Monospace font (JetBrains Mono)
  - Glow effects on button hover and active states
  - Custom scrollbar styling
  - Terminal-inspired aesthetic
- Add Docker deployment:
  - Multi-stage Dockerfile with standalone output
  - docker-compose.yml with volume persistence
  - Non-root user (nextjs) for security
  - Health check endpoint integration
- Tailwind and CSS enhancements:
  - Custom colors (matrix, matrixDim, neonRed, etc.)
  - Glow box shadows and animations
  - Selection and scrollbar styling
2026-02-12 15:12:59 +01:00
Marko Djordjevic
74b84073a9 feat: create detailed implementation tasks (107 checkboxed tasks)
Breakdown into 16 phases:
1. Setup and Configuration (3 tasks)
2. API Extensions for Bulk Operations (8 tasks)
3. Hacker Theme - CSS Variables and Tailwind (12 tasks)
4. Hacker Theme - Component Styling (6 tasks)
5. Label Management - State and Selection (9 tasks)
6. Label Management - Keyboard Delete (7 tasks)
7. Label Management - Sidebar List UI Structure (8 tasks)
8. Label Management - Sidebar List Content (11 tasks)
9. Label Management - Search and Filter (8 tasks)
10. Label Management - Delete All Labels Button (9 tasks)
11. Toast Feedback System (8 tasks)
12. Docker - Dockerfile Creation (14 tasks)
13. Docker - Compose Configuration (12 tasks)
14. Documentation Updates (10 tasks)
15. Integration Testing and Validation (15 tasks)
16. Commit and Cleanup (8 tasks)

Each task is small, specific, and verifiable. Perfect for Haiku model execution.
2026-02-12 14:55:30 +01:00
Marko Djordjevic
ce96895bc3 feat: create comprehensive design document
Technical decisions with rationale:
- Label selection: parallel state to avoid disturbing line logic
- Label list UI: collapsible section in Toolbox with search/filter
- API design: extend DELETE with query params for bulk operations
- Docker: standalone output with multi-stage build
- Theme: CSS variables + Tailwind extension strategy
- Feedback: Toast component with terminal formatting

Includes risk mitigation, migration plan, and testing checklist
2026-02-12 14:49:26 +01:00
Marko Djordjevic
c41eb622fe refactor: remove line-deletion capability (already implemented)
Line deletion via Delete tool already exists in current implementation.
Focus on three new capabilities: label-management, docker-deployment, hacker-theme
2026-02-12 14:46:23 +01:00