Automattic / Automattic/jetpack

[Boost] Use WordPress heartbeat API for slow polling

Open
#24,405 0 comments 0 reactions 0 assignees View on GitHub
[Boost Feature] Cloud CSS [Plugin] Boost
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

The Cloud CSS UI polls the back end for updates at two rates:
- Rapidly while CSS is being generated, to ensure updates are displayed quickly, and
- Slowly while CSS is not being generated to ensure UI consistency across browser tabs.

In the latter case, we should use the [WordPress heartbeat API](https://developer.wordpress.org/plugins/javascript/heartbeat-api/) to avoid adding unnecessary network traffic to users' Jetpack Boost settings page.

It still makes sense to actively poll while generation is ongoing, but any passive UI consistency polling should be done via WP Heartbeat.

Contributor guide

Open the contributing guide

Research direction

Start with the Cloud CSS UI's two polling modes and read the linked WordPress Heartbeat API documentation. Preserve active polling during CSS generation, replace only passive UI-consistency polling with heartbeat updates, and verify that browser tabs still stay consistent without unnecessary requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.