Synthesize template parts only from separable chrome - #678
Open
chubes4 wants to merge 1 commit into
Open
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.
Summary
When the Blocks Engine plan emits no template parts, SSI synthesizes header/footer parts from source HTML landmarks. That fallback previously:
<nav>as the global header purely via class-name signal, producing a nav-only header part while the page body kept its full embedded header (duplicate chrome)first_landmark_html, which grabbed any<header>/<footer>regardless of nesting — including chrome embedded inside<main>that the page body always renders itselfSingle-root documents (e.g. Figma-transformer output, where every landmark lives inside
main.figma-root) therefore rendered chrome twice: once from the synthesized part and once from the page body — and the part could come from the wrong page variant entirely.Changes
<main>. Applies to the document fragment decomposition (header, nav, footer) and thefirst_landmark_htmlfallback.entry_paththrough to materializer artifacts.Measured impact
Three-fixture production matrix (Fisiostetic, FSE Pilot Build Theme, Twenty Twenty-Five Community
.figtransforms), front-page visual mismatch vs the served static source at threshold 0:Editor gate unchanged and fully green in the same runs: 727/727 native blocks, 0
core/html, 0 invalid, 365/365 browser-validated blocks.How to test
php tests/smoke-embedded-chrome-template-parts.php— 17 assertions: embedded chrome produces no parts and stays in the page body; classic body-level chrome still produces parts; entrypoint page wins over alphabetically-earlier files; nested-chrome entrypoint falls through to the next separable page.php tests/smoke-template-part-shell-dedupe.phpphp tests/smoke-template-chrome-dedupe.phpphp tests/smoke-theme-materializer-dry-run.phpphp tests/smoke-semantic-parity-diagnostics.phpphp tests/smoke-wordpress-site-plan-materializer.phpAll pass locally.
AI disclosure
Implemented with OpenCode using
openai/gpt-5.6-sol; all listed tests were run locally.