Repository navigation
fix: fold fragment SSR head and production SEO diagnostics - #1045
Merged
domgan-oai merged 3 commits intoSep 11, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
September 10, 2026 23:22
14 of 21 tasks
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
<head>, including streamed scoped styles.Why
<head>.Changes
<head>after SSR block markers, locate its closing tag past quoted child attributes, comments, and script/style text, and preserve the existing document doctype behavior.processfail safely.postcss: ^8.5.28and report the resolved version, without a workspace override.Validation
pnpm sync(no generated diff)pnpm format:files:checkand core/SEO source typecheckstscandtsrx-tscconsumer reproduction fails on PostCSS 8.5.27 and passes on 8.5.28validate publishable packages, including the packed-consumer phase. The local run packed all tarballs but could not install consumers because this host's npm mirror lacks several versions already required bymain(@tsrx/[email protected],@tsrx/[email protected],[email protected]).pnpm test,pnpm typecheck, andpnpm format:check(targeted alternatives above)Risk / follow-ups
<head>/<body>preamble composed into a host-owned<html>is an SSR-only shape; hydrating that fragment as theDocumentroot is not supported. The documented body-root/separate-head path adopts and updates metadata in the hydration regression.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Core SSR head insertion and streaming shell assembly change markup shape for fragment preambles; incorrect
</head>detection could misplace title/meta/link, though new edge-case tests mitigate that.Overview
SSR hoisted metadata now splices into a leading authored
<head>on fragment roots (not only full<html>documents), for buffered and streaming renders. Streaming also places leading scoped styles inside that head; fragment preambles still skip the streaming doctype and injection document-tail mode. Closing</head>is found with a quote-aware scan so false matches inside scripts, styles, and comments do not break folding.@octanejs/seorestructures the stray<Head>diagnostic souseEffectruns only whenNODE_ENV !== 'production', letting production browser bundles drop the warning; hosts withoutprocessskip safely via try/catch. Docs describe fragment-head SSR vs hydrating withheadChannel: 'separate'on a body root.Packed-consumer tooling drops the PostCSS 8.5.26 pin and relies on ^8.5.28. New SSR, hydration, and esbuild production-bundle tests cover the above.
Reviewed by Cursor Bugbot for commit 006531f. Bugbot is set up for automated code reviews on this repo. Configure here.