fix: preserve table-rooted hydration paths - #512
Merged
Mohamed Mansour (mohamedmansour) merged 1 commit intoSep 2, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mohamed Mansour (mohamedmansour)
requested review from
Bang Lee (Qusic),
Akrosh Gandhi (akroshg) and
mcritzjam
September 2, 2026 19:05
Bang Lee (Qusic)
approved these changes
Sep 2, 2026
Mohamed Mansour (mohamedmansour)
deleted the
mohamedmansour-webui-menu-hydration-repro
branch
September 2, 2026 20:15
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.
SSR hydration parsed compiled template metadata through a temporary
<div>, which strips table-only roots such as<tr>and corrupts parent-index ownership. In repeated table rows, a same-length reactive update could therefore duplicate conditional custom elements and reparent them directly under<tbody>.This change makes hydration reuse the framework's existing WeakMap-cached
<template>-parsedDocumentFragment, matching the context-preserving tree used for client creation while removing the duplicate parser and cache. Theslot-shadowbrowser fixture now models the affected table/repeat/menu topology and verifies SSR ownership, hydration slot assignment, exact item counts, and reactive condition changes.The regression also reproduces without custom-element definitions, confirming that slots expose the symptom but are not the cause.
Validation
cargo xtask check: passed