Skip to content

Channel list doesn't refresh when channels are removed/added on gateway #55

Closed

Description

@shanselman

Problem

When a channel is removed or disabled on the gateway server (e.g., removing a Discord channel config), the Windows tray UI continues showing the channel with its last known status (green/red dot). There's no mechanism to detect that a channel has been removed — only status changes for existing channels are tracked.

Current behavior

  • Channel list is refreshed on health check (every 30 seconds)
  • Health check returns the current set of channels from channels.health
  • But the UI merges/updates the existing list — it doesn't detect removed channels

Expected behavior

  • If a channel disappears from the gateway's channels.health response, it should be removed from the UI
  • If a channel is added on the gateway, it should appear in the UI on the next health check
  • The tray menu and Status Detail window should both reflect the current set

Suggested approach

Compare the incoming channel list with _lastChannels on each health check update:

  • Channels in the response but not in _lastChannels → add
  • Channels in _lastChannels but not in the response → remove
  • Replace the full list rather than merging

This should be a small change in App.xaml.cs where ChannelHealthUpdated is handled.

Activity

  1. added
    enhancement
    on Mar 17, 2026
  2. github-actions commented on Mar 17, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    Good catch! I dug into the code and found two distinct root causes:

    1. Empty channel list is silently dropped (OpenClawGatewayClient.cs)

    ParseChannelHealth has a guard if (healthList.Count > 0) that suppresses the ChannelHealthUpdated event when the gateway returns an empty channel object. This means removing the last channel never clears _lastChannels.

    2. Open StatusDetailWindow never receives live updates (App.xaml.cs)

    OnChannelHealthUpdated does _lastChannels = channels (which is a full replacement — added/removed channels are handled correctly for the tray menu), but it never pushes the new list to an already-open StatusDetailWindow. The window only gets refreshed when the user reopens it.

    I've created a PR that fixes both issues — see the linked draft PR.

    Generated by Repo Assist · ◷

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64
    
  3. locked as resolved and limited conversation to collaborators on May 29, 2026
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

    enhancement

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions