Repository navigation
fix(octane): isolate signals in keyed SSR rows - #1281
Merged
domgan-oai merged 6 commits intoSep 23, 2026
Merged
domgan-oai merged 6 commits into
domgan-oai merged 6 commits into
Conversation
domgan-oai
marked this pull request as ready for review
September 23, 2026 09:44
…w-ssr-signals-1256
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 94d9954. Configure here.
This was referenced Oct 1, 2026
Merged
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
Signal declarations directly inside keyed
@forrows rendered the first row's value in every row during SSR. Give these rows a call-site owner shared by SSR and hydration sofirst, secondstays independent through edits, reordering, nested control fragments, and discovery retries.Keep child-component identities and reconciliation keys intact. Rows that need an owner use scoped updates, including in production Strong mode. Late query activation retains the same row identity across discovery instead of starting the first query twice.
Fixes #1256.
Validation
pnpm run changeset:checkandpnpm run sync.pnpm run buildpassed; imports and the production error catalog verified.8a3a1e7c5, with serial files and at most two workers. The earlier compiler/list/SSR/signal/hydration run passed 674 tests across 20 suites before the subsequent island-only main change.94d99543a, including requiredtest (24),lint, andtypecheck, plus browser, React parity, example, package/compatibility, and provenance checks. Fullpnpm typecheckandpnpm testwere not run locally.NEUTRAL, one finding). Its child row-fallback finding was resolved as a false positive after source tracing and a focused 106-test rerun: child entry clears active list keys before owner lookup, and discovery uses the same boundary. All review threads are resolved.The targeted run uses the Octane plugin and per-test setup, serial files, and at most two workers. Coverage includes all five server APIs, dev/production/Strong modes, primitive and opaque keys, DOM adoption, edits/reorder, nested and sibling lists, suspension, conditional fragment cleanup, late handles, query discovery, and owner-carrier restoration. A cold first handle activated during child rendering also preserves separate sibling component cells across rows, hydration, and reordering; potential binding capability stamps child identities before document activation.
Risk / follow-ups
Matched against upstream
8a3a1e7c5with Node 26.4.0: ordinary client entry +456 raw / +112 gzip bytes; ordinary server entry +71 raw / +19 gzip bytes. The existing 100-row child-component SSR fixture preserves compiled/HTML hashes, 200 frames/envelopes, frame widths 9/14, zero recipe writes/cache appends/key coercions, and 402 used-handle cache writes; its production gzip delta is +131 ordinary / +168 potential bytes. Checked ordinary-app gzip budgets retain 11,309 / 8,456 / 2,193 bytes of headroom.The client list slot and existing potential SSR row recipe each gain one scalar site field. These fields are outside the SSR frame counters. No shared-host timing or heap claim is made.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes signal instance identity and keyed list SSR/hydration paths; scoped to inline signals in
@forbut affects core rendering state.Overview
Fixes SSR and hydration so signal declarations inside keyed
@forrows get their own instance identity instead of sharing the first row’s state.The compiler now detects inline signal/render sites in list bodies and threads a
signalSitecontrol key intossrForItemand clientforBlock/keyedForBlock, which turns off fast keyed paths and Strong selection shortcuts when a row needs its own owner. On the server, each row runs under a row-scoped signal owner (with discovery/query observer support); on the client,ForSlot.signalSitedrives structural instance keys and lets nested control fragments borrow the row owner without caching it on throwaway scopes. Direct signal binding also skips redundant owner re-entry when the row owner is already active.Regression coverage expands for inline vs child-component rows, cold query discovery, late handles, Strong selection updates, nested/sibling lists with suspension, and reorder/edit flows.
Reviewed by Cursor Bugbot for commit 94d9954. Bugbot is set up for automated code reviews on this repo. Configure here.