mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
Task 13b addendum: VstSection never received a real vstHost (PropertyPanel defaulted it to null, StudioRightPanel never passed one), so the FX panel was decorative. Naively fixing that with a second useVstHost() call would have opened an independent WebSocket racing useVstPreview's connection for the sidecar's per-track numeric trackIndex state. Fix: mount ONE useVstHost() instance in NLEProvider (alongside useVstPreview, moved there from useTimelinePlayer to keep it under the studio 600-LOC file cap) and thread it through NLEContext so both useVstPreview and StudioRightPanel's FX panel share the same connection. Add a chain-loaded broadcast (onChainLoaded) plus a trackIndex-mirroring rule in useVstHost that replicates the sidecar's pop-then-reinsert indexing exactly, so useVstPreview can resync an already-loaded track's index when any caller reloads its chain, and revert both sides to dry playback (with a toast) instead of silently misrouting PCM when the sidecar's own indexing rule collides two tracks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>