Skip to content

Fix: Meta description cancel generation - #1128

Merged
dkotter merged 3 commits into
WordPress:developfrom
Infinite-Null:fix/meta-description-cancel-generation
Oct 7, 2026
Merged

dkotter merged 3 commits into
WordPress:developfrom
Infinite-Null:fix/meta-description-cancel-generation

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What?

Stops meta description generation and immediately resets the "Generate Meta Description" button's loading state when canceling or closing the modal while a generation request is in progress.

Why?

When a user clicks "Generate Meta Description", the modal opens and the sidebar button transitions to a loading state (Generating…, disabled, and busy). Previously, if the user clicked "Cancel" (or closed the modal) while the request was in progress. The modal closed, but the request continued.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 4.6
Used for: Validating bug, suggesting a fix.

Testing Instructions

  1. Ensure the Meta Description Generation experiment is enabled (Settings > AI > Experiments).
  2. Create or edit a post and add enough content (at least 250 characters) so the meta description feature becomes available.
  3. Open the Meta Description panel in the document sidebar.
  4. Click Generate Meta Description.
  5. While the request is in progress (the panel button displays Generating… with a loading spinner and the modal is open), click the Cancel button in the modal.
  6. Verify that:
    • The modal closes immediately.
    • The sidebar button stops loading immediately, reverts from Generating… back to Generate Meta Description, and becomes enabled.

Screenshots or screencast

Before:

Screen.Recording.2026-10-06.at.9.05.41.PM.mov

After:

Screen.Recording.2026-10-06.at.9.04.16.PM.mov

Changelog Entry

Fixed - Ensure canceling meta description generation stops the loading state.

Open WordPress Playground Preview

@Infinite-Null
Infinite-Null requested a review from a team October 6, 2026 15:36
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>

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

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.67%. Comparing base (f52eb36) to head (749a791).
⚠️ Report is 19 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #1128      +/-   ##
=============================================
+ Coverage      81.53%   81.67%   +0.13%     
- Complexity      3071     3103      +32     
=============================================
  Files            129      129              
  Lines          12253    12334      +81     
=============================================
+ Hits            9991    10074      +83     
+ Misses          2262     2260       -2     
Flag Coverage Δ
unit 81.67% <ø> (+0.13%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@dkotter dkotter added this to the 1.5.0 milestone Oct 6, 2026
@Infinite-Null

Copy link
Copy Markdown
Contributor Author

Hi @dkotter, Thanks for the review! I've updated the PR to address both comments. Could you please have another look when you get a chance?

@dkotter
dkotter merged commit 775f152 into WordPress:develop Oct 7, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants