Skip to content

Feat/tray connection status badge - #19

Open
Nishef1 wants to merge 2 commits into
MatinSenPai:mainfrom
Nishef1:feat/tray-connection-status-badge
Open

Feat/tray connection status badge#19
Nishef1 wants to merge 2 commits into
MatinSenPai:mainfrom
Nishef1:feat/tray-connection-status-badge

Conversation

@Nishef1

@Nishef1 Nishef1 commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Make the existing system-tray icon reflect Aether-GUI's backend connection state while preserving the original icon artwork.

The implementation adds a small high-contrast status badge in the lower-right corner and updates the tray tooltip alongside it.

Behavior

  • gray badge — disconnected / Idle
  • orange badge — launching, connecting, reconnecting, or disconnecting
  • green badge — connected
  • red badge — terminal connection error

Changes

  • assign a stable ID to the existing tray icon so it can be updated in place
  • derive badge size from the source icon dimensions so it remains visible at typical tray sizes
  • preserve the existing artwork and draw only a small outlined status dot
  • update the tooltip to Disconnected, Working, Connected, or Connection error
  • sync the tray directly from backend connection-state transitions, including when the main window is hidden
  • add focused tests for lifecycle-to-visual mapping

Why

When the app is minimized to the tray, users should be able to tell at a glance whether the tunnel is connected, working, disconnected, or in an error state without reopening the window.

Keeping the synchronization in Rust avoids depending on a frontend listener or window visibility for tray correctness.

Scope

This PR only visualizes the existing connection state. It does not change the state machine, retry behavior, connection logic, protocol selection, or tunnel implementation.

Validation

  • compared against upstream main at 9ba2ef0: two Rust files changed
  • manually traced all existing status-emission paths to ensure tray updates cover Launching, Connecting, Connected, Reconnecting, Disconnecting, Idle, and Error
  • added tests for the state-to-tooltip/status mapping

A Rust toolchain was not available in the connector environment used to prepare this branch, so cargo fmt, cargo clippy, and Rust tests still need to be run before marking the PR ready.

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