AugmentOS
AugmentOS copied to clipboard
fix: debounce connection status to prevent flicker
Issue: https://github.com/Mentra-Community/MentraOS/issues/1419
Changes made to only show "Disconnected" or "Connecting..." states if connection has been out of CONNECTED state for more than 5 seconds. This prevents UI flicker from brief WebSocket disconnections.
Track timestamp when leaving CONNECTED state Delay showing non-CONNECTED states until 5 seconds elapsed Clear timestamp and hide badge immediately on reconnect Prevents glitchy "Disconnected" → "Connecting..." flicker
@aisraelov As you mentioned, I have raised this PR based on the dev branch.