Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
AssigneesNone

Relationships

#3661 Dashboard: a hidden tab keeps polling and re-rendering (health stream, live run page)

Opened by swamp_lord · 10/20/2026· Shipped 10/20/2026

Found while triaging swamp-club#3660 (Workers host map leaking d3 transitions in a hidden tab). That leak is fixed separately. This issue covers the remaining work every dashboard page does while document.visibilityState is hidden. It is steady CPU and server load, not memory growth.

Observed (code reading, packages/dashboard/src)

  • App.tsx calls useHealthStream() for every view. The SSE stream at /api/v1/health/stream?interval=5000 stays open while hidden, and each snapshot calls setHealth, which re-renders the whole app shell and the current view every 5 s.
  • Approvals, Overview and RunDetail call useActiveRunsRefetch, so a run starting or finishing on serve triggers their refetches even while hidden.
  • RunDetail polls the run every 2.5 s (LIVE_POLL_MS, usePolling) and ticks a 1 s clock (useNow) while a run is live, without checking visibility. A tab left on a long-running or stuck run polls serve all day. swamp-club#3444 moved run summaries to activity plus coming into view, but not this live poll.
  • PendingSignalsPanel ticks a 1 s clock while it shows held signals.

Expected

A hidden tab does close to nothing: no 5 s re-render, no live-run polling, no clock ticks. It catches up once when it comes back into view. RunActivityProvider already tracks visibility and can drive this.

Notes

The second tab in #3660 (page not identified) used ~40% CPU and 2.1 GB. If it was not on Workers, the memory growth there is still unexplained; this issue explains only CPU.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDTRIAGE+ 2 MOREREVIEW+ 12 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/20/2026, 4:21:40 PM

Click a lifecycle step above to view its details.

03Sludge Pulse

Sign in to post a ripple.