Skip to content

perf(ui): pause hidden Window collaboration polling - #700

Merged
yyjeqhc merged 3 commits into
yyjeqhc:mainfrom
youxiaohou:perf/pause-hidden-collaboration
Sep 26, 2026
Merged

yyjeqhc merged 3 commits into
yyjeqhc:mainfrom
youxiaohou:perf/pause-hidden-collaboration

Conversation

@youxiaohou

Copy link
Copy Markdown
Contributor

The Activity workbench keeps its Collaboration panel mounted to preserve composer state, but the hidden panel was still fetching messages every three seconds.

Pass tab visibility into the collaboration hook. Pause polling and abort transcript reads while either the panel or browser page is hidden; refresh immediately on return. Keep drafts and exact retry payloads mounted, and allow already-started sends to settle while hidden. Request identity guards prevent an aborted read from clearing or overwriting a newer request. Update the polling documentation and regenerate the checked-in Runtime V2 bundle (the larger generated diff includes minifier identifier changes).

Validation:

  • The new hidden-panel regression failed before the fix (four requests during nine hidden seconds).
  • 23 focused tests passed across window-collaboration.test.tsx and window-first-work.test.tsx, including workbench wiring, visibility changes, aborted late responses, draft retention, and an in-flight uncertain send retried with the same payload.
  • npm --prefix frontend run typecheck passed.
  • Runtime V2 bundle build and --check passed.
  • git diff --check passed.

No production service was started or changed; browser behavior was verified with component tests rather than a live end-to-end session.

@yyjeqhc
yyjeqhc enabled auto-merge (squash) September 26, 2026 16:00
@yyjeqhc
yyjeqhc disabled auto-merge September 26, 2026 16:12
@yyjeqhc
yyjeqhc merged commit 5356924 into yyjeqhc:main Sep 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants