Skip to content

Excerpt Generation: Synchronize generating state across inline and modal buttons - #908

Merged
dkotter merged 2 commits into
WordPress:developfrom
Infinite-Null:fix/consolidate-excerpt-generating-state
Jul 31, 2026
Merged

Excerpt Generation: Synchronize generating state across inline and modal buttons#908
dkotter merged 2 commits into
WordPress:developfrom
Infinite-Null:fix/consolidate-excerpt-generating-state

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What?

Consolidates the excerpt generation status across the inline and modal excerpt generation buttons so that both UI elements reflect the generating state simultaneously.

Why?

Previously, the inline button and modal/panel button each maintained independent isGenerating local component states. If a user clicked the inline button and then opened the modal, the modal button remained enabled, allowing parallel duplicate API generation requests to be triggered. Now, when generation is active from either button, both buttons are disabled and show loading state.

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. Enable the Excerpt Generation experiment in the plugin settings.
  2. Create or edit a post with content longer than 250 characters.
  3. Open the sidebar in the post editor.
  4. Click the inline Generate excerpt button next to the Excerpt link.
  5. Open the Excerpt panel/modal while generation is in progress.
  6. Verify that both the inline button and modal Generate excerpt button display "Generating…", are disabled, and show busy indicators.
  7. Confirm that once generation finishes, both buttons return to normal state and the excerpt is updated.

Screencast

Before

Screen.Recording.2026-07-30.at.3.28.42.PM.mov

After

Screen.Recording.2026-07-30.at.3.25.32.PM.mov

Changelog Entry

Fixed - Synchronized generating state across inline and modal excerpt generation buttons.

Open WordPress Playground Preview

@Infinite-Null
Infinite-Null requested a review from a team July 30, 2026 10:00
@github-actions

github-actions Bot commented Jul 30, 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>

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

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.43%. Comparing base (a1ba294) to head (3e5a3ab).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #908   +/-   ##
==========================================
  Coverage      80.43%   80.43%           
  Complexity      2565     2565           
==========================================
  Files            110      110           
  Lines          10448    10448           
==========================================
  Hits            8404     8404           
  Misses          2044     2044           
Flag Coverage Δ
unit 80.43% <ø> (ø)

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.3.0 milestone Jul 30, 2026
Comment thread src/experiments/excerpt-generation/components/useExcerptGeneration.ts Outdated
@Infinite-Null
Infinite-Null requested a review from dkotter July 31, 2026 12:32
@dkotter
dkotter merged commit 6d2e325 into WordPress:develop Jul 31, 2026
26 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.

2 participants