Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions assets/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,6 @@ msgstr "Private Servers"
msgid "fastest_server"
msgstr "Fastest Server"

msgid "server_testing"
msgstr "Testing…"

msgid "server_may_be_unreachable"
msgstr "May be unreachable"

Expand Down Expand Up @@ -1676,4 +1673,3 @@ msgstr "Your old configuration has been cleared. Turn the VPN on to automaticall




1 change: 0 additions & 1 deletion lib/core/common/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export 'package:lantern/core/widgets/platform_card.dart';
export 'package:lantern/core/widgets/pro_banner.dart';
export 'package:lantern/core/widgets/pro_button.dart';
export 'package:lantern/core/widgets/server_reachability_warning_icon.dart';
export 'package:lantern/core/widgets/server_testing_indicator.dart';
export 'package:lantern/features/home/data_usage.dart';

export '../../core/widgets/divider_space.dart';
Expand Down
18 changes: 8 additions & 10 deletions lib/core/models/available_servers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ class AvailableServers {

/// One representative Lantern server per country/city. If any server for the
/// location has a successful probe, use the fastest one; otherwise prefer a
/// server still awaiting its first probe (so the location reads as "testing")
/// over one already probed-and-failing, falling back to a deterministic
/// representative.
/// server still awaiting its first probe over one already probed-and-failing,
/// falling back to a deterministic representative.
List<Server> get lanternServerLocations {
final grouped = <String, List<Server>>{};
for (final server in lanternServers) {
Expand Down Expand Up @@ -81,10 +80,9 @@ Server _bestServerForLocation(List<Server> servers) {
}

// No successful probe for this location. Prefer a server still awaiting its
// first probe (so the location reads as "testing"), then any server not yet
// ruled unreachable, falling back to the failed pool only when every server
// has sustained enough failures — so a location is "unavailable" only once
// all of its servers are.
// first probe, then any server not yet ruled unreachable, falling back to the
// failed pool only when every server has sustained enough failures — so a
// location is "unavailable" only once all of its servers are.
final awaiting = servers.where((s) => s.isAwaitingProbe).toList();
final notUnreachable = servers.where((s) => !s.isProbedUnreachable).toList();
final pool = awaiting.isNotEmpty
Expand Down Expand Up @@ -163,9 +161,9 @@ class Server {
(selectionHistory?.consecutiveFailures ?? 0) >=
_manualSelectionFailureWarningThreshold;

/// Still waiting for the first probe result. During the multi-minute Smart
/// Location convergence most Lantern servers sit here briefly — shown as
/// "testing", never as unavailable.
/// Still waiting for the first probe result. During Smart Location
/// convergence most Lantern servers can sit here briefly; this is unknown,
/// not unavailable.
bool get isAwaitingProbe => isLantern && !hasProbeVerdict;

/// Probed and sustained-failing: failures have passed the warning threshold.
Expand Down
32 changes: 0 additions & 32 deletions lib/core/widgets/server_testing_indicator.dart

This file was deleted.

7 changes: 0 additions & 7 deletions lib/features/vpn/location_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class LocationSetting extends HookConsumerWidget {
final shouldWarnBeforeManualSelection =
isManualLanternLocation &&
selectedServer?.shouldWarnBeforeManualSelection == true;
final isAwaitingProbe =
isManualLanternLocation && selectedServer?.isAwaitingProbe == true;

String title = '';
String value = '';
Expand Down Expand Up @@ -66,8 +64,6 @@ class LocationSetting extends HookConsumerWidget {
value: value.i18n,
subtitle: shouldWarnBeforeManualSelection
? 'server_may_be_unreachable'.i18n
: isAwaitingProbe
? 'server_testing'.i18n
: protocol,
icon: flag.isEmpty ? AppImagePaths.location : Flag(countryCode: flag),
actions: [
Expand All @@ -76,9 +72,6 @@ class LocationSetting extends HookConsumerWidget {
if (shouldWarnBeforeManualSelection) ...[
const ServerReachabilityWarningIcon(),
const SizedBox(width: 8),
] else if (isAwaitingProbe) ...[
const ServerTestingIndicator(),
const SizedBox(width: 8),
],
const SizedBox(width: 8),
IconButton(
Expand Down
2 changes: 0 additions & 2 deletions lib/features/vpn/server_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,6 @@ class _CountryCityListViewState extends State<_CountryCityListView> {
? null
: server.isProbedUnreachable
? const ServerReachabilityWarningIcon()
: server.isAwaitingProbe
? const ServerTestingIndicator()
: null,
tileTextStyle: Theme.of(
context,
Expand Down
2 changes: 0 additions & 2 deletions lib/features/vpn/single_city_server_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class _SingleCityServerViewState extends State<SingleCityServerView> {
? null
: widget.server.isProbedUnreachable
? const ServerReachabilityWarningIcon()
: widget.server.isAwaitingProbe
? const ServerTestingIndicator()
: null,
icon: Flag(countryCode: widget.server.location.countryCode),
onPressed: () {
Expand Down
14 changes: 7 additions & 7 deletions test/core/models/available_servers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void main() {
locations.singleWhere((s) => s.location.city == 'New York'),
nyFast,
);
// A location whose only server has never been probed is "testing", not
// A location whose only server has never been probed is unknown, not
// unreachable — it must not surface the warning during convergence.
final la = locations.singleWhere((s) => s.location.city == 'Los Angeles');
expect(la.isAwaitingProbe, isTrue);
Expand Down Expand Up @@ -87,8 +87,8 @@ void main() {
]).lanternServerLocations;

expect(locations, hasLength(1));
// Even though 'a-failed' sorts first by tag, the still-testing server
// represents the location so it reads as "testing", not "unavailable".
// Even though 'a-failed' sorts first by tag, the untested server
// represents the location so it is unknown, not unavailable.
expect(locations.single.isAwaitingProbe, isTrue);
expect(locations.single.shouldWarnBeforeManualSelection, isFalse);
},
Expand Down Expand Up @@ -228,14 +228,14 @@ void main() {
expect(s.hasSuccessfulProbe, isFalse);
expect(s.hasProbeVerdict, isTrue);
expect(s.hasFailedProbeEvidence, isFalse);
// Has a verdict, so not "testing"; below threshold, so not "unreachable":
// Has a verdict, so not unknown; below threshold, so not "unreachable":
// shown as a normal row, no spinner and no warning.
expect(s.isAwaitingProbe, isFalse);
expect(s.isProbedUnreachable, isFalse);
expect(s.shouldWarnBeforeManualSelection, isFalse);
});

test('untested (no history): testing, never unreachable', () {
test('untested (no history): unknown, never unreachable', () {
final s = _server(tag: 'no-probe');
expect(s.hasSuccessfulProbe, isFalse);
expect(s.hasProbeVerdict, isFalse);
Expand All @@ -244,15 +244,15 @@ void main() {
expect(s.shouldWarnBeforeManualSelection, isFalse);
});

test('history present but no probe verdict: still testing', () {
test('history present but no probe verdict: still unknown', () {
// e.g. a user-traffic-only history with no probe outcome yet.
final s = _server(tag: 'no-verdict', delay: 0, failures: 0);
expect(s.hasProbeVerdict, isFalse);
expect(s.isAwaitingProbe, isTrue);
expect(s.shouldWarnBeforeManualSelection, isFalse);
});

test('private servers never warn or show testing', () {
test('private servers never warn or await probes', () {
final s = _server(tag: 'private', isLantern: false);
expect(s.isAwaitingProbe, isFalse);
expect(s.isProbedUnreachable, isFalse);
Expand Down
Loading