HubEvents Module
Central event bus for hub diagnostics and lifecycle signals. The hub publishes discrete events (session-state transitions, engine-speed adjustments, proxy-install step outcomes, scripting-client attach/detach, plain diagnostic lines). Consumers — the status bar, settings diagnostics pane, gRPC `GetSessionStatus` response assembly — observe the `IObservable` projection. Implementation is a single `System.Threading.Channels` pump with a list of subscribed `IObserver`s: the publish side enqueues without blocking, a background task drains the channel and fans out, and a slow observer cannot wedge the producer. No `System.Reactive` dependency.
Types
| Type | Description |
|
Hub-visible admin-channel status (feature 039). Mirrors `FSBar.Hub.AdminChannelHost.AdminChannelStatus` — kept here so `HubEvent.AdminChannelStatusChanged` can reference it without pulling `AdminChannelHost` ahead of `HubEvents` in the compile order. |
|
|
Why a scripting client's `StreamGameFrames` RPC was terminated by the hub (as opposed to a clean client-initiated disconnect). |
|
|
Hub-wide event payload. Equality and comparison are opted out — feature 040 added cases carrying `VizConfig`, whose transitive `ColorScheme.MapValue` function field has no structural equality. Rather than forcing every downstream record to custom-equal, tests compare events by pattern-match + per-field check. |
|
|
The bus instance. Owned by `Program.fs`; constructed once per hub process. Disposing stops the pump task and completes all subscribed observers. |
|
|
Inbound-only handle for modules that publish events. Taking this instead of a full `HubEventBus` reference in constructors makes the data flow unambiguous — modules that only publish cannot accidentally subscribe. |
|
|
Discrete step of the proxy-installation flow, reported via `ProxyInstallProgress`. |
|
|
Coarse session-state tag surfaced by `StateChanged`. Phase 2 scope: `SessionManager` does not yet exist, so this enum captures only the five lifecycle labels the status bar needs to render. Phase 3 enriches the situation by publishing richer context via additional `DiagnosticsLine` events and exposing the full state DU through `SessionManager.State`. |
|
|
Diagnostic-line severity tag surfaced by `DiagnosticsLine`. |
|
|
Outcome of a single `ProxyInstallStep`. |
Functions and values
| Function or value |
Description
|
|
FSBarV1_Archived