mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
When a print completes, multiple WebSocket messages are sent rapidly (print_complete, archive_updated, etc.). Each was immediately invalidating the archives query, causing a cascade of rapid re-renders that crashed the browser tab. Added debounced query invalidation to useWebSocket.ts: - Multiple invalidation requests within 100ms are coalesced into one - Uses requestAnimationFrame to avoid blocking the main thread - Properly cleans up timeouts on unmount