Repository navigation
Conversation
The connection 'change' event fires on every rtt/effectiveType/saveData re-estimation, so weak links and VPN reconnects popped the warning dialog constantly. Remove the weak-network dialog entirely (image quality degradation still updates silently) and keep only the offline dialog, now edge-triggered so it shows once per actual offline event.
Member
Author
|
Closing in favor of a same-repo PR #246: the code-review workflow cannot post comments on cross-repository fork PRs (GITHUB_TOKEN lacks comment permission), so its check fails on infra rather than on the change itself. |
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.
Problem
The weak-network warning dialog popped up constantly: every network fluctuation (rtt/effectiveType re-estimation), every VPN connect/reconnect/switch, and even toggling Data Saver triggered it. Users on VPN or unstable mobile networks could see it dozens of times per session.
Root cause
registerNetworkListenershowed the warning unconditionally inside theconnectionchangehandler wheneversaveDatawas set oreffectiveTypewas2g/3g. The Network Information API fireschangeon every re-estimation of those values, so on weak links or VPN the handler runs repeatedly and each run popped a new dialog (naive-ui discrete dialog has no dedup).Fix
change- this keeps the useful behavior without any popup.offlineShownflag reset ononline, so it shows once per actual offline event instead of on every repeatedofflinefiring.networkStatus.poor.*i18n keys are kept (still aligned across locales percheck-i18n.mjs) in case the warning is reintroduced later.Verification
npx vue-tsc --build --force: passnpx eslint src/services/utils.ts: 0 errors (one pre-existing max-depth warning on main, untouched)node scripts/check-i18n.mjs: passnpx vite build: pass