Skip to content

System tray's Upstream Server count for active does not match what the submenu show #187

Closed

Description

@technicalpickles

The upstream menu says 4/15 up, but if you look at the submenu, most of them are online:

Image

On the web control panel, it shows the same count, 4/15, but some servers the tray show as green are in fact disconnected:

Image

Something I noticed while working on #165 is that there's at least 3 places that show state, and it is hard to keep them in sync:

  • the system tray
  • the cli
  • the web control panel

Activity

  1. Dumbris commented on May 1, 2026

    @Dumbris
    Member

    This was caused by a lock-ordering issue in the supervisor that let the stateview snapshot drift from the actual upstream manager state — under concurrent reconciliation, stateMu was held while calling methods that needed manager.mu, which dropped runtime events and froze the snapshot.

    Fixed by:

    • Pre-fetching GetAllStates() and IsUserLoggedOut() before acquiring stateMu.Lock() in supervisor.reconcile()
    • Rebuilding updateSnapshot() from live manager states (not stale snapshot)
    • Lowercasing state strings in stateview so the health calculator normalises correctly

    The system tray, web UI, and CLI all read from the same stateview snapshot now, so the count and submenu can no longer disagree.

    Closing — please reopen if you still see drift on v0.29.2+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions