Repository navigation
Keep source chrome on routes excluded from an extracted shell cluster - #4361
Merged
Merged
Conversation
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.
Closes #4347.
What changed
When a dominant header cluster is extracted, a page route outside that cluster is already listed in the header's
excluded_template_slugs, so it needs its own route override template. Frame partitioning could still assign that route to the genericpageorsinglekey. As a result the override that was actually registered was a bare<!-- wp:post-content /-->, while the route's footer/sidebar chrome had already been stripped from its content.ShellExtractionnow assigns any route whose key is excluded from an extracted shell to its own route key. That override therefore receives the route's captured frame, and stripping the content is safe. The change is one assignment rule; nothing is platform-specific.Evidence
Fixture (
tests/unit/excluded-route-shell.php, neutral): six article routes share header B, a listing page plus three paginated listing routes share header A, and every route shares one footer +<aside>region.RuntimeException: The excluded listing renders its source chrome exactly once: Published by Field Notesexcluded-route-shell: ok(Run on the Lab against a fresh clone, with only the test files checked out onto trunk.)
Real capture (the multi-route blog from the issue, compiled through
ArtifactCompiler→toWordPressSitePlanView(), with the resolved template and template parts plus content counted per route):page-search)Cook gates:
composer test:unitandcomposer lint:phppassed.AI disclosure: the fix and test were written by GPT-6.1 Sol (
roadie/cook-heavy) in a Homeboy Cook (agent-task-d4b28dcc). The Cook's publication step timed out at the provider, so Claude (Anthropic) in the Pi coding agent recovered the candidate patch (sha256-verified), published it, and ran the trunk/branch and real-capture verification above.