Repository navigation
fix(runtime): adopt annotated scalar text runs - #2063
Closed
domgan-oai wants to merge 1 commit into
Closed
domgan-oai wants to merge 1 commit into
domgan-oai wants to merge 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
October 14, 2026 20:27
domgan-oai
marked this pull request as draft
October 14, 2026 20:34
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
adoptBindingsrejects scalar text leaves containingText + Comment + CommentorText + FONT, even when their surrounding element tree matches. Merely accepting those nodes would leave another bug: updates write only the first child'snodeValue, leaving stale suffixes or writing invisibly into a comment.Accept Text, Comment and HTML FONT runs inside compiler-proven scalar text hosts, and publish changes to the complete run. Initial FONT translation remains untouched; initial text/comment-only content synchronizes with the source. Element order, tag, namespace and closed-child checks outside those leaves remain strict.
Validation
syncgenerators ran successfully using the existing installed tools directly; no generated tracked changes remained.perf-reviewscanner: no findings. Validation scans text children once during adoption; the writer retains the lone-Text path and introduces no state, allocation or scheduling mechanism.concise-code: runtime +19/-13 lines; no new exports, options or runtime modules. Validator-only repair was rejected because it leaves stale text; a persistent run representation was unnecessary because existing previous-value state and DOM primitives suffice.[email protected]minimum-release-age registry-manifest failure; no policy was relaxed. Focused validation used the already installed core 0.5.5 / oxc 0.20.0 toolchain.Risk / follow-ups
The browser fixtures reconstruct DOM mutations; they do not identify a native translator or extension as the mutator. Arbitrary HTML wrappers and extra elements outside scalar text leaves remain rejected. Comments between fixed elements remain mismatches. This change is not deployed.
Provenance
agent-authored)Originating Codex task, host
com-79386.Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Changes core deferred-hydration text binding adoption and update paths; behavior shifts for annotated or translated scalar leaves, though scope is limited to compiler-proven text hosts with expanded tests.
Overview
Scalar DOM binding adoption now treats text leaves as runs of
Text,Comment, and HTML<font>nodes instead of rejecting anything beyond a single text node or lone translator wrapper.Adoption keeps those runs intact when the bound value already matches (including translated
<font>trees), but syncs comment-only or mismatched text to the initial snapshot. Updates replace the entire run viatextContentso partialnodeValuewrites cannot leave stale suffixes or update invisible comment nodes. Element topology checks outside these leaves stay strict (non-HTML<font>, mixed elements like<b>still fail).Docs and tests cover fixed and addressed views, pre/post-adoption rewrites, and unchanged-value publishes.
Reviewed by Cursor Bugbot for commit 5cad57c. Bugbot is set up for automated code reviews on this repo. Configure here.