- 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)
1.8 KiB
1.8 KiB
MODIFIED Requirements
Requirement: File upload interface
The application SHALL provide a CSV file upload interface accessible from the sidebar. The upload component SHALL trigger the POST /api/upload endpoint. On success, the component SHALL add the newly created chart to the chart selector and set it as the active chart, triggering the chart and annotation data to refresh for the new chart.
Scenario: Upload via UI
- WHEN user selects a CSV file through the upload interface
- THEN the file is sent to the upload API, a new chart is created, the chart selector updates to include the new chart, and the new chart becomes active with its candles displayed
Scenario: Upload error display
- WHEN the upload API returns an error
- THEN the UI displays the error message to the user and no chart is created
ADDED Requirements
Requirement: Theme-aware Manage Annotation Types link
The "Manage Annotation Types" link in the sidebar header SHALL use theme-aware styling consistent with the rest of the application. The link SHALL NOT use hardcoded color values. It SHALL use text-muted-foreground and hover:text-foreground Tailwind classes to respect both light and dark themes.
Scenario: Link styling in dark mode
- WHEN the application is in dark mode
- THEN the "Manage Annotation Types" link uses muted foreground color and brightens on hover, consistent with the dark theme
Scenario: Link styling in light mode
- WHEN the application is in light mode
- THEN the "Manage Annotation Types" link uses muted foreground color and darkens on hover, consistent with the light theme
Scenario: Link visual consistency
- WHEN the sidebar renders
- THEN the "Manage Annotation Types" link does not use underline styling and visually matches other sidebar text elements