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

Commit 99878d8

Browse files
fix(sdui-parser): validateTree no longer calls a declared bind unknown (objectui#11008) (#11042)
Fixes #11008 Clause-②: no Seat `domain:ui#2`, PM session `session_011p7ikEivgXefNDaE5S5Uec`, branch `claude/issue-11008-bind-base-prop` (PM claim `5882983059`). Route 1 of the card, per triage direction `5874689995` and review addendum `5874136200`. ## What this changes `validateTree` (`@object-ui/sdui-parser`) keeps a `BASE_PROPS` set of keys every node may carry without an `unknown-prop` warning. `BaseSchema` declares `bind` and `hidden` for every node, and no registration declares either as an input. So the undeclared-key branch answered every authored one with `unknown-prop` (`has no prop "bind"`), including on the nodes that honour it: `list`, `tree-view` and the `object-*` widgets read `bind` through `useDataScope`, and `SchemaRenderer`'s hide chain reads `hidden` for every node. Both keys now join `BASE_PROPS`. - `packages/sdui-parser/src/validate.ts`: `'hidden'` and `'bind'` join `BASE_PROPS`. The docblock says why, names the accepted cost (`data-table` + `bind` is now silent at this tier), and says why `placeholder` stays out. - `packages/types/src/base.ts`: the `BaseSchema.bind` docblock, in its objectui#10981 wording, drops the parser half. It names the render-time `[ObjectUI] DataTable bind:` console warning (objectui#6575) as the one signal and says the parser tier is silent. - `packages/types/src/__tests__/silence-clause-parser-tier-closure-10981.test.ts`: `BIND_CLAUSE` is rewritten to that sentence. A negative assertion on the retired "`unknown-prop` warning both name it" wording is added, and the header's `bind` bullet records the move. - New pin `packages/sdui-parser/src/__tests__/base-props-bind-hidden-11008.test.ts` (the tier's reading of a manifest): - both keys draw nothing in every value shape `BaseSchema` admits; - the near-miss `bindTo` / `hide` still draws one `unknown-prop` naming it; - a registration that declares `placeholder` keeps its `type-mismatch`. - New pin `packages/components/src/renderers/__tests__/bind-base-prop-parser-tier-11008.test.tsx`, in the shape of `header-bar-unknown-prop-parser-tier-10981.test.tsx` (live registry): - no registration declares either key; - `list` / `tree-view` + `bind` or `hidden` draw nothing; - `data-table` + `bind` draws nothing; - the lit control, `bindTo` on `data-table`, draws `unknown-prop`; - across every live registration, neither key draws a diagnostic naming it. - `.changeset/11008-bind-base-prop.md`: `patch` for `@object-ui/sdui-parser` and `@object-ui/types`, because the docblock ships in the emitted `.d.ts`. Landing site as the claim declared it. No producer outside `sdui-parser` / `types` was involved. ## Bounded in-place fix: `hidden` (dispatch zone 2, item 2) Both keys the addendum named were measured through `validateTree` before deciding: - **`hidden` is included.** It drew `unknown-prop` on every registered type and is declared by none. That is the same defect class, fixed the same mechanical way in the same file, and checked by the same gate family. It is pinned beside `bind` in both new files. - **`placeholder` is left out.** It draws `unknown-prop` on the types that do not declare it. But the input family (`input`, `textarea`, `select`, `combobox`, `date-picker`, `element:text_input`, …) declares it as a typed input, and `BASE_PROPS` membership skips the declared-input lookup. Adding it would silence those registrations' `type-mismatch`, so the fix is not the same. It is left as it was, and the sdui-parser pin holds the type check it would have silenced. ## Measurements The probe was a temporary vitest file, deleted after use and never committed. It loaded `@object-ui/components`, `@object-ui/fields`, fourteen `plugin-*` packages and `plugin-tree` into the registry (488 known types at `b3c96d6bc`). It then built the manifest over every known key with `manifestFromConfigs` and ran `validateTree` once per key per type. | key | types drawing `unknown-prop` before | after | registrations declaring it | |---|---|---|---| | `bind` | 488 of 488 | 0 | 0 | | `hidden` | 488 of 488 | 0 | 0 | | `placeholder` | 470 | 470 | 18, each answering `placeholder: 424242` with `type-mismatch`, before and after | `bind` on each reader the docblock names drew `has no prop "bind"` before this change. The readers are `list`, `tree-view`, `object-chart`, `object-data-table`, `object-pivot`, `object-grid`, `object-kanban`, `object-gallery` and `object-timeline`. After the change, each draws nothing beyond its own bindless control's diagnostics (`missing-required-prop` for `objectName` and the like). `data-table` + `bind` also drew `unknown-prop` before and draws nothing after. ## Tests and gates The union ran after the final commit, at HEAD `2e74398a2`: - `pnpm exec vitest run packages/sdui-parser/ packages/types/`, plus three components pins (the two parser-tier pins and `skill-guide-data-table-binding.test.tsx`) and six `scripts/__tests__` changeset-state suites: **306 files, 6959 tests passed**. - The parser's consumer radius is every other test file importing `@object-ui/sdui-parser` (apps/console, cli, components, layout, plugin-*, schema-catalog, scripts, vscode-extension): **46 files, 893 tests passed**. - Gates at HEAD, each exit 0: `check-changeset-presence`, `check-control-bytes`, `check-new-cross-file-line-citations` (0 new), `check-pending-changeset-literals`, `check-changeset-no-major`. `check-governed-queue-guard --test` over the six paths answers NOT GOVERNED. Earlier runs, on the tree whose only later change is the changeset text: - `pnpm --filter @object-ui/PKG type-check` for `sdui-parser`, `types` and `components` exits 0 after `pnpm --filter '@object-ui/components^...' build`. `tsc --listFilesOnly` confirms that each package's test project reads the new or edited test file. - `pnpm exec eslint` on the five changed code files: 0 errors. The 20 warnings are pre-existing `no-explicit-any` in `base.ts`, outside this diff's hunk. - `check-changeset-claims`, `check-test-path-roots`, `check-phantom-dependencies`, `check-package-self-import` and `check-shell-escape-residue` each exit 0. Declared narrowing: the full `pnpm test`, the repo-wide `pnpm lint` and the full type-check farm are CI's. ## Reverse verification (one-off; both legs committed first, and neither left behind a permanent test) Both mutations used objectstack's `scripts/ablation-replace.mjs`, which wraps the command, checks the anchor count and blob change, and restores with `git checkout HEAD` plus a blob comparison. 1. **Deleting `'hidden',` and `'bind',` from `BASE_PROPS`.** Anchor 1 → 0, blob `0f8971827c72` → `43ca588eb800`. - Result: **6 failed, 6 passed (12)**. Every fix row went red: the `bind` / `hidden` value-shape rows, `list`, `tree-view`, `data-table`, and the all-registrations row. - The controls stayed green: the bare node, `bindTo` / `hide`, the `placeholder` type check, the "no registration declares either key" row, and `bindTo` on `data-table`. - Restored: blob equals HEAD `0f8971827c72`, and `git diff HEAD` is empty. - A first attempt in replace mode was refused by the tool, because the replacement was a substring of the anchor (count 1 → 1). It was restored at once, so it was a no-op, not a measurement. 2. **Planting the retired "`unknown-prop` warning both name it" wording back into the `bind` docblock.** Blob `b55fd9e624f4` → `90beeaf14308`. - Result: **1 failed, 8 passed (9)**. The failure is the `bind` docblock row. - Restored: blob equals HEAD `b55fd9e624f4`. Direction was red both times, as expected. On the resolution path: the root vitest alias maps `@object-ui/sdui-parser` to `packages/sdui-parser/src`, so each mutation reached the subject without a build. ## For objectui#11009 (`domain:skills`): what the `protocol.md` sentence must say `skills/objectui/rules/protocol.md`'s "**Readers only.**" paragraph ends "…renders its header over an empty body — no error, no warning." After this change, the true sentence names the console warning only, and says the parser tier does not flag the key. For example: > `data-table` does NOT: it reads its rows from an inline `data` array on the node, so a `bind` on it is ignored and the table renders its header over an empty body. Nothing on the page says why; the one signal is a render-time console warning (`[ObjectUI] DataTable bind:`). The parser tier does not flag it either: `bind` is a base prop there, legal on every node. `skills/**` is not touched here. ## Acceptance notes - **The `metric-card` in `widgets` candidate row** (review `5878173500`) is not taken. `validateTree`'s traversal is untouched (seat decision). It remains a note for whoever next touches that traversal. - **The same family, measured but not fixed here** (outside the dispatch's two named keys): - `visibleWhen`, `hiddenOn` and `testId` draw `unknown-prop` on all 488 types and are declared by none. `SchemaRenderer`'s hide chain reads `visibleWhen` / `hiddenOn` for every node, and it strips and re-emits `testId`. The mechanical fix would be the same. - The canonical ADR-0089 `visibleWhen` warns, while the deprecated `visibleOn`, which is in `BASE_PROPS`, stays silent. - `name`, `label`, `description`, `data` and `ariaLabel`, like `placeholder`, are declared as typed inputs by some registrations. For those, joining `BASE_PROPS` trades away type checks, which is a decision rather than a mechanical fix. - These go to the seat as one family, for a closure card. - **The parser's JSX type surface still refuses both keys.** `SduiBaseProps` in `packages/sdui-parser/src/codegen.ts` (written into `sdui-intrinsics.d.ts` by `scripts/gen-manifest.ts`) is a second hand-kept base-prop list. Measured: with the generated types, `tsc` refuses `bind` and `hidden` on `list` with TS2322, while a declared `title` compiles. Not touched here (file surface); reported. - **objectstack's save-gate copy of `validate.ts` keeps the pre-change `BASE_PROPS`.** `validateJsxPages` runs it when a manifest is resolved. `check-sdui-lockstep.mjs` compares the code set, the parse grammar region and the containment predicate, so it cannot see this split. A port to that copy is owed; reported. - **A pending changeset now describes superseded wording.** `.changeset/10981-silence-clause-parser-tier-closure.md` describes the intermediate `bind` docblock wording (the parser half). Both entries release together. This PR's changeset names the supersession, and the objectui#10981 body is not edited here. --- _Generated by [Claude Code](https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2eaf5be commit 99878d8

6 files changed

Lines changed: 270 additions & 16 deletions

File tree

‎.changeset/11008-bind-base-prop.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/sdui-parser': patch
3+
'@object-ui/types': patch
4+
---
5+
6+
`validateTree` no longer calls a declared `bind` or `hidden` unknown (objectui#11008).
7+
8+
`BaseSchema` declares `bind` and `hidden` for every node, and no registration declares either as an input. `validateTree`'s base-prop set held neither, so its undeclared-key branch answered every authored one with an `unknown-prop` warning (`has no prop "bind"`), including on the nodes that honour it: `list`, `tree-view` and the `object-*` widgets read `bind` through `useDataScope`, and `SchemaRenderer` reads `hidden` for every node. Both are now base props of the parser tier, so neither draws a diagnostic on any node. A near-miss spelling such as `bindTo` still draws `unknown-prop`.
9+
10+
The cost is named rather than hidden. `data-table` does not read `bind` (objectui#6575), and a `bind` on it now draws nothing at the parser tier either. Its render-time console warning (`[ObjectUI] DataTable bind:`) is the one signal left. The `BaseSchema.bind` docblock, which ships in the emitted `.d.ts`, said that the console warning and the parser tier's `unknown-prop` both named such a `bind`. It now names the console warning as the one signal and says the parser tier is silent. That supersedes the wording the objectui#10981 entry describes for the same docblock: the parser half it names held until this change.
11+
12+
`placeholder` is also a `BaseSchema` member that `validateTree` does not count as a base prop, and it is left as it was. Some registrations declare it as a typed input, and a base prop skips the declared-input lookup, so adding it would silence their `type-mismatch`.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/**
10+
* The parser tier's answer to `bind` and `hidden`, held on the live registry
11+
* (objectui#11008).
12+
*
13+
* `BaseSchema` declares both keys for every node. Until objectui#11008,
14+
* `validateTree` (`@object-ui/sdui-parser`) did not count either among its base
15+
* props and no registration declares either as an input, so the undeclared-key
16+
* branch answered every authored one with `unknown-prop` — on `list` and
17+
* `tree-view` too, whose renderers read `bind` through `useDataScope`, and on
18+
* every node for `hidden`, which `SchemaRenderer`'s hide chain reads for all of
19+
* them. Both are base props now.
20+
*
21+
* That moves one published sentence. `data-table` does NOT read `bind`
22+
* (objectui#6575's ruling: it must not start), and the `BaseSchema.bind`
23+
* docblock used to say that both a render-time console warning and the parser
24+
* tier's `unknown-prop` named such a `bind`. The parser half is gone: this file
25+
* pins that `data-table` + `bind` now draws nothing here, and the docblock says
26+
* the console warning is the one signal. That warning is pinned by
27+
* `packages/components/src/__tests__/skill-guide-data-table-binding.test.tsx`.
28+
*
29+
* The manifest is built the way `header-bar-unknown-prop-parser-tier-10981.test.tsx`
30+
* builds it — every KNOWN registry key of this package, through
31+
* `manifestFromConfigs` — so a registration that starts declaring either key
32+
* as an input turns the first test red, and a parser change that takes either
33+
* key back out of the base props turns the rest red.
34+
*/
35+
36+
import { describe, it, expect } from 'vitest';
37+
import { ComponentRegistry } from '@object-ui/core';
38+
import { manifestFromConfigs, validateTree } from '@object-ui/sdui-parser';
39+
import type { Diagnostic, SchemaElement } from '@object-ui/sdui-parser';
40+
41+
// Module scope, not a hook: this import IS the registration (AGENTS.md
42+
// §测试纪律 — an unbounded module load must not be billed to a bounded window).
43+
import '../index';
44+
45+
/** Every live registry key, as `header-bar-unknown-prop-parser-tier-10981.test.tsx` builds it. */
46+
const diagnose = (schema: unknown): Diagnostic[] => {
47+
const configs = ComponentRegistry.getKnownTypes().map((t) => {
48+
const meta = ComponentRegistry.getMeta(t);
49+
return { type: t, namespace: meta?.namespace, isContainer: meta?.isContainer, inputs: meta?.inputs };
50+
});
51+
const manifest = manifestFromConfigs(configs as unknown as Parameters<typeof manifestFromConfigs>[0]);
52+
return validateTree(schema as SchemaElement, manifest).diagnostics;
53+
};
54+
55+
const KEYS = { bind: 'users', hidden: true } as const;
56+
57+
/** Valid nodes: each draws nothing on its own, so any diagnostic below is the key's. */
58+
const READERS = {
59+
list: { type: 'list', items: ['Ada', 'Grace'] },
60+
'tree-view': { type: 'tree-view', nodes: [{ id: 'a', label: 'A' }] },
61+
} as const;
62+
const DATA_TABLE = {
63+
type: 'data-table',
64+
columns: [{ header: 'Name', accessorKey: 'name' }],
65+
data: [{ name: 'Ada' }],
66+
} as const;
67+
68+
describe('`bind` and `hidden` are base props of the parser tier (objectui#11008)', () => {
69+
it('no live registration declares either key as an input', () => {
70+
const types = ComponentRegistry.getKnownTypes();
71+
// Non-vacuity: the registry this file judges is populated, and holds the three nodes below.
72+
for (const type of [...Object.keys(READERS), 'data-table']) expect(types).toContain(type);
73+
const declaring = types.flatMap((type) =>
74+
(ComponentRegistry.getMeta(type)?.inputs ?? [])
75+
.filter((input) => input.name in KEYS)
76+
.map((input) => `${type}.${input.name}`),
77+
);
78+
expect(declaring).toEqual([]);
79+
});
80+
81+
it.each(Object.keys(READERS) as Array<keyof typeof READERS>)(
82+
'`%s` — a `bind` its renderer reads, and a `hidden`, draw nothing',
83+
(type) => {
84+
const node = READERS[type];
85+
expect(diagnose(node)).toEqual([]);
86+
for (const [key, value] of Object.entries(KEYS)) {
87+
expect(diagnose({ ...node, [key]: value }), key).toEqual([]);
88+
}
89+
},
90+
);
91+
92+
it('`data-table` + `bind` draws nothing here — its render-time console warning is the one signal', () => {
93+
expect(diagnose(DATA_TABLE)).toEqual([]);
94+
expect(diagnose({ ...DATA_TABLE, bind: 'customers' })).toEqual([]);
95+
expect(diagnose({ ...DATA_TABLE, hidden: true })).toEqual([]);
96+
});
97+
98+
it('lit control: an undeclared near-miss on `data-table` still draws `unknown-prop` naming it', () => {
99+
const found = diagnose({ ...DATA_TABLE, bindTo: 'customers' });
100+
expect(found.map((d) => d.code)).toEqual(['unknown-prop']);
101+
expect(found[0]!.message).toContain('"bindTo"');
102+
});
103+
104+
it('across every live registration, neither key draws a diagnostic naming it', () => {
105+
const types = ComponentRegistry.getKnownTypes();
106+
expect(types.length).toBeGreaterThan(0);
107+
const named = types.flatMap((type) =>
108+
Object.entries(KEYS).flatMap(([key, value]) =>
109+
diagnose({ type, [key]: value })
110+
.filter((d) => d.message.includes(`"${key}"`))
111+
.map((d) => `${type}.${key} → ${d.code}`),
112+
),
113+
);
114+
expect(named).toEqual([]);
115+
});
116+
});
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/**
10+
* `bind` and `hidden` are base props of the tier (objectui#11008).
11+
*
12+
* `BaseSchema` (`@object-ui/types`) declares both for every node, and no
13+
* registration declares either as an input. Before they joined `BASE_PROPS`,
14+
* the undeclared-key branch answered every authored one with `unknown-prop`
15+
* ("has no prop"), including on the nodes that honour it: `SchemaRenderer`
16+
* reads `hidden` for every node, and every `useDataScope` renderer reads
17+
* `bind`. This file pins the TIER's reading of a manifest; the live-registry
18+
* half — `list`, `tree-view` and `data-table` — is
19+
* `packages/components/src/renderers/__tests__/bind-base-prop-parser-tier-11008.test.tsx`.
20+
*
21+
* Three facts, kept apart because each one fails differently:
22+
*
23+
* - both keys draw nothing, in every value shape `BaseSchema` admits for
24+
* them — the fix;
25+
* - a near-miss spelling (`bindTo`, `hide`) on the SAME node still draws
26+
* `unknown-prop` naming it — the lit control. Without it, "draws nothing"
27+
* would also pass against a tier that stopped warning on undeclared keys;
28+
* - a registration that DECLARES `placeholder` keeps its `type-mismatch`.
29+
* `placeholder` is a `BaseSchema` member too, and it stayed OUT of the set
30+
* because membership skips the declared-input lookup: this row goes red if
31+
* it is added the way `bind` and `hidden` were.
32+
*/
33+
import { describe, expect, it } from 'vitest';
34+
import { manifestFromConfigs, validateTree } from '../index.js';
35+
import type { Diagnostic, Manifest, SchemaElement } from '../types.js';
36+
37+
const manifest: Manifest = manifestFromConfigs([
38+
// a leaf that declares neither key, as no live registration does
39+
{ type: 'leaf', namespace: 'ui', inputs: [{ name: 'content', type: 'string' }] },
40+
// the input-family shape: `placeholder` declared as a typed input
41+
{ type: 'field', namespace: 'ui', inputs: [{ name: 'placeholder', type: 'string' }] },
42+
] as unknown as Parameters<typeof manifestFromConfigs>[0]);
43+
44+
const diagnose = (node: unknown): Diagnostic[] =>
45+
validateTree(node as SchemaElement, manifest).diagnostics;
46+
47+
const LEAF = { type: 'leaf', content: 'x' };
48+
49+
/** Every value shape `BaseSchema` declares for the two keys. */
50+
const BASE_VALUES: Record<'bind' | 'hidden', unknown[]> = {
51+
bind: ['users', 'app.settings.users'],
52+
hidden: [true, false, '${data.role !== "admin"}', { dialect: 'cel', source: "record.status == 'draft'" }],
53+
};
54+
55+
describe('objectui#11008 — `bind` and `hidden` are base props of the parser tier', () => {
56+
it('the control node draws nothing', () => {
57+
expect(diagnose(LEAF)).toEqual([]);
58+
});
59+
60+
it.each(Object.keys(BASE_VALUES) as Array<keyof typeof BASE_VALUES>)(
61+
'`%s` draws no diagnostic, in every value shape BaseSchema admits',
62+
(key) => {
63+
const drew = BASE_VALUES[key]
64+
.map((value) => [value, diagnose({ ...LEAF, [key]: value })] as const)
65+
.filter(([, found]) => found.length > 0)
66+
.map(([value, found]) => `${JSON.stringify(value)} → ${JSON.stringify(found.map((d) => d.code))}`);
67+
expect(drew).toEqual([]);
68+
},
69+
);
70+
71+
it.each([
72+
['bindTo', 'users'],
73+
['hide', true],
74+
] as const)('lit control: the near-miss `%s` still draws one `unknown-prop` naming it', (key, value) => {
75+
const found = diagnose({ ...LEAF, [key]: value });
76+
expect(found.map((d) => d.code)).toEqual(['unknown-prop']);
77+
expect(found[0]!.message).toContain(`"${key}"`);
78+
});
79+
80+
it('a registration that declares `placeholder` keeps its type check — why `placeholder` stayed out', () => {
81+
expect(diagnose({ type: 'field', placeholder: 'Search…' })).toEqual([]);
82+
const found = diagnose({ type: 'field', placeholder: 42 });
83+
expect(found.map((d) => d.code)).toEqual(['type-mismatch']);
84+
expect(found[0]!.message).toContain('"placeholder"');
85+
});
86+
});

‎packages/sdui-parser/src/validate.ts‎

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,30 @@ export function acceptsChildren(comp: Pick<ManifestComponent, 'inputs'>): boolea
5959
}
6060

6161
/**
62-
* Base props every node may carry (mirrors BaseSchema) — never "unknown prop".
62+
* Base props every node may carry (mirrors BaseSchema: every entry is one of
63+
* its members, though not every member is an entry — see the ⚠️ below) —
64+
* never "unknown prop".
65+
*
66+
* `bind` and `hidden` ARE here (objectui#11008). `BaseSchema` declares both for
67+
* every node and no registration declares either as an input, so before they
68+
* joined, the undeclared-key branch below answered every authored one with
69+
* `unknown-prop` — "has no prop" about a key the protocol declares, on the
70+
* nodes that honour it: `hidden` is read for every node by `SchemaRenderer`'s
71+
* hide chain, and `bind` by every renderer that calls `useDataScope` (`list`,
72+
* `tree-view`, the `object-*` widgets). The declaration outranks the
73+
* implementation, so the parser's view is the declared type's, not a
74+
* per-registration subset. The cost is accepted and named: a `bind` on a node
75+
* that does not read it — `data-table` (objectui#6575) — draws nothing here
76+
* either, and its render-time console warning is the one signal left. Held
77+
* over `@object-ui/components`' live registry — that none of its registrations
78+
* declares either key included — by `bind-base-prop-parser-tier-11008.test.tsx`
79+
* there.
80+
*
81+
* ⚠️ Membership SKIPS the declared-input lookup below, type check included. So
82+
* a `BaseSchema` member some registrations DECLARE as a typed input — e.g.
83+
* `placeholder` on the input family — is not a mechanical addition: joining
84+
* would silence those registrations' `type-mismatch`. Such a member stays out
85+
* until that trade is decided.
6386
*
6487
* ⛔ `body` is NOT here and must not be added. It was `BaseSchema`'s second
6588
* child-list spelling until objectui#6771 retired it; teaching this set the key
@@ -81,6 +104,8 @@ const BASE_PROPS = new Set([
81104
'visibleOn',
82105
'disabled',
83106
'disabledOn',
107+
'hidden',
108+
'bind',
84109
CHILD_LIST_KEY,
85110
]);
86111

‎packages/types/src/__tests__/silence-clause-parser-tier-closure-10981.test.ts‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@
1212
* (`unknown-prop`).
1313
*
1414
* Four more sites in this package said an authored value drew no error and no
15-
* warning. The parser tier's `validateTree` (`@object-ui/sdui-parser`) answers
16-
* each of them, with the code the registration's declared inputs decide:
15+
* warning. The parser tier's `validateTree` (`@object-ui/sdui-parser`)
16+
* answered each of them when objectui#10981 landed, with the code the
17+
* registration's declared inputs decide (one has moved since — the `bind` row):
1718
*
1819
* - `FormSchema.mode` (`zod/form.zod.ts`, objectui#10286, zod face):
1920
* `form` declares no `mode` input, so every spelling draws `unknown-prop`.
2021
* - `TimelineSchema.events` (`data-display.ts`, objectui#6170, TS face):
2122
* neither the presentational `TimelineRenderer` registration this type
2223
* describes nor the view registration the bare key resolves to declares
2324
* `events`, so it draws `unknown-prop`.
24-
* - `BaseSchema.bind` on `data-table` (`base.ts`, TS face): `data-table`
25-
* declares no `bind` input, so it draws `unknown-prop`. This one was not
26-
* silent at render either: `data-table` has logged a console warning for
27-
* an authored `bind` since objectui#6575, so the clause names both.
25+
* - `BaseSchema.bind` on `data-table` (`base.ts`, TS face): this one was
26+
* not silent at render: `data-table` has logged a console warning for an
27+
* authored `bind` since objectui#6575. When objectui#10981 landed, the
28+
* parser tier answered it with `unknown-prop` too, and the clause named
29+
* both. objectui#11008 made `bind` a base prop of `validateTree` — every
30+
* node may carry it, so it draws nothing there — and the clause now names
31+
* the console warning as the one signal and the parser tier as silent.
2832
* - The bare `exportOptions` array on `object-grid` (`zod/objectql.zod.ts`,
2933
* objectui#7762, the source note above the refusal string): the
3034
* registration declares `exportOptions` as an object, so an array draws
@@ -38,7 +42,9 @@
3842
* clauses — every key spelling and value shape each sentence describes, over
3943
* the live registry, with a render leg — are on objectui#10981's pull request:
4044
* a record of one run, not re-derived here. The `data-table` render warning is
41-
* pinned in `packages/components`, by `skill-guide-data-table-binding.test.tsx`.
45+
* pinned in `packages/components`, by `skill-guide-data-table-binding.test.tsx`;
46+
* the parser tier's silence on a `bind` since objectui#11008 is re-derived there
47+
* too, over the live registry, by `bind-base-prop-parser-tier-11008.test.tsx`.
4248
*
4349
* ## What is pinned, and what is deliberately not
4450
*
@@ -62,8 +68,13 @@ const UNKNOWN_PROP_TAIL = "only the parser tier's `unknown-prop` warning noticed
6268
const FORM_CLAUSE = `rendered the same form — no render-time error or warning; ${UNKNOWN_PROP_TAIL}`;
6369
const TIMELINE_CLAUSE = `drew an EMPTY rail, with no render-time error or warning; ${UNKNOWN_PROP_TAIL}`;
6470
const BIND_CLAUSE =
65-
'with no render-time error; nothing on the page says why, but a render-time console warning '
66-
+ "(`[ObjectUI] DataTable bind:`, objectui#6575) and the parser tier's `unknown-prop` warning both name it";
71+
'with no render-time error; nothing on the page says why. The one signal is a render-time console warning '
72+
+ '(`[ObjectUI] DataTable bind:`, objectui#6575; pinned in '
73+
+ '`components/src/__tests__/skill-guide-data-table-binding.test.tsx`). The parser tier stays silent on it: '
74+
+ '`validateTree` counts `bind` among the base props every node may carry (objectui#11008), '
75+
+ 'so a `bind` draws no `unknown-prop` there, on `data-table` or on any other node';
76+
/** The objectui#10981 wording, false since objectui#11008 made `bind` a parser-tier base prop. */
77+
const RETIRED_BIND_CLAUSE = "the parser tier's `unknown-prop` warning both name it";
6778
const EXPORT_CLAUSE =
6879
"no render-time error, warning or console line (only the parser tier's `type-mismatch` warning noticed it)";
6980

@@ -166,10 +177,11 @@ describe('objectui#10981 — the TS-face docblocks name what the parser tier ans
166177
for (const old of RETIRED) expect(doc).not.toContain(old);
167178
});
168179

169-
it('`BaseSchema.bind` names the `data-table` console warning and `unknown-prop`', () => {
180+
it('`BaseSchema.bind` names the `data-table` console warning as the one signal, and the parser tier as silent (objectui#11008)', () => {
170181
const doc = memberDocblock(read(`${SRC}/base.ts`), 'BaseSchema', 'bind');
171182
expect(doc).toContain('`data-table` does NOT');
172183
expect(doc).toContain(BIND_CLAUSE);
184+
expect(doc).not.toContain(RETIRED_BIND_CLAUSE);
173185
for (const old of RETIRED) expect(doc).not.toContain(old);
174186
});
175187
});

‎packages/types/src/base.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,14 @@ export interface BaseSchema {
277277
* widgets in `plugin-charts` / `plugin-dashboard` (×2) / `plugin-grid` /
278278
* `plugin-kanban` / `plugin-list` / `plugin-timeline`. ⚠️ `data-table` does
279279
* NOT: a `bind` on it is ignored and the table renders its header over an
280-
* empty body, with no render-time error; nothing on the page says why, but a
281-
* render-time console warning (`[ObjectUI] DataTable bind:`, objectui#6575)
282-
* and the parser tier's `unknown-prop` warning both name it
283-
* (`protocol.md`, and pinned in
284-
* `components/src/__tests__/skill-guide-data-table-binding.test.tsx`).
280+
* empty body, with no render-time error; nothing on the page says why. The
281+
* one signal is a render-time console warning
282+
* (`[ObjectUI] DataTable bind:`, objectui#6575; pinned in
283+
* `components/src/__tests__/skill-guide-data-table-binding.test.tsx`). The
284+
* parser tier stays silent on it: `validateTree` counts `bind` among the base
285+
* props every node may carry (objectui#11008), so a `bind` draws no
286+
* `unknown-prop` there, on `data-table` or on any other node (pinned in
287+
* `components/src/renderers/__tests__/bind-base-prop-parser-tier-11008.test.tsx`).
285288
* Declaring the key here does not change that, and does not bless it — the
286289
* key was already accepted on every node before this declaration existed.
287290
*

0 commit comments

Comments
 (0)