Repository navigation
fix: retain named Strong values passed through component children - #2051
Merged
trueadm merged 1 commit intoOct 14, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
October 14, 2026 12:21
Contributor
Benchmark report🟢 No byte growth, no added work, and no timing changes beyond ±3%. Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 93 measured values. Public-import reachability bundles (bytes)No changes across 120 measured values. |
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
Strong components can now retain an eligible setup-created object or array passed to a prop through another component's children. For example,
const channel = { name: props.name }passed to a nested provider used to unsubscribe and resubscribe retained consumers on an unrelated parent update. That subscription now stays active until the name changes or the consumer unmounts.Why
The literal proof found prop reads immediately below host elements, but stopped at every component's children. That excluded already-evaluated named values as well as expressions whose evaluation really does belong to the child.
Changes
Keep the existing literal, escape and mutation proof. Inside component children, collect only eligible identifier reads; never hoist an inline expression. Directives, callbacks and excluded built-in/member boundaries keep their previous behavior. No new runtime machinery or public API. Includes an Octane patch changeset.
Validation
pnpm format:check(repository-wide; scoped Prettier passed for all three files)pnpm typecheck(repository-wide;pnpm typecheck:filespassed for compiler and test)pnpm test(repository-wide; targeted core suites used)benchmarks/template-call-memo: all visible output, keyed identity, event and teardown controls pass; every deterministic work count is unchanged. Compatibility compiled/gzip: 3817/62471 B; Strong: 4770/62944 B before and after.pnpm sync, changed-file formatting, scoped typecheck andgit diff --checkpass. Sync produces no extra tracked changes. Independent complexity review has no unresolved findings.Perf review
Compiler-scoped
perf-review-scanreports 0 candidates. The changed walk runs during compilation on Strong component/entered-body trees; only eligible named literals gain an existing memo slot. No runtime shape, DOM, or scheduling code changes. Collateral deterministic work and size are measured above. Whole-application size, compiler throughput, and browser latency were not measured.Risk / follow-ups
Nested Strong child trees cost a little more analysis at compile time. Admitted literals retain their existing memo slot until the owning render scope is released. Built-in boundaries and directive/callback scopes remain conservative. Server, native and universal paths keep their existing rules.
Provenance
agent-authored)Codex task · host
com-79386Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Changes Strong compile-time literal retention and subscription lifetimes for nested JSX, but stays compiler-only with conservative deferred hoisting and broad regression coverage.
Overview
Strong setup values like
const context = { name: props.name }can now keep their memo identity when passed to a prop inside another component's children (e.g. a nested<Channel value={context}>). Unrelated parent re-renders no longer force consumers to unsubscribe and resubscribe until the underlying value actually changes.The compiler's
hoistStrongRenderCalculationswalk now threads a deferred mode through component child trees: it still records eligible identifier reads on child props for existing Strong literal memo slots, but it does not hoist inline expressions out of those children. Inline props such asvalue={{ name: read(props.name) }}continue to run only when the child actually renders (including when a wrapper withholds children).Adds an Octane patch changeset and Strong hook/cache tests for nested named context, hydration, and deferred child evaluation.
Reviewed by Cursor Bugbot for commit fbc6fb7. Bugbot is set up for automated code reviews on this repo. Configure here.