Skip to content

Keep source chrome on routes excluded from an extracted shell cluster - #4361

Merged
chubes4 merged 1 commit into
trunkfrom
fix/issue-4347-excluded-route-chrome
Nov 4, 2026
Merged

chubes4 merged 1 commit into
trunkfrom
fix/issue-4347-excluded-route-chrome

Conversation

@chubes4

@chubes4 chubes4 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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 generic page or single key. 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.

ShellExtraction now 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.

  • trunk: RuntimeException: The excluded listing renders its source chrome exactly once: Published by Field Notes
  • this branch: excluded-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):

Route trunk branch
listing page (page-search) footer 0, sidebar 0 footer 1, sidebar 1
home, 3 listing routes, 6 articles unchanged unchanged

Cook gates: composer test:unit and composer lint:php passed.


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.

@chubes4
chubes4 merged commit 7f068e1 into trunk Nov 4, 2026
28 of 29 checks passed
@chubes4
chubes4 deleted the fix/issue-4347-excluded-route-chrome branch November 4, 2026 22:30
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.

Route excluded from an extracted header cluster gets a bare post-content override template and loses footer/sidebar

1 participant