Skip to content

fix: warn an open screen when a REST request saves what it shows - #868

Merged
josephfusco merged 5 commits into
WordPress:mainfrom
i-am-chitti:fix/856-rest-settings-stale-screen
Oct 20, 2026
Merged

josephfusco merged 5 commits into
WordPress:mainfrom
i-am-chitti:fix/856-rest-settings-stale-screen

Conversation

@i-am-chitti

Copy link
Copy Markdown
Collaborator

REST user updates always call wp_update_user(), even when the block editor only saves its preferences as meta, so users get their own rest_after_insert_user check that skips meta-only requests instead of letting profile_update count REST saves. Checked by hand on single site in Chrome, including that toggling editor preferences and saving posts show no banner.

Fixes #856

Screencast

Screen.Recording.2026-10-20.at.10.11.48.PM.mov
Screen.Recording.2026-10-20.at.10.14.37.PM.mov
Screen.Recording.2026-10-20.at.10.18.44.PM.mov
Screen.Recording.2026-10-20.at.10.20.16.PM.mov
Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with reproducing the bug, the fix and its tests; manual verification was done by me.

@i-am-chitti i-am-chitti self-assigned this Oct 20, 2026
@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 iamchitti, huzaifaalmesbah.

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

@github-actions

Copy link
Copy Markdown
Contributor

🛝 WordPress Playgrounds

Built from 5e6925d

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

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.53%. Comparing base (d91654a) to head (5e6925d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #868      +/-   ##
============================================
- Coverage     97.55%   97.53%   -0.02%     
  Complexity      272      272              
============================================
  Files            30       30              
  Lines          4378     4388      +10     
============================================
+ Hits           4271     4280       +9     
- Misses          107      108       +1     
Flag Coverage Δ
multisite 97.53% <93.33%> (-0.02%) ⮇ïļ
phpunit 77.64% <93.33%> (+0.02%) ⮆ïļ

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 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.

Thanks Deepak!

@josephfusco
josephfusco merged commit 835ed04 into WordPress:main Oct 20, 2026
29 checks passed
@github-actions github-actions Bot added this to the 0.18.3 milestone Oct 20, 2026
@josephfusco josephfusco added [Type] Bug An existing feature is broken [Area] Admin UI Issues for the admin UI integrations php Pull requests that update php code javascript Pull requests that update javascript code labels Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Admin UI Issues for the admin UI integrations javascript Pull requests that update javascript code 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 setting saved through the REST API never warns someone with its Settings screen open

2 participants