Repository navigation
perf: use numeric indices for unkeyed de-opt children - #1030
Merged
domgan-oai merged 1 commit intoSep 10, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
September 10, 2026 11:32
Closed
68 of 84 tasks
8 of 9 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
key="0".Why
scopedDeoptKeyon every mount and update of a descriptor list. The internalMapalready separates a numeric index from explicit and nested string keys.Changes
k…and nested JSON keys intact. No new cache or per-item work is introduced.key="0".Validation
pnpm sync(no generated diff)pnpm format:files:checkon all changed files;git diff --checkpnpm changeset:checkpnpm exec tsgo --noEmit -p packages/octane/tsconfig.jsonand TSRX-aware check of the changed test and fixturepnpm exec vitest run --project octane --project octane-prod --silent=passed-only: 989 files, 17,592 passing tests, 14 expected failuresscopedDeoptKeyanddeoptItemBody1,001 times, update callsreconcileKeyedonce, all 1,001 rows retain expected identity/order, uncontrolled input state, and focuspnpm testandpnpm typecheck(the focused core suite and package/fixture checks above were run locally; repository CI will run the broader gates)Risk / follow-ups
getKeyclosures, and keyed component-slot coercion remain. SSR has a separate serializer and is unchanged.Refs #981.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches hot-path reconciliation key derivation in the client runtime; semantics are heavily tested but incorrect key typing could cause list mis-reconciliation.
Overview
Top-level unkeyed de-opt list children now reconcile with numeric indices instead of allocating
'i' + indexstrings on every parent render. Explicit keys still use the'k'…prefix and nested wrapper paths still use JSON;scopedDeoptKey’s return type becomesstring | number.Regression coverage adds hydration and reorder scenarios for mixed keyed/unkeyed/nested lists (DOM identity, typed inputs, focus, and keeping implicit index 0 separate from
key="0").An opt-in js-framework work gate (
WORK_MODE=unkeyed) mounts 1,001 rows through a separate Vite entry, asserts production helper call counts and semantics, and can require the numeric-key implementation viaWORK_REQUIRE_NUMERIC=1without affecting the main timing bundle.Reviewed by Cursor Bugbot for commit d37cf3f. Bugbot is set up for automated code reviews on this repo. Configure here.