mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 06:42:12 +03:00
Follow-up to #4054. The Request Logger still froze auto-refresh on some hosts (reported on 3.8.28 Docker, works on 3.8.24). #4054 made the INITIAL visibility fail-open, but the pause is event-driven: a host that fires a one-shot visibilitychange->hidden and then keeps reporting 'hidden' (or recovers without firing the event again) left visibleRef stuck false, so the interval ticked but never polled - only the manual Refresh button worked. The poll tick now also re-checks the LIVE document.visibilityState, and a window 'focus' listener re-arms polling (a focused window is a reliable signal the page is actively viewed). A genuinely backgrounded browser tab still pauses (reports 'hidden' and never receives focus), preserving the #3109 optimization. TDD: two new jsdom regression tests (RED on current release, GREEN after); the existing 'pause on real background' test stays green.