Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 2049b03

Browse files
feat(types)!: refuse both content channels on the family-D re-measure's residual — markdown, chart, bar-chart, code-editor, detail, report, list-view and six designers (objectui#9256) (#11003)
Part of #9256 Clause-②: yes **Clause-② `yes`, as the claim declared:** thirteen published declarations stop accepting an authored `children`. Each one's renderer reads neither content channel, so the key rendered nothing; it is now refused by name. A published accept set narrows, so a contract review is owed before landing. This is the re-measure that release `5867503945` on objectui#9256 asked for, plus the slice it found. The card stays open: the re-measure also found twenty neither-channel registrations it does not narrow here (see "Still open" below), so this PR says `Part of`. ## What changed - **`markdown`, `chart`, `bar-chart`, `code-editor`, `detail`, `report`:** `body?: never` and `children?: never` on the TypeScript face (`MarkdownSchema`, `ChartSchema`, `BarChartSchema`, `CodeEditorSchema`, `DetailSchema`, `ReportComponentSchema`), and two `retirementTombstone` members fed one `neitherContentChannelGuidance` string on the zod mirror. Both stay MEMBERS, so `zod-mirror-parity`'s key sets stay equal. - **`list-view`:** the two members on the zod mirror only. `ListViewSchema`'s TypeScript face is `z.input` of that mirror intersected with `ListViewRuntimeProps`, so the members are what refuse both keys on both faces. - **The six designers** (`page-designer`, `data-model-designer`, `process-designer`, `report-designer`, `object-manager`, `field-designer`): `body?: never` and `children?: never` on the TypeScript face only. None of them has a zod mirror, so that face is the only gate, as it was for `nl-query`. - `body` was already refused on all of these faces, by `BaseSchema` (objectui#6771). It is restated because that refusal names `children` as the remedy, and `children` is dead here too. - **New pin file** `packages/types/src/__tests__/content-channel-remeasure-9256.test.ts`. - **One changeset** `.changeset/9256-remeasure-content-channels.md`: `@object-ui/types` `minor` with an explicit BREAKING note and a migration line, the spelling the earlier family-D slices used under this repo's no-major rule. ## Why these were missed The first family-D sweep keyed its population on the renderer's DECLARED props type. A registration typed with a published declaration was family D; one typed with an inline or local type was filed as "no published face to narrow". That second bucket was wrong for every registration whose `type` LITERAL has a published declaration anyway: the declaration an author types against is chosen by the literal, not by the renderer's props type. The re-measure keys on the literal. ## The measurement Taken on `origin/main` `328abeb55`, and re-taken on this PR's merge head `1ac8cb627` (after `git merge origin/main`); both runs give the same verdicts. The full table is in the `os-dev-report` comment on objectui#9256. - **Registration population:** `check:registry-bare-names --json` (the shipped enumerator: literal, loop and indirect claims) joined to a TypeScript compiler-API walk of every `ComponentRegistry.register` / `registerLazy` call site in non-test source. Every enumerated claim maps to a call site, and the only call sites without a claim are the data-driven registrars the enumerator reports as unresolved plus two generic forwarders in `packages/core` (`PluginScopeImpl`, `WidgetRegistry`). 23 packages call `ComponentRegistry.register`; `apps/console` registers lazily only; `packages/core` holds the two forwarders. That is the card's 25. - **Reads:** the TypeScript compiler API, ⛔ not grep. One program per `tsconfig.json` (the workspace packages, `apps/console`, the examples), on a BUILT tree, 0 unresolved-module diagnostics. Every `.body` / `.children` read (property access, string element access, object destructuring) is filed under the declared type of its receiver, with the enclosing function recorded so an `any`-typed read can be attributed. Lit controls fire in the same run: `ButtonSchema`, `DivSchema`, `CardSchema` and `ContainerSchema` each file a `children` read. - **Published faces:** the built `packages/types/dist/index.d.ts` read with the compiler API (every exported type and every member of every exported union, for `type` literals and the declared type of `body` / `children`), and the built zod mirror read BEHAVIOURALLY: `AnyComponentSchema` parses `{ type }`, `{ type, children }` and `{ type, body }` for every arm literal, and an issue counts against a channel only if it sits at that channel's path and is absent from the bare document. Controls in the same run: `div` accepts `children`, `div` refuses `body`, `dialog` refuses `children`, an unknown `type` is refused. - **Generic traversers:** `validateChildren` in `packages/core` now reads `schema.children` only (the card's `children || body` premise is gone). It, `sdui-parser`'s parse and `validateTree`, `cli validate` and `page:tabs`' related-list / attachment probes walk descendants to validate or count; they render nothing. `SchemaRenderer` destructures both keys out of the props bag it spreads. The only live `children || body` fallbacks left are `page:card`, `page:section`, `page:footer` and `page:sidebar` (family E, out of this card). ### Per-key readership for this slice | key | governing registration → reader | channel reads reaching the node | TS face before → after | zod mirror before → after | |---|---|---|---|---| | `markdown` | `plugin-markdown:markdown`, inline props type | none: the package's `children` reads are hast nodes and React props | `children` live → both `never` | `children` accepted → both refused by name | | `chart` | `plugin-charts:chart` (+ `chart:bar` alias), `ChartRenderer`'s inline props type | none: the package's reads are React `children` of its own components | same | same | | `bar-chart` | `plugin-charts:bar-chart`, `ChartBarRenderer`'s inline props type | none: it forwards `data`, `dataKey`, `xAxisKey`, `height`, `className`, `color` | same | same | | `code-editor` | `plugin-editor:code-editor`, `CodeEditorRenderer`'s inline props type | none: the package holds no channel read at all | same | same | | `detail` | `view:detail` (owner of the bare key) → `DetailView`, typed `DetailViewSchema` | none filed under `DetailViewSchema`; the package's other reads are `FeedItem.body`, `err.body`, a React `children` and `record:alert`'s text prop | same | same | | `report` | `plugin-report:report` → `ReportRenderer`'s three paths | none: the package's only channel reads are `document.body` | same | same | | `list-view` | `plugin-list:list-view`, typed `ListViewSchema` | none filed under it, while the same program sees it as the receiver of `objectName`, `viewType`, `columns`, `filter`, `sort`, `options` and more | derived from the mirror | same | | six designers | `plugin-designer:*`, no `schema` prop: the node's keys are spread into the component as props | none: the package's reads are nav-tree `NavigationEntryItem.children` and a provider's React `children` | `children` live → both `never` | no mirror | None of these registrations declares a `children` slot input (objectui#9910). **Producers.** `pnpm census:body-dialect --keys` over every key in this slice and the twenty still open, with `div` / `card` / `page` / `page:card` as lit controls in the same pass, at the merge head: the one node that authors `children` on any of them is this PR's own nested-refusal case in the new pin file. `body` appears only in tests (`record:alert`'s text prop, and one `detail` node in the sdui-parser dialect pin). The controls read `children` on `div` 177, `card` 183, `page` 54. Nothing was migrated. ## Red on base, then green Predictions were written to a file before any mutation. Each leg mutated one committed file through `ablation-replace.mjs` (anchor count and blob hash proven on disk), measured, and restored under its trap; the restore was proven by the blob hash equal to HEAD and an empty `git diff HEAD`, and the tree was clean at the end. Run on `7d451884d`, then again on the merge head `1ac8cb627` because the merge touched two of the three mutated files; both runs read the same. | leg | vitest (new pin) | `tsc -p packages/types/tsconfig.test.json` | |---|---|---| | A1: delete `MarkdownSchema`'s zod `children` member | **RED** 6 failed / 91: the five `markdown.children` refusal rows and the nested control; the member row stays green, as predicted, because `BaseSchema` already declares the key | **RED**: 2 × TS2322 in `zod-mirror-parity` (the pair and the key `children`) | | A2: delete `FieldDesignerSchema`'s `children?: never` (no mirror) | GREEN 97 / 97, NOT MEASURED by vitest (types are erased) | **RED**: exactly 1 × TS2578 at the `field-designer` pin | | A3: delete `ChartSchema`'s `children?: never` | GREEN 97 / 97, NOT MEASURED by vitest | **RED**: TS2578 at the `chart` pin plus 1 × TS2322 in `zod-mirror-parity` | **Consumer-side reverse validation.** A probe file inside `packages/components`, compiled with that package's options, resolves `@object-ui/types` to `packages/types/dist/index.d.ts`. Authoring `children` on eight of the narrowed types gives 8 × TS2322; the `div` control with `children` compiles. The probe is deleted in a `finally` and the tree is clean. ## Gates (merge head `1ac8cb627`; heavy runs through the shared verify lock; exit codes by redirect-then-capture) | gate | result | |---|---| | `turbo run build` (all but site and console) | 42 / 42 | | `@object-ui/types` `type-check` + `vitest run packages/types/` | exit 0; 272 files / 6081 tests | | downstream `type-check`: every package downstream of `@object-ui/types` that has the script, except `@object-ui/site` and the repo root (38 packages, three batches) | 38 × `type-check: Done`, exit 0 | | `vitest run` cli, sdui-parser, plugin-markdown, plugin-editor, plugin-report, plugin-designer | 94 files / 1004 tests, exit 0 | | `vitest run` plugin-list, plugin-charts, plugin-detail | 408 files (+1 skipped) / 4323 tests, exit 0 | | `vitest run scripts/` | 177 passed + 2 skipped of 179 files / 5335 tests, exit 0 | | `vitest run examples/schema-catalog/` | 34 files / 2198 tests, exit 0 | | console `vite build`, then `check:eager-closure` · `check:sdui-registration-pins` | exit 0 each | | eslint over the 11 touched TS files | 0 errors, 0 findings on an added line | | `check:control-bytes` · `check:new-line-citations` (0 new) · `changeset:check` · `check-changeset-presence` · `check:changeset-claims` · `check:pending-changeset-literals` | exit 0 each | | `check:doc-types` · `check:doc-snippets` · `check:doc-examples` · `check:skill-examples` · `check:doc-fences` · `check:doc-example-ids` | exit 0 each | | `check:handler-key-reads` · `check:spec-symbols` · `check:component-surface-parity` · `check:readme-exports` · `check:registry-bare-names` · `check:prompt-keys` · `check:test-path-roots` · `pnpm check` | exit 0 each | | governed guard `--test` over the 12 paths | NOT GOVERNED (lit control `AGENTS.md`: exit 3) | **Bundle Analysis:** measured, not argued. The TypeScript members emit no JavaScript. The zod members land in the console build's `types-zod` chunk only (the one chunk carrying the new refusal strings), and that chunk is not in the eager-closure report the build writes: the root `@object-ui/types` entry imports the zod mirror for types only, and the one runtime importer of `@object-ui/types/zod` in the console's graph, `plugin-map`'s `ObjectMap.tsx`, is lazy. `check:eager-closure` passes at `1ac8cb627`. NOT MEASURED, left to CI: the `pnpm test` shards beyond the packages above (app-shell, components, core and the rest), `@object-ui/site`'s type-check, `test:dist`, E2E, and the repo-wide `pnpm lint` (the local lint read the touched files only; this repo's eslint config enables no type-aware rule, so no untouched file's verdict can move). ## Serial constraints At branch time no open PR touched these files' sites. `origin/main` then gained 13 commits; `git merge origin/main` (no rebase, no force-push) conflicted only in `zod/objectql.zod.ts`, where objectui#10946 added `SpecRuleConditionSchema` directly above `ListViewSchema` and this branch added `LIST_VIEW_NEITHER_CHANNEL`. Both constants are kept, main's first. objectui#10930, which edited a `zod/complex.zod.ts` docblock, has since closed. Open PR objectui#10997 edits `zod/objectql.zod.ts` at `ObjectMapConfigSchema`, a different site from this PR's `ListViewSchema` block; `git merge-tree` of this head against `origin/main` `665025908` is clean. Whichever of the two lands second re-merges `main` only if a conflict appears. ## Still open — measured, not narrowed here Twenty registrations read neither channel and have a published face that still accepts `children`. They are the next slice, and two questions route it: - **Nineteen public-block arms**, armed after this card's family-E re-derivation by objectui#10872 (PRs objectui#10888, #10908) and objectui#10859 (PR objectui#10927): `record:activity`, `record:details`, `record:discussion`, `record:highlights`, `record:history`, `record:path`, `record:quick_actions`, `record:reference_rail`, `record:related_list`, `record:alert` (its `children` only), `page:header`, `page:tabs`, `page:accordion`, `element:text`, `element:number`, `element:button`, `element:divider`, `object-metric`, `object-master-detail-form`. Each arm is zod-only and inherits `children` from `BaseSchema`. The spec's own `PageComponentSchema` (installed 17.4.0) refuses a flat `children` on a page-component node (`unrecognized_keys`, measured on `record:details`, `page:header`, `page:tabs`, `page:card` and `element:text`). Their module belongs to open card objectui#10872, whose next batch edits the same arms, and the element/page/object blocks are `any`-typed, which this card's brief lists as family E while ruling `5861449497` (Q2 A) treated an `any`-typed registration with a published arm as family-D-shaped. That conflict is in the report, not decided here. - **`metric-card`:** its TypeScript face `DashboardWidgetSlotComponentSchema` accepts `children`, and its zod twin is a private routing arm inside the dashboard widget slot's union, so a member refusal there needs its own design. ## Acceptance notes — out of scope, not fixed here - `record:alert` reads a key named `body` as its message TEXT (through `readProps`, which merges the flat node key with `properties.body`), while its zod arm refuses a flat `body` with `BaseSchema`'s message, which names `children` as the remedy. Carrier: objectui#10872's flat-props batch. - A comment in `content-channel-family-d-9256.test.ts` above the chatbot rows still says `body` is ACCEPTED on `chatbot-enhanced` and `chatbot-floating`; the same file's LIVE CONTROL now asserts both refuse it. Carrier: the next family-D slice. --- _Generated by [Claude Code](https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d6d8fb9 commit 2049b03

