candle-annotator/openspec/changes
Marko Djordjevic 0cd7a34c99 fix: replace useState with useRef for preview primitive to prevent memory leak
The preview primitive in SpanAnnotationManager was stored in useState,
causing unnecessary re-renders and potential memory leaks since the
primitive was not cleaned up on unmount. Changed to useRef, updated all
read/write sites, removed from dependency arrays, and added unmount
cleanup effect that detaches the primitive from the series.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:18:48 +01:00
..
archive sync: ml-ui-connection delta specs to main specs 2026-02-18 10:21:05 +01:00
code-review-fix fix: replace useState with useRef for preview primitive to prevent memory leak 2026-02-18 15:18:48 +01:00