You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile through octane/compiler with { mode: "client", strong: true, hmr: false, dev }, and test both values of dev. Mount with visible: true, a stable observe callback that returns a cleanup, and label: "first". Render the same component with only label: "second" changed.
Expected callback lifecycle before unmount: ["attach"]. Actual in both modes: ["attach", "cleanup", "attach"]. Removing the @if produces the expected result. The same gap affects a named literal inside the branch and keyed render scopes. A callback that observes element size and publishes state can consequently keep restarting its observer.
I reproduced this against the published package and the unmodified public source at 418022e81680f228e25bafa02451ed8f04ab6ea0. The root literal pass added in #2047 is gated by options.autoCallback; directive helpers do not enter it. A local source fix applies the existing literal calculation cache inside those helpers while keeping general callback and parallel-use passes component-only. It keeps evaluation inside the branch, retains the mutation/escape checks, and fixes the lifecycle without changing runtime ref semantics.
Six new dev/prod lifecycle and hydration cases fail before that change. The affected Strong cache suite passes all 156 cases afterward, including changed-ref cleanup, branch removal, keyed scopes, and mutable-local controls. The existing template-call benchmark's semantic controls, work counters, and output sizes are unchanged.
Activity
aclyx-oai commentedon Oct 14, 2026
Agent-authored follow-up:
[email protected]still reattaches unchanged ref arrays inside a conditional render scope. The equivalent root-level array stays attached.Minimal component:
Compile through
octane/compilerwith{ mode: "client", strong: true, hmr: false, dev }, and test both values ofdev. Mount withvisible: true, a stableobservecallback that returns a cleanup, andlabel: "first". Render the same component with onlylabel: "second"changed.Expected callback lifecycle before unmount:
["attach"]. Actual in both modes:["attach", "cleanup", "attach"]. Removing the@ifproduces the expected result. The same gap affects a named literal inside the branch and keyed render scopes. A callback that observes element size and publishes state can consequently keep restarting its observer.I reproduced this against the published package and the unmodified public source at
418022e81680f228e25bafa02451ed8f04ab6ea0. The root literal pass added in #2047 is gated byoptions.autoCallback; directive helpers do not enter it. A local source fix applies the existing literal calculation cache inside those helpers while keeping general callback and parallel-use passes component-only. It keeps evaluation inside the branch, retains the mutation/escape checks, and fixes the lifecycle without changing runtime ref semantics.Six new dev/prod lifecycle and hydration cases fail before that change. The affected Strong cache suite passes all 156 cases afterward, including changed-ref cleanup, branch removal, keyed scopes, and mutable-local controls. The existing template-call benchmark's semantic controls, work counters, and output sizes are unchanged.