candle-annotator/openspec/changes/code-review-fix
Marko Djordjevic 73c88f8211 fix: resolve stale closures in CandleChart click handler
Convert drawingState, selectedLineId, dragState, and annotations to
refs that stay in sync with state via useEffect. The chart click handler
(subscribeClick) captured stale closure values for these variables.
Now reads from refs (e.g. drawingStateRef.current) so the handler
always sees the latest state, and removed the stale state variables
from the useEffect dependency array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:15:24 +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: resolve stale closures in CandleChart click handler 2026-02-18 15:15:24 +01:00