Repository navigation
fix: restore hoisted head listeners after transition rollback - #994
Merged
domgan-oai merged 4 commits intoSep 8, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
September 8, 2026 13:58
Closed
15 of 24 tasks
14 of 21 tasks
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
Why
Changes
octanepatch changeset.Validation
pnpm format:check, typecheck, all four Node 24 test shards, React parity, integrations, examples, and required aggregate checks.git diff --check; same esbuild 0.28.1 production minifier: 334,263 → 334,745 bytes of unbundledruntime.ts(+482 bytes, 0.14%).pnpm syncpassed lockfile supply-chain verification but dependency installation was blocked by the configured registry's 403 for@tsrx/[email protected]; CI validated the final head.Risk / follow-ups
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches transition rollback and native event registration on document.head; incorrect journaling could leave wrong handlers or duplicate listeners, but scope is limited to hoisted head slots during suspended transitions.
Overview
Fixes suspended transitions mutating direct
on*listeners on hoisted<head>nodes while the visible head (text/attrs) is held on the old screen — listeners now participate in the same transition journal/rollback as other head slot state.The runtime adds
journalHeadEventListeners, which snapshots the per-prop listener map once per head update pass and records undo steps that tear down and re-register native listeners. That avoids unsafe per-prop reversals when multiple props alias the same native event (addEventListenerdedupes).removeHeadEventListenersand headon*patching now opt into journaling whenTRANSITION_JOURNALis active, with a single journal per pass.Regression coverage adds a boundary +
<title>fixture with direct click handlers (replace / omit / explicit clear) and a case for aliased handlers (onDoubleClick/onDblClick). Ships an octane patch changeset.Reviewed by Cursor Bugbot for commit 8728683. Bugbot is set up for automated code reviews on this repo. Configure here.