This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit c021b35
fix(components): the react-page wrapper stops writing the host adapter under each block's dataSource (objectui#11070, round 2) (#11226)
Refs #11070
Clause-②: no, measured. Nothing under `packages/types/src` changes
except one test file's prose, so the published
`StrictAnyComponentSchema` and `AnyComponentSchema` are byte-identical,
and M3's inputs (the three corpora and the types source) are identical
between base and head. The change is in what the react-page wrapper
writes onto in-memory nodes, and nothing validates those.
`Refs`, not a closing keyword, on purpose. objectui#11070 stays open for
the pairs this round stops at (below), the grid field's `columns`,
`object-chart`'s declaration and the dashboard decision. Draft; the dev
does not mark it ready. Round 2 of the card, dispatched by the
`domain:devx` seat 2 on the maintainer's order, session
`https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh`.
## What changed
- **The react-page wrapper stops writing the host adapter under the
node's `dataSource`.** This is the seat's answer A to round 1's
`object-chart` question. `buildComponentScope` in
`renderers/layout/react-page.tsx` built every injected block's node as
`{ dataSource, ...props, type }`, and `Block` built its node the same
way, with the adapter (or `null` before the host connects one) under
`dataSource`. On a node, that key is the spec's per-element binding.
Both writes are removed. The page is already wrapped in
`SchemaRendererProvider dataSource={adapter}`, which is where every
block resolves its adapter. An authored `dataSource={{ object: 'x' }}`
still arrives on the node as written.
- **The scope memo keeps its `adapter` dependency**, and the code now
states the reason: the recompile on a swap re-runs page effects that
read `useAdapter()` without naming it in their dependencies. Dropping
the dependency would keep page state across a swap, but it would also
leave such a page empty. That is a separate behaviour change and is not
made here. `exhaustive-deps` now reports the dependency as unnecessary,
so it carries a next-line disable with its reason, as the package's
other deliberately kept dependencies do.
- **Pins.** `react-page-scope.test.tsx` pins five things. The node
carries no `dataSource` when the author writes none, including before
the host connects an adapter. An authored binding arrives exactly as
written, through the wrapper and through `Block`. The block resolves the
adapter from the provider. `react-page-adapter.test.tsx` observes the
adapter through the provider and asserts that no render's node carries
the key. The replaced pin asserted the write, on the premise "list-view
reads dataSource from props rather than from context". That premise is
false: `ListViewBlock` takes `props.dataSource`, which `SchemaRenderer`
strips, and otherwise the context. The five cross-file line citations in
`react-page-scope.test.tsx` are rewritten by content (AGENTS.md rule
11).
- **`strict-face-read-keys-11070.test.ts`: assertions unchanged.** The
`object-chart.dataSource` case still asserts the refusal, but its title
no longer gives the write as the reason. The pending-list comment now
records why `return_type` / `summary_type` wait.
- **Changeset:** `.changeset/11070-react-page-no-adapter-on-node.md`,
`@object-ui/components` **patch**. Why patch: no declared or documented
surface moves (types, exports, docs), and every registered renderer
measured the same (census below). The one observable difference is a
host component that read the adapter off `schema.dataSource` inside a
react page, and the body names its replacement.
## Who consumed the write: a census
A scratch instrument, never committed, rendered every registered type
through the real `SchemaRenderer`. It covered 483 types: the console's
registrations, plus every lazily registered plugin imported eagerly.
Each type rendered once with a recording adapter under the node and a
separate one in `SchemaRendererProvider`, and once without the node key.
The instrument compared adapter method calls and settled markup, with
generated ids normalised.
- **Positive control.** A stand-in that reads `schema.dataSource` and
calls `find` was reported, so a real consumer would be.
- **Types that call a method on the node's adapter:** `user` and
`field:user` only (`getObjectSchema`). They reach it through
`LookupField`'s resolution chain, `props.dataSource ??
lookupField?.dataSource ?? fieldMeta?.dataSource ?? context`, in which
the node is the field carrier. Without the key, they call the provider's
adapter. In a react page that is the same object.
- **47 types touch the node value only to ask whether it has `find`.**
That is `isElementDataSourceConfig`, the gate's check that tells a
binding from an adapter.
- **Settled markup is identical for all 483 types.** Adapter call sets
are identical too, except that the `user` pair moves from the node to
the provider. For the 47 blocks the react-page scope injects, the `null`
window (no adapter yet) was also compared both ways: identical.
- **`object-chart` stands on its own.** With no write, `{ dataSource: {
object: 'account' }, aggregate, chartType }` drives
`aggregate('account')` and `getObjectSchema('account')` through the
provider's adapter, the same as the `objectName` control. A node with
neither key makes no call.
- **What the write cost, on the built dist.** On each of the seven
blocks that declare the binding, `safeValidateSchema` refuses a node
that carries `dataSource: null` or an adapter, at `dataSource`. The same
node without the key is not refused there.
The consumers exist, but none depends on finding the adapter on the
node, and the non-authorable channel already exists. So the write is
removed, not rerouted.
## Stopped at the declaration boundary
The dispatch's rule: a pair that needs a `packages/types` declaration
stops, the rest is finished, and the stop is reported.
1. **`fields[].return_type` and `fields[].summary_type`: no change.**
The seat's answer A is that the widgets read the spec spellings. The
widgets' reads are as the card says: `FormulaField` reads
`formulaField?.return_type || 'text'`, and `SummaryField` reads
`summaryField?.summary_type || 'count'`. But the form-field face
declares neither spec spelling. On a form field, the shipped strict face
refuses `returnType` and `summaryOperations` by name
(`unrecognized_keys`), just as it refuses the snake keys, while the
declared control `reference` passes. Moving the reads and the fixtures
now would only rename the refused key. It would also leave
`FormulaFieldMetadata.return_type` and
`SummaryFieldMetadata.summary_type` (`field-types.ts`) declared and
unread. The move needs `form.ts` and `zod/form.zod.ts` (the latter is
held by objectui#6152 round 3), plus `field-types.ts`.
2. **`content/docs/fields/lookup.mdx` and `password.mdx`: the premise is
false as stated, and the pages are unchanged.** Their TypeScript fences
annotate `LookupFieldMetadata` and `PasswordFieldMetadata`
(`field-types.ts`), and those types declare `reference_to` and
`min_length` / `max_length`. Round 1 declared `reference` / `minLength`
on `FormField`, which is a different type. I measured it: with
`reference` / `minLength` in those fences, `check:doc-snippets` goes red
with two TS2561 errors, and the checker's message suggests the snake
spelling. Correcting the pages first needs those types moved to the spec
spellings. The trial edits went through `ablation-replace` and were
restored, proven by the blob matching HEAD and `git diff HEAD` being
empty.
## M3, before and after
The method ports PR #11069's M3: the corpus loaders and schema-guided
node walk from `scripts/measure-strict-authoring-face.mjs`, plus
#11069's `findUndeclaredKeys` (ported verbatim from `a11f73347`). It
runs over the shipped `StrictAnyComponentSchema` in a freshly built
`packages/types/dist`, and attributes each refused key to its owning
node by object identity along the refused path. It is a scratch script
and is never committed.
| reading | base `52bf348` | head `77fc4e9` |
| --- | --: | --: |
| node documents | 599 | 599 |
| refused by the strict face | 97 | 97 |
| of them strict-only | 61 | 61 |
| refused by the tolerant face | 36 | 36 |
| **class (ii)** pairs / occurrences / strict-only | **12 / 53 / 53** |
**12 / 53 / 53** |
The head column was run. The base column follows from the inputs: `git
diff --quiet` over the three corpora and the types source (tests
excluded) answers 0 between the two commits, and the control, a path
this branch changes, answers 1. Class (ii) is exactly the card's
remaining list. It is the 9 dashboard pairs, with 44 occurrences
(`options.data` 12, `options.xField` 11, `options.yField` 11,
`options.value` 5, and `options.description`, `options.trend`,
`component.chartType`, `component.series`, `component.xAxisKey` at 1
each), plus `return_type` 3, `summary_type` 3 and `columns` 3. Round 1
read 12 / 38 / 38. The extra 15 occurrences come from catalog
`plugin-dashboard/filtered-dashboard-*` fixtures on this base. The
corpus grew; this shallow checkout cannot date when.
**Class (ii) does not shrink this round,** contrary to the dispatch's
H3. `return_type` / `summary_type` stopped at the boundary. The docs
pairs are not M3 pairs, because M3's docs corpus is its `json` fences
and those were TypeScript fences. And no corpus document writes
`object-chart.dataSource`.
## Tests and gates
All at head `77fc4e9` unless marked. Each exit code was captured before
any pipe.
| gate | exit | verdict |
| --- | --: | --- |
| `pnpm --filter @object-ui/components --filter @object-ui/types run
type-check` | 0 | both `type-check: Done`; `--listFiles` shows all three
changed tests inside the test programs |
| `pnpm exec vitest run packages/components/` | 0 | `Test Files 341
passed / 1 skipped (342)`, `Tests 3372 passed / 24 skipped` |
| `pnpm exec vitest run packages/types/` | 0 | `Test Files 289 passed
(289)`, `Tests 6882 passed (6882)` |
| the 13 test files outside those two packages that render a
`kind:'react'` page or name the wrapper (`apps/console` 4, `core` 3,
`layout`, `plugin-charts` 2, `plugin-list`, `react-runtime`,
`sdui-parser`), found by grepping tests for `kind: 'react'` /
`ReactKindPage` / `buildComponentScope` / `react-page` | 0 | `Test Files
13 passed (13)`, `Tests 255 passed (255)` |
| `pnpm check:doc-snippets` (closure built at `a5a9a68`; from there to
head, the components source changes by one comment line) | 0 | `696 of
696 block(s) judged, 0 failed` |
| `check:doc-fences`, `docs:check-links`, `check:control-bytes`,
`check:test-path-roots` | 0 | OK |
| `check:new-line-citations` | 0 | `0 new citation(s)` |
| `check:changeset-claims`, `check:pending-changeset-literals` | 0 |
report-only. The four pending changesets that name `react-page.tsx` were
read; none states the write |
| `node scripts/check-changeset-presence.mjs` | 0 | declares
`.changeset/11070-react-page-no-adapter-on-node.md` |
| eslint on the four changed files (JSON) | 0 | 0 errors. Warnings per
file equal base (6 / 11 / 3 / 0), measured by linting the base blobs
through `--stdin` |
- **`@object-ui/fields` type-check and test: not run.** This round
changes nothing under `packages/fields`.
- **NOT MEASURED:** the repository-wide lint and the test shards outside
the sets above. Both are CI's runs.
### Reverse verification
Both ablations went through objectstack's
`scripts/ablation-replace.mjs`: the anchor hit once, the blob moved, and
the restore left the blob equal to HEAD with `git diff HEAD` empty. The
prediction was written before each run, and the subject is imported from
source.
| ablation | predicted | measured |
| --- | --- | --- |
| A1: the wrapper's node gets `dataSource: null` again | 3 red: flat
props, the `null` window, the adapter swap | 3 failed / 12 passed, those
three |
| A2: the `Block` node gets `dataSource: null` again | 1 red: the
`Block` case | 1 failed / 14 passed, that one |
## Acceptance notes
- **`object-chart`'s declaration is the next round.** It needs
`packages/types/src/zod/**` and the objectui#10770 pin. That pin's
`SHOWCASE_NODE` still carries `dataSource: null`, now models a node the
wrapper no longer builds, and stays green.
- **`LookupField`'s chain takes `lookupField?.dataSource` as an
adapter.** On a `lookup` / `user` node rendered through `Block`, an
authored binding under that key would be taken as an adapter. Not
measured; no document writes one.
- **New pairs beside class (ii) at this base.** On `action:button`,
`actionType` (7), `icon` (4), `variant` (2), and `endpoint`, `method`
and `target` (1 each), all in docs fences. They teach the flat node
spelling, which the objectui#10872 batch-4 arm moved into `properties`.
AGENTS.md rule 4's own example node is refused the same way on the
strict face. These are objectui#10872's open flat-spelling question;
they are not graded here.
- **The dashboard analysis is in this round's report** on
objectui#11070. Nothing in this PR touches the dashboard pairs.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent dded788 commit c021b35
5 files changed
Lines changed: 149 additions & 45 deletions
File tree
- .changeset
- packages
- components/src
- __tests__
- renderers/layout
- types/src/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
123 | | - | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | | - | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
162 | 212 | | |
163 | 213 | | |
164 | 214 | | |
| |||
273 | 323 | | |
274 | 324 | | |
275 | 325 | | |
276 | | - | |
| 326 | + | |
277 | 327 | | |
278 | 328 | | |
279 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
74 | 88 | | |
75 | 89 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
103 | | - | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | | - | |
| 122 | + | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
| |||
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
186 | 206 | | |
187 | 207 | | |
188 | | - | |
| 208 | + | |
189 | 209 | | |
190 | 210 | | |
191 | 211 | | |
| |||
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
| 225 | + | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
| |||
0 commit comments