archie-ui: one upstream control-plane watch per kind, shared by every client #1429
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#1429
Reference in new issue
Block a user
handleControlPlaneWatch opens a gRPC Watch to the State Store per browser stream, so N tabs x 14 kinds = 14N upstream streams. archie-ui should hold one Watch per kind for the life of the process (reusing keepWatch's backoff rules, internal/app/archied/control_plane_watch.go, and the rule that an accepted stream is not a healthy one) and fan updates into the multiplexed client hub. A client connecting late gets the current value of each kind from the hub's last-seen cache, not a new upstream call.
Acceptance criteria
Upstream Watch count is independent of client count, proved by a test driving the real controlplane.Server over bufconn with several clients.
Close reason
Fixed in
93446477(PR #995): internal/webui/live_hub.go holds one upstream watch per topic and fans it out to every client over a single multiplexed /api/stream.Imported from beads
archie-core-l23o· GitHub #1001 · type task · priority P1 · created 2026-09-25 · closed 2026-09-26