12 files changed

Lines changed: 846 additions & 2 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
'@object-ui/types': minor
3+
---
4+
5+
**BREAKING (shipped as `minor` — see below):** thirteen node types now refuse
6+
both content channels by name. Each one's renderer reads neither `body` nor
7+
`children`, so an authored child list on it rendered nothing, with no
8+
render-time error or warning and no element; only the parser tier's
9+
`not-a-container` warning (objectui#9910) noticed it (objectui#9256).
10+
11+
- `markdown`, `chart`, `bar-chart`, `code-editor`, `detail`, `report`: both keys
12+
are now `?: never` on the TypeScript face (`MarkdownSchema`, `ChartSchema`,
13+
`BarChartSchema`, `CodeEditorSchema`, `DetailSchema`,
14+
`ReportComponentSchema`) and a by-name refusal on the zod mirror, each kept a
15+
member of the mirror shape.
16+
- `list-view`: a by-name refusal on the zod mirror. `ListViewSchema`'s
17+
TypeScript face is derived from that mirror, so it refuses both keys too.
18+
- `page-designer`, `data-model-designer`, `process-designer`,
19+
`report-designer`, `object-manager`, `field-designer`: `?: never` on the
20+
TypeScript face (`PageDesignerSchema`, `DataModelDesignerSchema`,
21+
`ProcessDesignerSchema`, `ReportDesignerSchema`, `ObjectManagerSchema`,
22+
`FieldDesignerSchema`). None of them has a zod mirror, so the TypeScript face
23+
is the only one that changes.
24+
25+
What moves for an author:
26+
27+
- `children` on any of these nodes type-checked, and parsed green where a zod
28+
mirror exists; it is now refused at authoring time and, where a zod mirror
29+
exists, at `safeParse` time, at its own path.
30+
- `body` was already refused on these faces, by `BaseSchema`. On the zod
31+
mirrors its refusal message now names what the node renders instead, where
32+
it used to point at `children`, which these nodes do not read either.
33+
34+
No render behaviour changes: nothing read these keys, which is the whole reason
35+
they could be refused.
36+
37+
Migration: each of these nodes renders from its own keys, so there is no channel
38+
to move the content to. Put it in the key the node does render (`markdown`'s
39+
`content`, a `detail` tab's `content`, a chart's `data`), place it beside the
40+
node in a container that reads `children`, or drop it.
41+
42+
`minor` rather than `major` because this repo's version policy forbids `major`
43+
in any changeset — one `fixed` group — and records `minor` plus an explicit
44+
breaking note as the spelling for a breaking change here.

‎packages/types/src/__tests__/content-channel-remeasure-9256.test.ts‎

Lines changed: 294 additions & 0 deletions
Large diffs are not rendered by default.

‎packages/types/src/crud.ts‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,40 @@ export interface DetailSchema extends BaseSchema {
364364
* @default false
365365
*/
366366
loading?: boolean;
367+
/**
368+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `detail` reads NEITHER
369+
* content channel; see `children` below for the measurement.
370+
*
371+
* {@link BaseSchema} already refuses `body` (objectui#6771), but its
372+
* refusal names `children` as the remedy, which this node does not read
373+
* either. The member is restated here so the refusal points at what the
374+
* node renders instead.
375+
*
376+
* @deprecated Not a channel `detail` reads — nothing renders it.
377+
*/
378+
body?: never;
379+
/**
380+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `detail` reads NEITHER
381+
* content channel, so an authored child list here rendered NOTHING: no
382+
* render-time error or warning and no element; only the parser tier's
383+
* `not-a-container` warning (objectui#9910) noticed it.
384+
*
385+
* Measured with the TypeScript type checker, not grep, over one program per
386+
* workspace package on a built tree (the family-D re-measure). The bare
387+
* `detail` key is owned by `view:detail` (`@object-ui/plugin-detail`),
388+
* which hands the node to `DetailView`; `DetailView` reads it as
389+
* `DetailViewSchema`, and no `body` or `children` read is filed under that
390+
* type. `SchemaRenderer` strips `body` and `children` out of the props bag
391+
* it spreads, so neither reaches the component by another route, and the
392+
* registration declares no `children` slot (objectui#9910).
393+
*
394+
* What it renders instead: the record named by `objectName` and
395+
* `resourceId`, laid out by `DetailView` from `fields`, `sections` and
396+
* `tabs`.
397+
*
398+
* @deprecated Not a channel `detail` reads — nothing renders it.
399+
*/
400+
children?: never;
367401
}
368402

369403
/**

‎packages/types/src/data-display.ts‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,38 @@ export interface MarkdownSchema extends BaseSchema {
17591759
* @deprecated Not part of `MarkdownSchema`'s contract — the value was inert.
17601760
*/
17611761
components?: never;
1762+
/**
1763+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `markdown` reads NEITHER
1764+
* content channel; see `children` below for the measurement.
1765+
*
1766+
* {@link BaseSchema} already refuses `body` (objectui#6771), but its
1767+
* refusal names `children` as the remedy, which this node does not read
1768+
* either. The member is restated here so the refusal points at what the
1769+
* node renders instead.
1770+
*
1771+
* @deprecated Not a channel `markdown` reads — nothing renders it.
1772+
*/
1773+
body?: never;
1774+
/**
1775+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `markdown` reads NEITHER
1776+
* content channel, so an authored child list here rendered NOTHING: no
1777+
* render-time error or warning and no element; only the parser tier's
1778+
* `not-a-container` warning (objectui#9910) noticed it.
1779+
*
1780+
* Measured with the TypeScript type checker, not grep, over one program per
1781+
* workspace package on a built tree (the family-D re-measure). The
1782+
* `markdown` registration (`@object-ui/plugin-markdown`) reads the node
1783+
* through an inline props type and forwards only `content` and `className`
1784+
* to the Markdown implementation; nothing on that path reads the node's
1785+
* `body` or `children`. `SchemaRenderer` strips `body` and `children` out
1786+
* of the props bag it spreads, so neither reaches the component by another
1787+
* route, and the registration declares no `children` slot (objectui#9910).
1788+
*
1789+
* What it renders instead: `content`, rendered as sanitized Markdown.
1790+
*
1791+
* @deprecated Not a channel `markdown` reads — nothing renders it.
1792+
*/
1793+
children?: never;
17621794
}
17631795

