v0.4.2
Bug Fix: Annotation highlight infinite loop
Root cause: highlightLineRange() mutated the DOM via surroundContents() while iterating with TreeWalker, causing the walker to revisit wrapped text nodes infinitely — confirmed by STATUS_STACK_OVERFLOW in Chrome DevTools.
Fixes
- Collect-then-wrap pattern — separate TreeWalker iteration from DOM mutation
- Skip nested elements with same
data-source-lineto prevent double-wrapping normalize()after mark removal to prevent text node fragmentation- Debounced signal updates (50ms) to collapse rapid WS broadcasts into one re-render
- Remote broadcast forwarding via
POST /api/broadcast(was silently dropped) /api/review/statusreturns 200 in non-review mode (was 404)
Tests
693 passing (+6 new covering debounce, fragmentation, and broadcast forwarding)