Commit graph

314 commits

Author SHA1 Message Date
Marko Djordjevic
440043518c code-review-fix task 12.9: add activeChartId to primitive cleanup effect dependency arrays in CandleChart 2026-02-18 20:42:12 +01:00
Marko Djordjevic
3f6bcd5c7d code-review-fix task 12.8: mark task 12.8 as done in tasks.md 2026-02-18 20:40:47 +01:00
Marko Djordjevic
a55cbab84f code-review-fix task 12.8: add candles to useImperativeHandle dependency array in CandleChart 2026-02-18 20:40:40 +01:00
Marko Djordjevic
2d8222740c code-review-fix task 12.7: mark task 12.7 as done in tasks.md 2026-02-18 20:40:08 +01:00
Marko Djordjevic
a4bb3efa70 code-review-fix task 12.7: add hasLoaded flag to TalibPatternPanel to prevent re-fetch on empty array 2026-02-18 20:39:53 +01:00
Marko Djordjevic
e8b8bbb56f code-review-fix task 12.6: mark task 12.6 as done in tasks.md 2026-02-18 20:39:14 +01:00
Marko Djordjevic
4f2c9756b8 code-review-fix task 12.6: remove manual Escape handler from SpanPopover conflicting with Radix Dialog 2026-02-18 20:39:07 +01:00
Marko Djordjevic
6260f7caed code-review-fix task 12.5: mark task 12.5 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:38:30 +01:00
Marko Djordjevic
b7567b235d code-review-fix task 12.5: replace Google Font CSS @import with next/font/google in layout.tsx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:38:20 +01:00
Marko Djordjevic
f9ff0d266e code-review-fix task 12.4: mark task 12.4 as done in tasks.md 2026-02-18 20:37:40 +01:00
Marko Djordjevic
4e0264ca95 code-review-fix task 12.4: add onPointerUp to confidence slider to reduce excessive callbacks 2026-02-18 20:37:27 +01:00
Marko Djordjevic
a0a30beb8e code-review-fix task 12.3: mark task 12.3 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:36:41 +01:00
Marko Djordjevic
fd4550d444 code-review-fix task 12.3: fix dark theme on annotation-types and span-label-types pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:36:31 +01:00
Marko Djordjevic
6a194e81ac code-review-fix task 12.2: mark task 12.2 as done in tasks.md 2026-02-18 20:34:55 +01:00
Marko Djordjevic
770a9a1485 code-review-fix task 12.2: replace @ts-ignore with proper CSS custom property type assertion in Toolbox.tsx 2026-02-18 20:34:49 +01:00
Marko Djordjevic
15be4c6ca1 code-review-fix task 12.1: mark task 12.1 as done in tasks.md 2026-02-18 20:34:20 +01:00
Marko Djordjevic
6a7a434fa5 code-review-fix task 12.1: remove unused TrendingUp and ChevronUp imports from Toolbox.tsx 2026-02-18 20:34:14 +01:00
Marko Djordjevic
d1e992bc79 code-review-fix task 11.4: mark task 11.4 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:33:52 +01:00
Marko Djordjevic
9fe833bcfc code-review-fix task 11.4: add aria-pressed to span drawing and prediction toggle buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:33:41 +01:00
Marko Djordjevic
49a2582e8a code-review-fix task 11.3: mark task 11.3 as done in tasks.md 2026-02-18 20:32:25 +01:00
Marko Djordjevic
913abdd353 code-review-fix task 11.3: add keyboard navigation and click-outside close to ChartSelector 2026-02-18 20:32:20 +01:00
Marko Djordjevic
3793e646cb code-review-fix task 11.2: mark task 11.2 as done in tasks.md 2026-02-18 20:31:30 +01:00
Marko Djordjevic
9e4ad02f44 code-review-fix task 11.2: add role=dialog aria-modal and focus trapping to KeyboardShortcutsModal 2026-02-18 20:31:24 +01:00
Marko Djordjevic
6f7e3451a2 code-review-fix task 11.1: mark task 11.1 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:30:37 +01:00
Marko Djordjevic
f444c3a637 code-review-fix task 11.1: add aria-label to all toolbar buttons in Toolbox.tsx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:30:29 +01:00
Marko Djordjevic
e5ce5cb2e4 code-review-fix task 10.4: mark task 10.4 as done in tasks.md 2026-02-18 20:29:32 +01:00
Marko Djordjevic
e181445266 code-review-fix task 10.4: fix confidence falsy check to use != null in SpanAnnotationList 2026-02-18 20:29:25 +01:00
Marko Djordjevic
bd57bb13e4 code-review-fix task 10.3: mark task 10.3 as done in tasks.md 2026-02-18 20:28:57 +01:00
Marko Djordjevic
d113815403 code-review-fix task 10.3: add confirmation dialog before delete-all annotations 2026-02-18 20:28:46 +01:00
Marko Djordjevic
ed05bd6972 code-review-fix task 10.2: mark task 10.2 as done in tasks.md 2026-02-18 20:27:36 +01:00
Marko Djordjevic
c978d5ad4a code-review-fix task 10.2: wrap children with ErrorBoundary in layout.tsx 2026-02-18 20:27:29 +01:00
Marko Djordjevic
4bd9d6f9da code-review-fix task 10.1: mark task 10.1 as done in tasks.md 2026-02-18 20:27:05 +01:00
Marko Djordjevic
081a46638b code-review-fix task 10.1: create ErrorBoundary component with fallback UI 2026-02-18 20:26:57 +01:00
Marko Djordjevic
43b6b5da9e code-review-fix task 9.8: mark task 9.8 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:26:05 +01:00
Marko Djordjevic
ba20d9e5ab code-review-fix task 9.8: replace any types with proper interfaces
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 20:25:50 +01:00
Marko Djordjevic
1b637dc45e task 9.7: mark task 9.7 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:49:43 +01:00
Marko Djordjevic
5c5701b080 task 9.7: replace duplicate interfaces with @/types imports
Replace locally-defined duplicate interfaces in page.tsx,
CandleChart.tsx, SpanAnnotationManager.tsx, Toolbox.tsx,
SpanAnnotationList.tsx, and SpanPopover.tsx with imports from @/types.