17641796
/**
@@ -2322,6 +2354,39 @@ export interface ChartSchema extends BaseSchema {
23222354
* segment opens a filtered list view (drawer/dialog).
23232355
*/
23242356
drillDown?: DrillDownConfig;
2357+
/**
2358+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `chart` reads NEITHER content
2359+
* channel; see `children` below for the measurement.
2360+
*
2361+
* {@link BaseSchema} already refuses `body` (objectui#6771), but its
2362+
* refusal names `children` as the remedy, which this node does not read
2363+
* either. The member is restated here so the refusal points at what the
2364+
* node renders instead.
2365+
*
2366+
* @deprecated Not a channel `chart` reads — nothing renders it.
2367+
*/
2368+
body?: never;
2369+
/**
2370+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `chart` reads NEITHER content
2371+
* channel, so an authored child list here rendered NOTHING: no render-time
2372+
* error or warning and no element; only the parser tier's `not-a-container`
2373+
* warning (objectui#9910) noticed it.
2374+
*
2375+
* Measured with the TypeScript type checker, not grep, over one program per
2376+
* workspace package on a built tree (the family-D re-measure). The `chart`
2377+
* registration (`@object-ui/plugin-charts`, and its `chart:bar` alias)
2378+
* reads the node through `ChartRenderer`'s inline props type; nothing on
2379+
* that path reads the node's `body` or `children`. `SchemaRenderer` strips
2380+
* `body` and `children` out of the props bag it spreads, so neither reaches
2381+
* the component by another route, and the registration declares no
2382+
* `children` slot (objectui#9910).
2383+
*
2384+
* What it renders instead: a chart of the `data` rows, drawn by `chartType`
2385+
* and `series`.
2386+
*
2387+
* @deprecated Not a channel `chart` reads — nothing renders it.
2388+
*/
2389+
children?: never;
23252390
}
23262391

