Hub GUI
FSBar.Hub.App is the graphical cockpit wrapping every moving piece in the repo: lobby + session launch, live Skia-rendered map/units, style configurator, unit encyclopedia, bundled-proxy installer, and a localhost gRPC scripting endpoint.
|
Tabs
Tab |
What it does |
|---|---|
Setup |
Map picker + lobby summary + Launch button. Checkboxes for Start paused and Graphical viewer persist in settings. |
Viewer |
Live terrain, metal spots, unit glyphs. Hotkeys: |
Units |
Every unit in |
Style |
Live |
Cfg / BAR |
BAR install diagnostics, bundled-proxy health, one-click Install / Upgrade / Force reinstall. |
gRPC / API |
Scripting endpoint URL (default |
Admin channel
The Hub opens a loopback UDP autohost channel at every launch so pause / resume / engine-speed / force-end / admin message become real engine operations instead of hub-side cosmetic flags. Wire contract: specs/039-hub-admin-channel/contracts/autohost-wire.md.
SessionManager exposes typed admin methods — each returns an AdminChannelHost.SubmitOutcome (Sent / Coalesced n / Rejected reason):
sm.Pause ()
sm.Resume ()
sm.SetEngineSpeed 2.0f
sm.ForceEnd ()
sm.SendAdminMessage "hello"
Status transitions (Attached / Unavailable / Lost) are broadcast as HubEvent.AdminChannelStatusChanged.
Settings
Persisted at $XDG_CONFIG_HOME/fsbar-hub/settings.json. Notable fields:
StartPausedDefault(bool, defaulttrue)LaunchGraphicalViewerDefault(bool, defaultfalse)MaxRenderFrameSubscribers(int, default 8, range 1–32)MaxLogStreamSubscribers(int, default 8, range 1–32)
Schema version is bumped additively on every field addition; older files are upgraded in-place.
State routing
Every tab reads authoritative state through HubStateStore.current store and writes via typed mutators (setVizConfig, setVizAttribute, setActiveTab, setEncyclopedia, setSettings). Rejected mutations emit a single HubEvent.DiagnosticsLine Warning — callers just re-read current and move on.
gRPC endpoint
All hub actions are mirrored on fsbar.hub.scripting.v1 at 127.0.0.1:5021. The Viewer tab's rendered output is available as PNG/JPEG via StreamRenderFrames. Complete examples under scripts/examples/17-*.fsx through 22-*.fsx. See gRPC Scripting.
Bundled proxy
Users get a working proxy on clone — the Hub uses proxy/bundled/<version>/ and proxy/BUNDLED_VERSION automatically. Maintainers refresh it via:
|
CI smoke envs
Var |
Effect |
|---|---|
|
Take a screenshot after a settle delay and exit |
|
Fire Setup.Launch immediately |
|
Extra delay before screenshot |
|
Land on a specific tab |
|
Pre-select a unit on the Units tab |
|
Override bundled-proxy root for dev runs |
FSBarV1_Archived