Skip to content

fix: store no session hash on a post room's one editor row per person - #884

Merged
josephfusco merged 4 commits into
WordPress:mainfrom
huzaifaalmesbah:fix/882-editor-row-session-hash
Oct 22, 2026
Merged

josephfusco merged 4 commits into
WordPress:mainfrom
huzaifaalmesbah:fix/882-editor-row-session-hash

Conversation

@huzaifaalmesbah

Copy link
Copy Markdown
Member

The exception moves into wp_presence_session_hash() through a new optional $client_id, as #867 kept its own there, so the REST response and the stored row always agree; a tab's own row in the same post room still gets its hash.

Fixes #882

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the bug, drafting the fix and its test; reviewed and run locally by me.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🛝 WordPress Playgrounds

Built from a64bd72

Post locks RTC Synced patterns Settings
Single site Launch post locks, single site Launch RTC, single site Launch synced patterns, single site Launch settings, single site
Multisite Launch post locks, multisite Launch RTC, multisite Launch synced patterns, multisite Launch network settings, multisite

@huzaifaalmesbah
huzaifaalmesbah marked this pull request as ready for review October 21, 2026 17:15
@github-actions

github-actions Bot commented Oct 21, 2026 •

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.

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

Props huzaifaalmesbah, iamchitti, joefusco.

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.51%. Comparing base (9527cd6) to head (a64bd72).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #884      +/-   ##
============================================
- Coverage     97.53%   97.51%   -0.03%     
  Complexity      272      272              
============================================
  Files            30       30              
  Lines          4388     4392       +4     
============================================
+ Hits           4280     4283       +3     
- Misses          108      109       +1     
Flag Coverage Δ
multisite 97.51% <85.71%> (-0.03%) ⬇️
phpunit 77.64% <85.71%> (-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.

Comment thread plugins/presence-api/includes/presence.php Outdated
Comment thread plugins/presence-api/tests/test-session-hash.php
github-actions Bot added a commit that referenced this pull request Oct 21, 2026
github-actions Bot added a commit that referenced this pull request Oct 22, 2026

@josephfusco josephfusco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@josephfusco
josephfusco merged commit 83857a2 into WordPress:main Oct 22, 2026
26 checks passed
@josephfusco josephfusco added [Type] Bug An existing feature is broken [Area] Database Issues for the wp_presence table and cron cleanup php Pull requests that update php code labels Oct 23, 2026
@github-actions github-actions Bot added this to the 0.18.4 milestone Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Database Issues for the wp_presence table and cron cleanup php Pull requests that update php code [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A post room's editor row still flips its session hash between two browsers of one person

3 participants