Warn before pinning unreachable manual servers#8833
Open
atavism wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UX + model support to warn users before pinning to a manually selected Lantern server that likely won’t work (no successful Smart Location probe), while tightening server selection logic to only consider successful probes.
Changes:
- Add
hasSuccessfulProbeandshouldWarnBeforeManualSelectionto server models and update “fastest server” selection to only use successful probes. - Surface reachability warnings in the server selection UI (subtitle/icon) and gate manual selection behind a warning dialog with “Try Anyway” vs “Use Smart Location”.
- Add unit tests covering fastest-server selection and manual warning behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/core/models/available_servers_test.dart | Adds model tests for fastest-server selection and manual warning conditions. |
| lib/features/vpn/single_city_server_view.dart | Replaces subtitle rendering with shared reachability subtitle + warning icon. |
| lib/features/vpn/server_selection.dart | Adds manual-selection warning dialog flow; wires reachability subtitle/icon into list tiles; minor cleanup. |
| lib/features/vpn/server_reachability.dart | New shared UI helpers for reachability subtitle and warning icon/tooltip. |
| lib/features/vpn/location_setting.dart | Surfaces reachability warning in the Location setting tile when pinned to an unprobed Lantern server. |
| lib/core/models/available_servers.dart | Adds serverByTag, probe-success helpers, and tightens fastestLanternServer filtering. |
| assets/locales/en.po | Adds English strings for the new reachability warning UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Resolves https://github.com/getlantern/engineering/issues/3550