Enhance Content Summary block detection to nested blocks#810
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #810 +/- ##
==========================================
Coverage 75.50% 75.50%
Complexity 2086 2086
==========================================
Files 99 99
Lines 8626 8626
==========================================
Hits 6513 6513
Misses 2113 2113
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Raised #811 to increase gh action run timeout which was causing the E2E test job to cancel mid-run. |
… Content Summary block
What?
Closes #809
Enhances the Content Summarization experiment to detect Content Summary block inside nested-level blocks.
Why?
It solves the problem of new Content Summary block insertion when we want to regenerate the content summary if existing one is moved inside a nested block level such as inside a Group/Column block.
This PR ensures that the existing Content Summary block is found and edited instead.
How?
The fix is performed by implementing a recursive function named
findSummaryBlock.This function replaces the existing search logic for the Content Summary block.
Additionally fixed a performance issue of the
useSelecthook re-evaluating and running on every single render due to missing dependancy array. This was fixed by adding[]as empty dependancy array.Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity IDE
Model(s): Gemini 3.5 Flash (Low)
Used for: Identifying relevant code file, deciding on implementation for enhancement. E2E test was implemented via it. The performance fix was detected by the model. Final implementation and tests were reviewed and edited by me.
Testing Instructions
Screenshots or screencast
Visual Cues:

Manual Testing Video (from the step of Regenerate Summary click):
Enhancement.Complete.-.Content.Summarization.mov
Changelog Entry