Repository navigation
Commit 06db679
fix(solid,web): unified For — external audit round (ownership, dynamic rows, anchors, guards, hydration text)
Responds to the 2026-09-07 external audit of #3281 (8 P1 / 4 P2).
P1-2 (the substantive one): rows whose top level resolves to a function —
a component returning <Show>/<Dynamic>/a conditional, a memo, a fragment
with accessor leaves — no longer demote. They are DYNAMIC rows: built once
(owned, untracked) and resolved by the slot's own compute, tracked — the
same `flatten` read classic's insert effect performs for such rows, moved
into the slot. No per-row effect, no marker nodes (mount cost: one field),
no shape demotion, so user row code never runs twice and a late dynamic
row never remounts its siblings. A flip splices only that row's range,
reusing positional text nodes with a `.data` write. NotReady from a row's
resolution parks the built plan; the retry reuses the rows (mapArray
parity — rebuilding would re-fire per-row async and never settle).
P1-1: slot owner under For's creation owner (`$for.owner`), where
mapArray's internal owner lives; the insert cleanup disposes it explicitly.
P1-3: list end anchor is the committed tail's nextSibling while it is still
ours (classic contiguity) — appends stay before a foreign trailing node.
P1-4: removes are parent-guarded; migrated row nodes are left alone.
P1-5: buildParts disposes the row owner when the row fn throws.
P1-6: the hydrating fill commit adopts positional server text nodes for
primitive rows (node identity survives; zero-write).
P1-7 is moot: with no shape demote, nothing can demote MID-fill (duplicates
are only detectable on a later partial op; a non-array subject demotes
before any row is built) — the claim record/restore stack is deleted.
P1-8 disputed: `map.length > 1` is mapArray's own index-arity contract.
P2-1: fresh-key duplicates are caught via the existing probe map (-1).
P2-4: the slot's node type is opaque (`SlotNode = object`) — core declares
no DOM types; the one direct DOM read moved behind `ops.owns`.
Tests: for.unified.audit.spec (one per finding, classic as oracle); the
former demote-mid-fill hydration scenarios become dynamic-row scenarios
(engaged, zero demotes, server nodes); text-row hydration pins text-node
identity; text mismatches now report the repair honestly.
Size: +~850 B on For-bearing bundles (structural: resolution, parked-plan
reuse, anchors, guards), +61 B floor (four domOps methods). Chrome A/B
interleaved pre/post on jfb-signal and jfb-deep reorder: parity.
Co-authored-by: Cursor <[email protected]>1 parent 57e5f53 commit 06db679
15 files changed
Lines changed: 1250 additions & 481 deletions
File tree
- .changeset
- packages
- solid/src/client
- web
- src
- test
- harness
- __artifacts__
- hydration
- scripts/size
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 20 | + | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | 24 | | |
37 | | - | |
38 | | - | |
| 25 | + | |
| 26 | + | |
39 | 27 | | |
40 | 28 | | |
41 | 29 | | |
| |||
46 | 34 | | |
47 | 35 | | |
48 | 36 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 37 | | |
90 | | - | |
91 | 38 | | |
92 | | - | |
93 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
94 | 67 | | |
95 | | - | |
96 | | - | |
| 68 | + | |
| 69 | + | |
97 | 70 | | |
98 | 71 | | |
99 | 72 | | |
100 | 73 | | |
101 | 74 | | |
102 | 75 | | |
103 | | - | |
104 | 76 | | |
105 | | - | |
| 77 | + | |
106 | 78 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
112 | 82 | | |
113 | 83 | | |
114 | 84 | | |
115 | 85 | | |
116 | 86 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
120 | 90 | | |
121 | 91 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
125 | 95 | | |
126 | 96 | | |
127 | 97 | | |
128 | 98 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
132 | 102 | | |
133 | 103 | | |
134 | 104 | | |
| |||
143 | 113 | | |
144 | 114 | | |
145 | 115 | | |
146 | | - | |
| 116 | + | |
147 | 117 | | |
148 | 118 | | |
149 | 119 | | |
| |||
0 commit comments