- SpanAnnotation, SpanLabelType: replaced in all 6 files
- Candle, AnnotationType: replaced in CandleChart.tsx, SpanAnnotationManager.tsx, Toolbox.tsx
- Annotation (with geometry): replaced in CandleChart.tsx and Toolbox.tsx
- Chart: kept local in page.tsx (shared type has created_at: Date|number vs local number)
- Annotation in page.tsx: kept local (geometry: any) but added missing color field for compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:49:30 +01:00
Marko Djordjevic
28a0d0790e task 9.6: mark task 9.6 as completed in tasks.md 2026-02-18 15:46:06 +01:00
Marko Djordjevic
5e58c26810 task 9.6: create src/types/index.ts barrel file re-exporting all types 2026-02-18 15:45:58 +01:00
Marko Djordjevic
2be91ceea8 task 9.5: mark task 9.5 as complete in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:45:36 +01:00
Marko Djordjevic
18b2afe4a5 task 9.5: create src/types/span-annotations.ts
Add SpanAnnotation, SpanLabelType, and SubSpan interfaces extracted from
duplicate inline definitions across SpanAnnotationManager, SpanAnnotationList,
SpanPopover, Toolbox, and page.tsx components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:45:30 +01:00
Marko Djordjevic
76c440d879 task 9.4: mark task 9.4 as done in tasks.md
src/types/predictions.ts already existed with PredictionSpan, PredictionState, and ModelInfoResponse interfaces matching actual usage across page.tsx, CandleChart.tsx, and PredictionPanel.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:44:24 +01:00
Marko Djordjevic
a7087ef945 task 9.3: mark task 9.3 as done in tasks.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:43:36 +01:00
Marko Djordjevic
3eea7e5cfd task 9.3: create src/types/charts.ts with Chart interface
Adds a shared Chart interface matching the DB schema (id, name, created_at)
and the existing usages in page.tsx and ChartSelector.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:43:30 +01:00
Marko Djordjevic
f05a0081f7 feat: add shared Annotation, AnnotationType, Geometry interfaces in src/types/annotations.ts
Creates src/types/annotations.ts with typed interfaces matching actual
usage in CandleChart.tsx, page.tsx, and DB schema. Marks task 9.2 done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:27:13 +01:00
Marko Djordjevic
8b40a2cb9a feat: create src/types/candles.ts with Candle interface (task 9.1)
Add shared Candle interface with time, open, high, low, close, and
optional volume fields. Volume is optional because the DB schema does
not store volume but the predict/patterns API routes accept it as an
optional field.

Mark task 9.1 as complete in tasks.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:26:14 +01:00
Marko Djordjevic
90d62cf187 chore: mark task 8.8 as completed 2026-02-18 15:25:23 +01:00
Marko Djordjevic
679410a5cd fix: move new Set<string>() default prop to module-level constant in CandleChart
Move the inline 'new Set<string>()' default prop to a module-level constant
(EMPTY_STRING_SET) to prevent unnecessary Set instance creation on every render,
which could cause unnecessary re-renders in children or effects that depend on
reference equality.
2026-02-18 15:25:15 +01:00
Marko Djordjevic
2f1e4944de Mark task 8.7 as completed - Extract magic numbers to named constants
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:24:41 +01:00
Marko Djordjevic
36182986b6 Extract magic numbers and colors to named constants in CandleChart.tsx
Replace inline magic numbers (8px, 60s, 2, 1, 0.15, 0.25, 100) and hardcoded
color strings with named module-level constants for better maintainability and
clarity. Organized constants into logical groups:
- Magic number constants (tolerance, intervals, sizes, alphas)
- Dark theme colors
- Light theme colors
- Candlestick colors
- Prediction overlay colors
- Predefined label colors

This improves code readability and makes it easier to adjust UI parameters globally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:24:32 +01:00