Skip to content

Manual server updates#8867

Open
jigar-f wants to merge 26 commits into
mainfrom
jigar/manual-server
Open

Manual server updates#8867
jigar-f wants to merge 26 commits into
mainfrom
jigar/manual-server

Conversation

@jigar-f

@jigar-f jigar-f commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and refactors related to server reachability warnings and server list updates in the Lantern app. Key changes include a new reusable warning icon widget, streamlined logic for updating available servers after URL-test events, and improved UI logic for displaying server lists.

UI/UX Improvements:

  • Added a new ServerReachabilityWarningIcon widget for consistent display of server reachability warnings, replacing prior ad-hoc implementations. This widget provides an info icon with tooltip and accessibility support (lib/core/widgets/server_reachability_warning_icon.dart, lib/core/widgets/server_reachability_warning_icon.dartR1-R27).
  • Updated server selection UI to use the new warning icon and improved the logic for displaying reachable and unavailable server sections, especially for Pro users (lib/features/vpn/location_setting.dart, [1]; lib/features/vpn/server_selection.dart, [2] [3] [4] [5] [6].

Codebase Simplification & Refactoring:

  • Removed the now-obsolete server_reachability.dart file and its associated logic, consolidating warning icon usage into the new widget (lib/features/vpn/server_reachability.dart, lib/features/vpn/server_reachability.dartL1-L53).
  • Cleaned up AvailableServersNotifier by removing unused throttle/delay logic and the refreshAvailableServersAfterProbeSettle method, simplifying server refresh operations (lib/features/vpn/provider/available_servers_notifier.dart, [1] [2].

Event Handling and Data Refresh:

  • Added support for a new url-test event type in both the backend (Go) and Flutter layers, ensuring that the UI always reflects the latest server latency data after URL-test runs (lantern-core/core.go, [1] [2] [3]; lib/features/home/provider/app_event_notifier.dart, [4].
  • Updated the server selection screen to always use the simplified forceFetchAvailableServers method after probe events, ensuring up-to-date server information (lib/features/vpn/server_selection.dart, lib/features/vpn/server_selection.dartL44-R43).

Dependency Updates:

  • Updated several Go dependencies to newer versions, including broflake, lantern-box, and sing-tun, and removed some unused or old pion and nats dependencies (go.mod, [1] [2] [3] [4].

These changes collectively improve the reliability, maintainability, and user experience of server selection and reachability warnings in the app.

Copilot AI review requested due to automatic review settings June 16, 2026 13:26
@jigar-f

jigar-f commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Depends on getlantern/radiance#530

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors how server reachability warnings are displayed in the Flutter UI (moving from ad-hoc helpers to a reusable widget), and updates the app’s server-refresh behavior to react to additional backend events (including a new url-test completion event), alongside some dependency churn in the Go module.

Changes:

  • Introduces ServerReachabilityWarningIcon and replaces prior reachability subtitle/icon helpers across server-selection UIs.
  • Simplifies available-servers refreshing by consistently using forceFetchAvailableServers() after relevant events (including new url-test).
  • Adds a Go-side URL-test event listener that forwards url-test events to Flutter.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/features/vpn/single_city_server_view.dart Replaces reachability subtitle/icon helpers with a type subtitle and the new warning icon widget.
lib/features/vpn/server_selection.dart Updates selection UI to use the new icon/widget and changes refresh behavior after probe-related flows.
lib/features/vpn/server_reachability.dart Removes obsolete reachability subtitle/icon helper utilities.
lib/features/vpn/provider/available_servers_notifier.dart Removes probe-settle refresh logic and relies on forceFetchAvailableServers().
lib/features/vpn/location_setting.dart Switches warning icon usage to the new reusable widget.
lib/features/home/provider/app_event_notifier.dart Adds handling for url-test events to refresh available servers.
lib/core/widgets/server_reachability_warning_icon.dart Adds new reusable warning/info icon widget with tooltip + semantics label.
lib/core/common/common.dart Exports the new widget via common exports.
lantern-core/core.go Adds EventTypeURLTest and a listener that forwards URL-test completion events to Flutter.
go.mod Updates module replacements/dependency versions (notably enabling a local radiance replace).
go.sum Updates checksums to match Go dependency changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
Comment thread lib/features/vpn/server_selection.dart Outdated
Comment thread lib/features/home/provider/app_event_notifier.dart Outdated
Comment thread lib/features/vpn/single_city_server_view.dart
Comment thread lib/features/vpn/single_city_server_view.dart Outdated
Comment thread lib/features/vpn/server_selection.dart Outdated
@atavism atavism closed this Jun 16, 2026
@atavism atavism reopened this Jun 16, 2026
@jigar-f jigar-f requested a review from atavism June 17, 2026 15:07
Comment thread lib/features/home/provider/app_event_notifier.dart
Comment thread lib/features/vpn/provider/available_servers_notifier.dart
@jigar-f

jigar-f commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@atavism, all comments addressed.

@jigar-f jigar-f self-assigned this Jun 18, 2026
Base automatically changed from atavism/manual-server to main June 18, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants