fix: turn the tray icon off when the tunnel dies on its own #102

Merged
mysticalsoap merged 1 commit from fix/tray-off-icon into trunk 2026-08-20 19:37:13 -04:00
Owner

Problem

Only kill() — the user clicking disconnect — reset the tray icon to aqomui_off. When openvpn exited for any other reason (ping-restart exhaustion, killed process, service restart), tunnel_terminated only hid the active-server widget: the tray kept the colored icon, claiming a connection that no longer existed. The tray tooltip likewise read "Status: disconnected" forever, since only kill() ever set it.

Fix

tunnel_terminated resets the icon, the tooltip, and tunnel_active itself — guarded on tunnel_active == 1, so the stale termination of a server switch (where kill() already ran, tunnel_active is 0, and the icon belongs to the connection now being established) leaves the tray alone. connection_established sets the tooltip to the connected server's name.

Verification

Two new stub-based tests in tests/test_aqomui_gui.py: the tunnel dying on its own turns the icon off (and resets tunnel_active); the stale termination of a server switch leaves the icon and tooltip untouched. Full suite: 171 passed.

Closes #69

🤖 Generated with Claude Code

**Problem** Only `kill()` — the user clicking disconnect — reset the tray icon to `aqomui_off`. When openvpn exited for any other reason (ping-restart exhaustion, killed process, service restart), `tunnel_terminated` only hid the active-server widget: the tray kept the colored icon, claiming a connection that no longer existed. The tray tooltip likewise read "Status: disconnected" forever, since only `kill()` ever set it. **Fix** `tunnel_terminated` resets the icon, the tooltip, and `tunnel_active` itself — guarded on `tunnel_active == 1`, so the stale termination of a server switch (where `kill()` already ran, `tunnel_active` is 0, and the icon belongs to the connection now being established) leaves the tray alone. `connection_established` sets the tooltip to the connected server's name. **Verification** Two new stub-based tests in tests/test_aqomui_gui.py: the tunnel dying on its own turns the icon off (and resets `tunnel_active`); the stale termination of a server switch leaves the icon and tooltip untouched. Full suite: 171 passed. Closes #69 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: turn the tray icon off when the tunnel dies on its own
All checks were successful
ci / test (pull_request) Successful in 33s
ci / test (push) Successful in 1m1s
61cd4a5cb5
Only kill() -- the user clicking disconnect -- reset the tray icon, so
openvpn exiting for any other reason (ping-restart exhaustion, a killed
process, a service restart) left a colored tray icon claiming a
connection that no longer existed. tunnel_terminated now resets the
icon, tooltip and tunnel_active itself, guarded on tunnel_active so the
stale termination of a server switch -- where kill() already ran and a
new connection is being established -- leaves the icon alone.

The tooltip also now reports the connected server; it read
"Status: disconnected" forever, since only kill() ever set it.

Closes #69

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mysticalsoap deleted branch fix/tray-off-icon 2026-08-20 19:37:13 -04:00
Sign in to join this conversation.
No description provided.