perf(web): pause dashboard refresh when inactive #44

Merged
vince merged 1 commit from codex/dashboard-client-lifecycle into main 2026-06-20 13:54:13 +02:00
Owner

Summary

Adds a client-side dashboard refresh lifecycle helper and wires the app refresh loop through it.

Why

Hidden or offline browser tabs should not keep polling dashboard shell and tile endpoints, and stale in-flight requests should be cancelled when a newer refresh starts.

Changes

  • Pause dashboard refreshes when the document is hidden or the browser is offline.
  • Resume with an immediate dashboard refresh when the page becomes visible or online again.
  • Abort active shell and tile hydration fetches on pause, pagehide, unmount, or a newer shell refresh.
  • Add unit coverage for pause decisions, abort behavior, and lifecycle event wiring.

Testing

  • bun run check
  • bun run test
  • Independent review: no blocking findings after lifecycle coverage was added.

Notes

  • packages/ui is untouched.
  • Tile scheduling, caching, persistence, and adaptive hydration remain for later roadmap PRs.
## Summary Adds a client-side dashboard refresh lifecycle helper and wires the app refresh loop through it. ## Why Hidden or offline browser tabs should not keep polling dashboard shell and tile endpoints, and stale in-flight requests should be cancelled when a newer refresh starts. ## Changes - Pause dashboard refreshes when the document is hidden or the browser is offline. - Resume with an immediate dashboard refresh when the page becomes visible or online again. - Abort active shell and tile hydration fetches on pause, pagehide, unmount, or a newer shell refresh. - Add unit coverage for pause decisions, abort behavior, and lifecycle event wiring. ## Testing - bun run check - bun run test - Independent review: no blocking findings after lifecycle coverage was added. ## Notes - packages/ui is untouched. - Tile scheduling, caching, persistence, and adaptive hydration remain for later roadmap PRs.
vince added 1 commit 2026-06-20 13:53:58 +02:00
vince merged commit 83c2c0f4a4 into main 2026-06-20 13:54:13 +02:00
Sign in to join this conversation.
No description provided.