Skip inserter-hidden Jetpack blocks in catch-all discovery - #3389
Merged
Conversation
1 task
youknowriad
approved these changes
May 8, 2026
lezama
marked this pull request as ready for review
May 8, 2026 11:41
Collaborator
📊 Performance Test ResultsComparing b248647 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
Claude (Opus 4.7) drafted the change and this description. I steered the wording — the comment "kept registered for back-compat" was too narrow, since
supports.inserter: falseis also used for parent-only blocks, programmatic-insert-only blocks, internal blocks, etc. The honest framing is just "the user can't insert these from the editor, so they aren't candidates."Proposed Changes
The Jetpack catch-all rule's discovery one-liner enumerates every
jetpack/*block in the registry. But registered ≠ available in the editor: Jetpack (and other plugins) keep some blocks registered withsupports.inserter: falsebecause they're parent-only, programmatic, or deprecated. Recommending those blocks would have the agent generate markup the user can't reproduce in the editor.This PR adds an
isset/!== falseguard around$b->supports["inserter"]so hidden blocks drop out of the listing, and updates the surrounding sentence to explain why.Testing Instructions
npm run typecheck— passes locally.eval/promptfoo.config.yaml→jetpack-catchall-slideshow. It asserts the agent uses anyjetpack/*block on a slideshow request, which is unaffected by the filter (the slideshow block is inserter-visible).Pre-merge Checklist