diff --git a/internal/app/archieui/compose_test.go b/internal/app/archieui/compose_test.go index 1f899a33e..cd36972a0 100644 --- a/internal/app/archieui/compose_test.go +++ b/internal/app/archieui/compose_test.go @@ -82,7 +82,6 @@ func TestComposeUIServerHoldsNoDaemonState(t *testing.T) { "RunningVersions": srv.RunningVersions, "Events": srv.Events, "Curators": srv.Curators, - "Channels": srv.Channels, "LogFeed": srv.LogFeed, "WorkRequests": srv.WorkRequests, } @@ -91,6 +90,14 @@ func TestComposeUIServerHoldsNoDaemonState(t *testing.T) { t.Errorf("%s is wired; it is a daemon-owned callback or runtime handle with no contract behind it yet", name) } } + // Channels is the same shape as Mappings/Bindings below: the field used to + // hold a live *status.Manager, which is a runtime handle this process has no + // business owning, and it now holds a reader over the State Store's + // channel-status contract (webui.RemoteChannelStatus). The distinction the + // guard draws is the handle, not the name. + if srv.Channels == nil { + t.Error("Channels is unwired; the channel-status pair is a State Store contract the composed client implements") + } // Mappings and bindings are the other way round: ratified State Store // contracts, carried by the client this process already holds, so // leaving them nil would degrade two pages that have an owner. diff --git a/internal/webui/api_config.go b/internal/webui/api_config.go index a6aeb9c38..25e64115e 100644 --- a/internal/webui/api_config.go +++ b/internal/webui/api_config.go @@ -447,14 +447,12 @@ func (r remoteChannelStatus) Snapshot() []status.Status { out := make([]status.Status, 0, len(rows)) for _, row := range rows { out = append(out, status.Status{ - Descriptor: status.Descriptor{ - ID: row.ID, - Name: row.Name, - Configured: row.Configured, - ReloadSupported: row.ReloadSupported, - Detail: row.Detail, - }, - State: status.State(row.State), + ID: row.ID, + Name: row.Name, + Configured: row.Configured, + ReloadSupported: row.ReloadSupported, + Detail: row.Detail, + State: status.State(row.State), }) } return out