Repository navigation
fix: remove browser-translation DOM accommodations - #2065
Merged
trueadm merged 1 commit intoOct 14, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
October 14, 2026 20:59
Contributor
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)
2 other measured values are unchanged. Public-import reachability bundles (bytes)
48 other measured values are unchanged. |
trueadm
added a commit
that referenced
this pull request
Oct 15, 2026
Brings in #2047-#2051 (Strong literal stabilisation), #2054 (checked compiled boundaries and a compiled router entry), #2055/#2057 (Strong rejects descriptor APIs and .tsx/.jsx), #2056/#2060/#2061 (CLI Strong reports), #2062 (Strong in the website and devtools), #2065 (no browser-translation DOM accommodations) and Version Packages. Conflicts, resolved so main's behaviour lands on the redesign's commit model: - runtime.ts, #2065: setText keeps main's legacy host-only convention and the redesign's hydration writeText. The translator recovery is gone from renderText/commitText, setRenderText/commitSetText, commitHole, childTextHoleUpdate, recordHole and bindSignalChild; removeOnlyChildText still removes a committed Text at commit. resetOnlyChildHost and PENDING_HOST_TEXTS (which served only the host-only text writes) are deleted. - compile.js, #2065: text updates call setRenderText(_txt, v), commit functions setText(_txt, v), and commitHole takes no host. - runtime.server.ts, #2054: a compiled-only frame checks its output; ordinary frames keep the redesign's returned-value normalization. - codes.json: main's 344-346 (CompiledContext, CompiledOutlet) keep their numbers; the redesign's codes move to 347 (server boundary error), 348 (hydration protocol skew) and 349 (frontier rehome). Generated tables and CLI data are regenerated; docs/ssr.md names #348. Adaptations: - compiled-boundaries.test.ts: the server runs no error boundary (React's model), so an invalid CompiledOutlet under a catch-only @Try fails renderToString with the CompiledOutlet error; the client still shows the catch arm. - scripts/render-writers.mjs drops resetOnlyChildHost. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Fixes #2064. Restore Octane's owned DOM topology contract and remove the browser-translation accommodations introduced by #1909, #1915, and #1978. Translation tools that rewrite owned content must be disabled in the application's initial HTML with
translate="no"and the Googlenotranslatemeta tag.setText(null, value, host)compiled-call ABI. Update policy documentation, error guidance, and normal-DOM regression coverage.Validation
e092ce89d, including full lint/typecheck, runtime/parity suites, browser/website/heavy integrations, examples, bundle checks, and provenance. Bugbot completed with no findings.Local checks below distinguish what ran on this host from the completed CI checks.
pnpm format:check— scoped formatting used instead.pnpm typecheck— changed runtime/compiler sources pass; the broader selected test-file check reports 25 diagnostics reproduced identically on the base.pnpm test— owning suites used locally; full workspace validation is left to CI.git diff --check.perf-review: scan against74f22dd7cfound 0 candidates; independent source review found no actionable issue. The per-update text writers (runtime.ts:25789,dom-binding-program.ts:1547) and adoption validators (dom-bindings.ts:241) gain no allocations, fields, layout reads, listeners, scheduling changes, or runtime imports. Ordinary compiled fixture call sites remain 83; onebag4becomesbag3; six text updates lose their host argument. Spread fixture calls remain 29, and representative server output is byte-identical.Matched production fixture bundles, base → candidate (gzip bytes):
run-minimal.mjs hooks-staterun-minimal.mjs hydrate-rootBoth minimal reachability checks pass. Native-presentation used 7 samples × 5,000 updates, identical installed tooling, and a scratch copy of the existing runner with repository-relative compiler IDs to remove checkout-path effects. All work counters and final DOM values match; server bytes and compiled fixture output are identical. Reversed-order runs had variable timings, so this makes no speed claim. These are complete fixture bundles, not application-wide savings or browser latency evidence; CI's production call/DOM-mutation and bundle reports remain the authority.
Current-head paired CI benchmark and bundle report: all 64 work counters are unchanged, and all 20 timing results are within the runner's noise threshold. Every reported complete application raw/gzip total shrinks, including Oxc Threadline gzip -12 B and Pagecraft -89 B; the corresponding esbuild totals shrink by 51 B and 107 B.
Six compressed measurements grow:
These small compressed-size increases are an accepted tradeoff for removing unsupported DOM-repair behavior: complete application raw and gzip output decreases, work counters are unchanged, and the paired timing results show no statistically resolved change. The exact compression cause has not been isolated; no speedup or universal compressed-size reduction is claimed.
concise-code: source +36/-172 (runtime +30/-131, compiler +6/-41). No new shipped files, exports, options, or fields. Selective deletion preserves unrelated improvements that a wholesale revert would discard; the small historical-ABI fallback is required by the mutation-tested compatibility contract. New files are the changeset and renamed/adapted normal-DOM tests; the translation helper is deleted.Local validation reused matching installed dependencies after a new frozen workspace install was stopped because the host had insufficient disk for a full install. The scoped Vitest configuration uses the repository's compiler, assertions, setup, and dev/prod projects.
Risk / follow-ups
Applications must ship the initial-HTML opt-outs before adopting this runtime change. Arbitrary external DOM rewriting is unsupported; opt-outs depend on each tool honoring them. Native browser translation behavior and browser latency have not been validated here.
Provenance
agent-authored)Originating Codex task; implementation host:
com-79386.Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Breaking behavioral change for pages that relied on Chrome Translate rewriting owned DOM before or after adoption; apps must add translation opt-outs in initial HTML or adoption/hydration will fail on mismatched topology.
Overview
Removes browser page-translation accommodations from DOM binding adoption, structural programs, and text updates. Framework-owned text and closed child lists must match server topology exactly—extra whitespace text nodes,
<font>wrappers, and other external rewrites now fail adoption with errors #318, #321, or #286 instead of being tolerated or repaired.Runtime and compiler paths drop translation-specific logic (
resetOnlyChildHost,<font>acceptance, whitespace skipping, deferred translated-text writes). Text updates use the standard cached-Text+_$setTextpath while preserving the legacysetText(null, value, host)ABI for older compiled output.Documentation and error notes now state that external DOM rewriting is unsupported and that apps should opt owned content out of translation in initial SSR (
translate="no", Googlenotranslatemeta). Tests shift from “keep translated DOM” scenarios to topology mismatch rejection and normal only-child text / hydration regressions; translation differential fixtures and helpers are removed.Reviewed by Cursor Bugbot for commit e092ce8. Bugbot is set up for automated code reviews on this repo. Configure here.