Skip to content

refactor: make the renderer own DOM application and range indexes - #384

Merged
smiggleworth merged 6 commits into
mainfrom
codex/core-04-renderer-ownership
Sep 5, 2026
Merged

refactor: make the renderer own DOM application and range indexes#384
smiggleworth merged 6 commits into
mainfrom
codex/core-04-renderer-ownership

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Runtime execution previously inspected and mutated browser nodes directly, while host metadata and range registration had several independent writers. Scheduled DOM application, fast-path classification, event delegation, portal detachment, and child-scope restoration now live behind renderer capabilities. Resource helpers own browser activity checks with existing server defaults preserved.

The renderer maintains host indexes centrally and uses one range registry for native owners and public evaluation contexts. Shared wrapper components resolve to the same active range; departed registrations are cleared, and stale publication cannot redirect a disposed or hydration-adopted owner. Native records retain direct range indexes; extension context objects remain untouched. Existing custom-host callbacks, receivers, argument lists, and frozen public declarations remain compatible.

Validation:

  • Formatting, lint/typecheck, build, public type tests, and publint passed.
  • 238 unit, 55 repository checks, 1,543 jsdom, and 53 browser tests in each of Chromium, Firefox, and WebKit passed.
  • Packed candidate and published 0.2.4 consumers passed both TypeScript compilers and all 14 runtime/renderer contract examples.
  • Three sequential baseline and candidate captures qualified all 21 touched guardrail rows. The maximum median slowdown was 4.35% (table truncation, 2.3 ms to 2.4 ms), within the 5% limit. Earlier candidates failed at 13.04% and 8.70% and were rejected before consolidating redundant indexing. Full measurements and environment provenance are in docs/benchmarks/core-renderer-fe12030.json; no optimization claim is made.
  • Regression coverage includes shared-range replacement, obsolete cleanup, scope-host index consistency, opaque extension contexts, intrinsic/portal replacement, generation rollback, disposal, fragment hydration, and retained node identity.

Fourth PR in the core consolidation series, following #381, #382, and #383. Transaction unification follows in the next PR.

@smiggleworth
smiggleworth marked this pull request as ready for review September 5, 2026 01:21
@smiggleworth
smiggleworth merged commit d11a790 into main Sep 5, 2026
7 checks passed
@smiggleworth
smiggleworth deleted the codex/core-04-renderer-ownership branch September 5, 2026 01:40
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.

1 participant