Hardening Changes
The following targeted fixes were applied to harden the production environment without rewriting architecture:
- Websocket Loop Fix: Copied
active_connectionsbefore iteration to preventRuntimeError. - Memory Trimming: Capped
detections_historyto 500 records to prevent memory growth. - Timer De-duplication: Replaced overlapping
setInterval/setTimeoutcalls inuseCommandApiStatus. - Unmount Cleanup: Added proper
clearIntervaltoAlertFeed.jsx. - Debug Endpoints: Added
/debug/visionand/debug/backendfor runtime regression detection.