Skip to content

fix: keep a client that is still pinging out of the idle state - #522

Merged
josephfusco merged 2 commits into
mainfrom
fix/idle-state-tracks-write-cadence
Sep 23, 2026
Merged

josephfusco merged 2 commits into
mainfrom
fix/idle-state-tracks-write-cadence

Conversation

@josephfusco

Copy link
Copy Markdown
Collaborator

The idle dot reads date_gmt, but the write skip added in 0.4.0 deliberately holds that value still for far longer than the dot's threshold, so a user pinging every 15 seconds read as idle for most of every cycle.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5

Used for: Assisting with root-causing the failure, implementation, and testing

@github-actions

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🛝 WordPress Playgrounds

Built from 4e09244

5 users 40 users
Single site Launch single site, 5 users Launch single site, 40 users
Multisite Launch multisite, 5 users Launch multisite, 40 users

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.03%. Comparing base (514cd7e) to head (4e09244).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #522      +/-   ##
============================================
- Coverage     96.06%   96.03%   -0.03%     
  Complexity      258      258              
============================================
  Files            21       21              
  Lines          3124     3127       +3     
============================================
+ Hits           3001     3003       +2     
- Misses          123      124       +1     
Flag Coverage Δ
multisite 96.03% <88.88%> (-0.03%) ⬇️
phpunit 71.57% <88.88%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josephfusco
josephfusco force-pushed the fix/idle-state-tracks-write-cadence branch from fce128d to 4e09244 Compare September 23, 2026 12:01
github-actions Bot added a commit that referenced this pull request Sep 23, 2026
@josephfusco

Copy link
Copy Markdown
Collaborator Author

One more commit since the review request: the 15 second TTL margin was spelled out separately in PHP and JS, so it now comes from wp_presence_ttl_margin() and reaches the client through the config that already carries the TTL.

@josephfusco josephfusco added this to the 0.6.0 milestone Sep 23, 2026
@josephfusco
josephfusco merged commit 8e8e324 into main Sep 23, 2026
21 checks passed
@josephfusco
josephfusco deleted the fix/idle-state-tracks-write-cadence branch September 23, 2026 12:13
@josephfusco

Copy link
Copy Markdown
Collaborator Author

Merging ahead of your review to get this into 0.6.0, which goes out today; if anything here looks wrong, say so and it goes in as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Heartbeat 💓 Issues for the heartbeat subsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant