- Shipped
- 6 أغسطس 2026 في 12:39 م UTC
- صاحب البلاغ
- kamo
- Commit
- 5b708bb
Fifteen network polls across the app, replaced with the events that were already happening or with events added to the services that own the state. Mail — the folder tree, conversation list and message list each ran their own 30s timer. EmailService now publishes a mailbox-change event for arrival, flag changes, moves, deletes, expunges, sends and drafts, so all three reload when the mailbox actually changes. That also fixes what the timers were papering over: reading a message in another client used to leave these views wrong for up to 30 seconds, and a change made outside this app produced no notification at all. Support badge — dropped a 60s fetch of the pending count that sat next to a STOMP client already receiving the authoritative count on **************** The fetch now runs on mount and reconnect only, covering the gap before the subscription is live. Presence — dropped the 120s bulk re-fetch. PresenceService broadcasts the offline transition when a grace period expires, so /topic/presence already carries it; the reconciling fetch stays where it can actually differ, on connect and on tab focus. Platform admin — the trainer tab (4s), DNS provisioning (15s), commerce sync logs (30s), VOIP recording stats (30s), diagnostics (30s) and the domain setup page (60s) are backed by SecurityService, which has no WebSocket. It now publishes to NATS and MediaService relays to STOMP; useMediaTopic is the browser end. One shared SockJS connection, reference counted — several of these can be mounted at once and three sockets to carry three small JSON messages is not a trade worth making. Two of those are honest about what they are. VOIP recording counts are sampled server-side because the rows are written by another service, but published only on change, so a quiet backlog is silent. Diagnostics gets a bare server tick, because uptime and memory differ every second and there is no discrete change to push — the point is one timer on the server rather than one per open tab pulling the full snapshot, and the tab now skips the fetch entirely while hidden. The domain setup page's countdown ring went with its timer; the hero now says it is monitoring, which is what the server-side watcher is doing. Universe live — the SSE route re-sent the whole merged state to every connected browser every 3 seconds. Beacons already arrive every 1-3s per pod and each one emits, so the re-send only ever mattered for pods that had gone silent. worldLiveNats schedules one timer for the exact moment the next pod ages out and emits only if pruning actually removed something. Deleted useSyncEngine: a complete IndexedDB delta-sync engine polling at 30s, with no callers anywhere in the repo.