candle-annotator/openspec/changes/code-review-fix
Marko Djordjevic 131d2912d5 fix: use chart.applyOptions() for theme changes instead of re-creating chart
Remove resolvedTheme from the chart initialization useEffect dependency
array so theme changes no longer destroy and re-create the entire chart.
Add a separate useEffect that calls chartRef.current.applyOptions() with
the new layout, grid, timeScale and rightPriceScale colors whenever
resolvedTheme changes, avoiding the memory leak and flicker caused by
full chart reconstruction on every theme toggle.

Closes task 8.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:19:44 +01:00
..
specs bind: MLflow port to 127.0.0.1:5000:5000 in docker-compose.yml 2026-02-18 10:58:11 +01:00
.openspec.yaml bind: MLflow port to 127.0.0.1:5000:5000 in docker-compose.yml 2026-02-18 10:58:11 +01:00
design.md bind: MLflow port to 127.0.0.1:5000:5000 in docker-compose.yml 2026-02-18 10:58:11 +01:00
proposal.md bind: MLflow port to 127.0.0.1:5000:5000 in docker-compose.yml 2026-02-18 10:58:11 +01:00
tasks.md fix: use chart.applyOptions() for theme changes instead of re-creating chart 2026-02-18 15:19:44 +01:00