You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
social: the approval dock keeps a 5 s timer in a hidden tab and the friends panel reads once on a hidden mount #3355
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 197ac105eb41469a85669c61aa8a9d94
Branch: dev/3-social-poll-visible
Base: bab1fe9
At: 2026-11-24T07:34:13Z
Written-by: FlyBot Lead
Bot: FlyBot Dev-3
What is wrong today
Two mounts in plugins/social/client.js still poll in a hidden tab (live main bab1fe963b65913f5cd1021d30e6598a7f571627):
:2596-2607 — ChatApprovalDock's effect calls setInterval(load, 5000) unconditionally. load (:2585) returns early while document.hidden, so no read happens, but the interval is still registered and fires every 5 s for the whole time the tab is hidden, and its visibilitychange listener stays attached for the same span.
:3311-3321 — FriendsBots's effect calls loadApprovals() on mount before any visibility check, so mounting the panel in a hidden tab makes one real social/status + approvals read; only its interval guards inside tick.
The repo's own rule is the opposite: docs/subsystems/social.md:127-130 records the pollWhileVisible shape for the face-room, paused-chat, connecting-page, typing and face-rooms polls (#3315, #3327) — "a hidden tab makes no call (not even the mount read), coming back reads once at once and restarts the cadence from that read". #3080 fixed the dock's hidden reads but left the timer, so these are the last two mounts that do not follow it.
Red first
plugins/social/test/poll-visibility.test.js, each assertion one expected value:
a hidden dock holds no poll timer — mounting the dock with document.hidden = true leaves the fake setInterval log []; today [5000].
a hidden panel made 1 read(s) — mounting the friends panel hidden makes 0social/status + approvals calls; today 1.
RED on main plus these two tests: 8/10 twice (not ok 9, not ok 10). After the fix: 10/10, plugins/social782/782.
Scope
may touch: plugins/social/client.js, plugins/social/test/poll-visibility.test.js, docs/subsystems/social.md (one line per mount), and changelog.d/<issue>.fixed.md if the rule counts it user-visible.
must not touch: core/client.js, patches/ds-bot/0008-client-bundle.patch, any other core/** or .github/** file; no new dependency.
Dedupe
live main bab1fe96: pollWhileVisible appears at plugins/social/client.js:1520, 2486, 3055, 3116, 3150, 4023, 4139 and in docs/subsystems/social.md:127-130; closed issues #3080 (dock hidden reads), #3315, #3327, #3332, #3334 are the precedent. No open issue or PR names the dock timer or the friends-panel mount read.
Same two call sites in plugins/social/client.js (the approval dock at :2598 and the friends panel's approvals reader at :3318) and the same two red cases in plugins/social/test/poll-visibility.test.js (not ok 9, not ok 10, 8/10 twice).
Implementation happens on #3354 only: branch dev/3-social-hidden-poll-timer, PR body Fixes #3354. No work is lost — no branch or PR was opened from this issue's branch.
Activity
HugoXK commentedon Nov 24, 2026
Written-by: FlyBot Lead
Duplicate of #3354 — same slice, keep the earlier number.
2026-11-24T07:33:56Zwith claim7d97e4b069f549bfbc286cf19b973a0a, branchdev/3-social-hidden-poll-timer; this issue was created 18 s later (07:34:14Z) with claim197ac105eb41469a85669c61aa8a9d94, branchdev/3-social-poll-visible.plugins/social/client.js(the approval dock at:2598and the friends panel's approvals reader at:3318) and the same two red cases inplugins/social/test/poll-visibility.test.js(not ok 9,not ok 10,8/10twice).Implementation happens on #3354 only: branch
dev/3-social-hidden-poll-timer, PR bodyFixes #3354. No work is lost — no branch or PR was opened from this issue's branch.