Fix #18: The connection interrupted sign appears intermittently when connection is gone continuously#19
Merged
Conversation
Instead of using a rolling 5-second threshold from disconnectedSince (which caused the warning to flicker during repeated reconnect attempts), add a warningEnabled flag that becomes true 5 seconds after mount. After that, any disconnect shows the warning immediately and continuously.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #18
Fixed the intermittent connection warning in Navbar.vue by replacing the rolling 5-second threshold (which caused flickering during reconnect attempts) with a
warningEnabledflag initialized tofalseand set totrueafter a 5-second timeout oncreated(). TheshowConnectionWarningcomputed property now returnsthis.warningEnabled && disconnectedSince !== null, so the warning is suppressed only during the initial 5-second page load window, then shows immediately and stays visible for any disconnect thereafter.