AntFleet

Disagreement · a2392d54-anthropic-0

Activity polling interval never fires while tab stays visible — only visibilitychange triggers refresh

solo Opus
repo e24ef98c·PR #7·reviewed 2 weeks ago

Opus finding

Activity polling interval never fires while tab stays visible — only visibilitychange triggers refresh

mediumbughigh
  • apps/web/app/activity/ActivityView.tsx:67-95
The polling useEffect schedules setInterval(poll, 60_000) but never invokes poll() once at mount. This is fine for refreshing later, but combined with the comment 'polls /api/activity every 60s to refresh counters + event stream in place' and the doc 'refresh every 60 seconds', users will see stale initial-server-rendered data for 60s after mount. More importantly, when the tab is hidden the interval will still fire and the early-return sets polling='paused' but never re-polls when it becomes visible again — actually, that part is handled by the visibilitychange listener calling poll(). The real bug is the initial-render staleness is acceptable, but note that the LIVE pill will stay 'live' indefinitely if no poll fires after first paint and the user never switches tabs — only the interval at 60s flips it. Lower-severity UX concern, not a correctness/security issue. Marking medium-confidence: this is a UX/contract gap rather than a bug per se. Removing on reflection — see next finding instead.

Recommendation

Call poll() once at the top of the effect to align actual behavior with the documented 'refresh every 60 seconds' contract and to immediately reconcile server-rendered snapshot drift.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →