You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(bx): invalidate monitor snapshot on box config changes
The Bx status monitor polls every 30 seconds and caches each box's full
status (level, latency, last_checked, ConsoleEnabled, etc.) in an
in-memory snapshot. /bx renders from that snapshot.
Side effect: toggling a per-box setting (Remote console, Enabled, …)
in /settings/boxes did not show on /bx until the next 30s tick. User
report described this as "I had it enabled but it was disabled when we
relaunched" (no shell icon visible) plus "I went back to the box and
confirmed the console feature was checked, it was, but I hit save
again anyway and then back to the Bx dashboard and after a couple
more refreshes, it showed up."
Wiring:
- Add EventTypeBoxConfigChanged ("box.config_changed") + Hub.PublishBoxConfigChanged helper.
- HAProxyBoxUpdatePost and HAProxyBoxTogglePost publish the event
immediately after UpdateBox / SetBoxEnabled returns.
- Bx Gear.Start subscribes to "box.config_changed" via deps.EventHub
and calls monitor.PokeBox(serverID) for the affected box.
- New statusMonitor.PokeBox(ctx, boxID) fetches the row, runs a single
probe, and writes the result via m.set — which also broadcasts to
SSE subscribers, so any open /bx tab updates in place without a refresh.
- PokeBox handles the "box was deleted" case by dropping the stale
snapshot entry instead of leaving last-known-good values for a
now-missing box.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments