Skip to content

fix(runtime): preserve SSR default-slot content during hydration - #6966

Open
Elements2720 wants to merge 3 commits into
stenciljs:mainfrom
Elements2720:fix/ssr-slot-hydration
Open

Elements2720 wants to merge 3 commits into
stenciljs:mainfrom
Elements2720:fix/ssr-slot-hydration

Conversation

@Elements2720

@Elements2720 Elements2720 commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

  • recognize SSR s-sn attributes while collecting non-shadow slotted nodes
  • preserve nested default-slot content when the wrapper hydrates before its owning host
  • ignore serialized slot-fb fallback nodes owned by another host
  • preserve explicit slot attributes over serialized slot metadata
  • add regression coverage for all three hydration boundaries

Fixes #6934

Tests

  • npm run build -- --ci
  • Runtime Jest suites: 52 suites, 357 tests passed
  • Focused hydration suites: 3 suites, 20 tests passed
  • Targeted ESLint and Prettier checks passed
  • git diff --check passed

The full Jest suite has one unrelated existing failure in src/compiler/output-targets/dist-lazy/test/generate-lazy-module.spec.ts; repository-wide lint also reports pre-existing errors outside this change.

@Elements2720
Elements2720 requested a review from a team as a code owner October 19, 2026 22:55

This branch has not been deployed

No deployments
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.

bug: SSR content rendered into another non-shadow component's default slot is hidden after hydration (regression in 4.41.0)

1 participant