Viewerframe Mode Refresh Updated Jun 2026

User switches from mode A to mode B, but the ViewerFrame shows mode A’s content for 2-3 seconds. Root Cause: The refresh is asynchronous, and the previous render cycle completed after the mode changed. Solution: Implement a rendering lock or cancel previous animation frames using cancelAnimationFrame() before starting refreshUpdated() .

Rapid mode toggling (e.g., user scrolling through a mode dropdown) causes thousands of network requests. Root Cause: No debouncing or transition guard. Solution: Add a minimum interval for refreshUpdated calls: viewerframe mode refresh updated