The row renderer was defined inside VirtualizedTree, giving it a new
component identity on every parent render — react-window then remounted
every row, destroying row DOM/state. Move Row to module scope and pass
flattened/tree/renderNode through react-window's rowProps instead of the
closure.
Verified at runtime: rows render, expand/collapse and select work, and
selection state survives re-renders, with no console errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>