Skip to content

feat(connection): less intrusive offline warning - #274

Open
tonyco97 wants to merge 5 commits into
mainfrom
feat/less-intrusive-connection-error
Open

tonyco97 wants to merge 5 commits into
mainfrom
feat/less-intrusive-connection-error

Conversation

@tonyco97

@tonyco97 tonyco97 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Reference:

When the network drops, NethLink covers its whole window with a "No internet connection" dialog. One failed check is enough to show it, so a few lost packets that no other app notices are enough too. The dialog also blocks the window while the user is doing something else. Users still need to know when they can't make or receive calls, but the warning can be lighter.

Threshold before going offline

phone-island checks the internet every 5 seconds. NethLink now marks itself offline only after 3 failed checks in a row (about 10-15 seconds), so short drops no longer show anything. One successful check marks it online again.

Banner instead of the blocking dialog

The dialog in the NethLink window is replaced by a slim amber banner at the top: "No connection: you can't make or receive calls" with a "Retry" link. The window stays usable, and the banner goes away on its own when the connection comes back. The splash screen keeps the dialog.

Tray badge and one notification

While NethLink is offline:

  • the tray icon gets a red dot, and the tooltip says "NethLink - Not connected". On macOS the offline icon can't be a template image (a template is monochrome and would hide the red), so it follows the system theme instead
  • a single system notification is sent when NethLink goes offline, unless the NethLink window is focused (the banner is already there). Nothing is sent when the connection comes back: the red dot simply goes away

No connection alert popping up in the island

The webrtc_down/socket_down alerts used to open the island window in the middle of the screen ("Connection error, click the icon to reconnect"). NethLink now passes the new hideConnectionAlerts prop (nethesis/phone-island#323), so these alerts no longer open the island by themselves. When the island is already open, for example during a call, they are shown as before.

phone-island is temporarily on 1.1.9-dev.1: it will be moved to the release version before merging.

Tests

  • npm run build (typecheck included)
  • With npm run dev, I took the phone-island window offline through the DevTools Protocol (Network.emulateNetworkConditions):
    • offline for 8 seconds: no banner, no badge, no notification
    • offline for 60 seconds: after about 10-15 seconds the banner, the tray red dot and one notification appear, and the island stays hidden; when the connection comes back the banner and the red dot go away, and no other notification is sent

@github-actions

Copy link
Copy Markdown

Automatic builds from https://github.com/NethServer/nethlink/actions/runs/45584841362.
Commit: 147b630

Name Platform Link
win-app.exe Windows (x64) Link
macos-app-x64.dmg MacOS (x64) Link
macos-app-arm64.dmg MacOS (arm64) Link
linux-app.AppImage Linux (x64) Link

@tonyco97
tonyco97 requested a review from edospadoni November 25, 2026 11:05
@tonyco97 tonyco97 self-assigned this Nov 25, 2026
@tonyco97

Copy link
Copy Markdown
Collaborator Author

Test

PR: #274 (with nethesis/phone-island#323, @nethesis/phone-island@1.1.9-dev.1)

Setup: NethLink built from this branch, logged in with a user that has a NethLink extension. To lose the connection, turn off Wi-Fi or unplug the network cable; to get it back, turn it on again. Run the tests on Linux, Windows and macOS, in Italian and in English.

Test Case 1 - Short drop, nothing shown

  • Turn the connection off and back on within 5 seconds: no banner, no red dot on the tray icon, no notification, no island

Test Case 2 - Offline with NethLink closed

  • Close the NethLink window and turn the connection off: after about 10-15 seconds the tray icon gets a red dot
  • One system notification arrives: "NethLink non è connesso" / "NethLink is not connected"
  • Stay offline for at least one minute: no other notification arrives
  • The island ("Errore di connessione" / "Connection error") does not appear on the screen
  • Windows and macOS: the tray tooltip says "NethLink - Non connesso" / "NethLink - Not connected"

Test Case 3 - Offline with NethLink open

  • Open the NethLink window, keep it focused and turn the connection off: after about 10-15 seconds an amber banner appears at the top ("Connessione assente: non puoi ricevere né fare chiamate" / "No connection: you can't make or receive calls"), and no notification arrives
  • The rest of the window is still usable: no blocking dialog, the menu and the tabs still work
  • Click "Riprova" / "Retry" while still offline: the banner stays

Test Case 4 - Connection back

  • Turn the connection back on: within a few seconds the banner and the red dot go away by themselves, with no click
  • No notification arrives when the connection comes back
  • Make a call and receive a call: both work

Test Case 5 - Two outages in a row

  • Repeat Test Case 2 twice: one notification for each outage

Test Case 6 - Calls while offline

  • During a call, turn the connection off: the island stays on the screen and shows the connection error as before
  • With the connection off and no call, start a call from NethLink: the island opens and shows the connection error

Test Case 7 - Tray icon

  • macOS: offline red dot icon visible both with light and dark menu bar; normal icon back when online
  • Windows: change the system theme (light/dark) while offline: the icon keeps the red dot and follows the theme
  • Log out while offline: the tray icon goes back to the normal one

Test Case 8 - Start without connection

  • Turn the connection off and start NethLink: the splash screen shows the "No internet connection" dialog as before
  • Turn the connection on: NethLink logs in and works

Test Case 9 - NethVoice CTI unchanged

This branch has not been deployed

No deployments
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.

1 participant