23272392
/**
@@ -3314,6 +3379,39 @@ export interface BarChartSchema extends BaseSchema {
33143379
* @default '#8884d8'
33153380
*/
33163381
color?: string;
3382+
/**
3383+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `bar-chart` reads NEITHER
3384+
* content channel; see `children` below for the measurement.
3385+
*
3386+
* {@link BaseSchema} already refuses `body` (objectui#6771), but its
3387+
* refusal names `children` as the remedy, which this node does not read
3388+
* either. The member is restated here so the refusal points at what the
3389+
* node renders instead.
3390+
*
3391+
* @deprecated Not a channel `bar-chart` reads — nothing renders it.
3392+
*/
3393+
body?: never;
3394+
/**
3395+
* REFUSED BY NAME (objectui#9256, ADR-0049) — `bar-chart` reads NEITHER
3396+
* content channel, so an authored child list here rendered NOTHING: no
3397+
* render-time error or warning and no element; only the parser tier's
3398+
* `not-a-container` warning (objectui#9910) noticed it.
3399+
*
3400+
* Measured with the TypeScript type checker, not grep, over one program per
3401+
* workspace package on a built tree (the family-D re-measure). The
3402+
* `bar-chart` registration (`@object-ui/plugin-charts`) reads the node
3403+
* through `ChartBarRenderer`'s inline props type, which forwards `data`,
3404+
* `dataKey`, `xAxisKey`, `height`, `className` and `color` and nothing
3405+
* else. `SchemaRenderer` strips `body` and `children` out of the props bag
3406+
* it spreads, so neither reaches the component by another route, and the
3407+
* registration declares no `children` slot (objectui#9910).
3408+
*
3409+
* What it renders instead: one bar per `data` row, its value from `dataKey`
3410+
* and its category from `xAxisKey`.
3411+
*
3412+
* @deprecated Not a channel `bar-chart` reads — nothing renders it.
3413+
*/
3414+
children?: never;
33173415
}
33183416

33193417
/**

0 commit comments

Comments
 (0)