This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 0e6e76b
fix(types): a gate-wrapped arm waives
Fixes #11117
Clause-②: yes (narrowing): a widening on six arms (a non-empty
`dataSource.object` counts as a record source), plus one narrowing on
the `object-map` bag arm (an empty `dataSource.object` no longer counts)
**What this does.** The tolerant face (`safeValidateSchema`, which
`objectui validate` runs) now accepts a node bound through
`dataSource.object` without an `objectName` on every gate-wrapped arm
that has a record-source requirement: `object-grid`, `list-view`,
`object-kanban`, `object-calendar`, `object-gantt` and `object-map`. The
binding counts only when `dataSource.object` is a non-empty string, as
the spec gate's `strName` and the runtime's `isElementDataSourceConfig`
read it. A node with neither is still refused, and `dataSource: {
object: '' }` supplies nothing. Dispatched by the `domain:spec @
objectui` seat, session `session_01VhxTqosz7wn54ahqyxgERT`.
## The change
- **One refinement.** `requireRecordSource(type, rungs)` in
`packages/types/src/zod/objectql.zod.ts` now takes each arm's own rung
list and counts the binding as the last rung, using
`dataSourceSuppliesObject`. That predicate is the one `element:number`'s
spec waiver already used; it is now exported from `public-blocks.zod.ts`
as an internal helper, so there is one copy, and it is not re-exported
from `index.zod.ts`.
- It is installed with `when: () => true`, so the refusal is reported
beside any other issue on the node. On `object-grid` and `list-view` the
required member used to behave that way, and the refinement keeps it.
- `object-kanban`'s hand-copied `requireKanbanRecordSource` is gone. The
kanban arm now calls the shared helper with `bind` / `data` /
`objectName`.
- **Where the refusal lands.** On `object-grid` and `list-view`,
`objectName` is optional as a member and the refinement requires it
unless a binding is present. The refusal is reported at `objectName`,
the path the required member used, so `objectui validate` still prints
`Path: objectName` (`validate-union-arm-selection.test.ts` stays green).
The issue is now `custom` with `params.code = 'RECORD_SOURCE_REQUIRED'`.
The four ladder arms still report at the root.
- **Each arm's `objectName` describe** names the waiver.
- **`ObjectViewSchema.table`** rebuilds the grid shape onto `BaseSchema`
before its `.omit()`. zod 4 throws on `.omit()` of a refined object, and
the grid now carries a refinement. The slot is unchanged: same keys,
same `.passthrough()`, no record-source check.
- **Docs, in `content/docs/utilities/data-objectstack.mdx`.**
- The "Narrowing a saved view" fence now writes its `filter` as the
spec's rule array, `[{ "field": "total", "operator": "greater_than",
"value": 100 }]`.
- The `ElementDataSource` excerpt types `filter` as `ViewFilterRule[]`,
and its fragment marker gives the new reason.
- **Docs elsewhere.** The data-binding guide
(`content/docs/guide/data-source.md`) and
`content/docs/api/schema-reference.md` say a bound node needs no
`objectName`.
- **Changeset.** `.changeset/11117-datasource-objectname-waiver.md`
bumps `@object-ui/types` minor (a widening).
## Premises, measured on `origin/main` `1ccb5ba7d` against the built
`@object-ui/types` dist
The probe ran every documented binding through `AnyComponentSchema`
(tolerant) and `StrictAnyComponentSchema`.
- **H1 holds, and the form half is already answered.** objectui#10859
batch 4 moved `object-form` onto `ObjectFormBlockSchema`. `{ "type":
"object-form", "dataSource": { "object": "user" } }` already parses on
both faces, and the `mode` refusal belonged to the flat arm, which no
longer judges authored documents.
- The spec's `object-form` row declares `objectName` optional, so the
bag arm has nothing to waive. A form node with neither key also parses,
as the spec row allows; the renderer's inline `customFields` path is one
reason a node can lack both. ⛔ This change does not narrow that.
- The same holds for `object-metric`, `object-timeline` and
`object-master-detail-form`: their rows require no object key.
- **H2 holds.** `object-kanban`'s "has no record source" was the same
gap: `dataSource.object` was missing from its ladder. Calendar, gantt
and map refused their bound nodes the same way. All three registrations
are gate-wrapped, and their mapping lands `binding.object` on
`objectName`.
- **H3 holds.** On the base, the "Narrowing a saved view" fence was
refused twice: `objectName` `invalid_type`, and `dataSource.filter`
`invalid_type` for the record form. Both are gone.
- **After, on the head.** Every json binding fence on both pages parses
on both faces.
- The new pin reads the fences off disk.
- The probe also kept the old record-form document: it is still refused,
at `dataSource.filter` only, which is the spec's own refusal.
## The TypeScript twin of `ObjectGridSchema` keeps `objectName: string`
- **Why not optional.** Making it optional reddens five
`translateOptions(schema.objectName, …)` read sites in
`@object-ui/plugin-grid`'s `ObjectGrid.tsx`. I measured this with a
source-mapped `tsc` program over core, plugin-grid, plugin-list,
plugin-view, plugin-calendar, plugin-gantt, plugin-dashboard,
plugin-designer and app-shell. Changing those sites is renderer typing,
outside this card's file surface.
- **How the difference is recorded.** The declaration's doc says why it
stays `string`. The mirror's wider `objectName` is a CONCRETE entry in
`zod-mirror-parity.test.ts`'s `WiderThanDeclared` ledger, with its
`WIDER_ARMS` row and the header figures. The ledger reddens when the two
faces agree again.
- **`ListViewSchema`** is derived from its mirror, so its `objectName`
is now optional. The same consumer program reported no error from that.
## Texts this change made false
**Corrected here.**
- The `object-grid` `objectName` row and the kanban record-source note
in `schema-reference.md`.
- The kanban `groupBy` docblock in `objectql.ts`, which said the
documented `{ type, dataSource }` fragment is still refused. Also the
kanban TS docblock and the `objectql.zod.ts` docblocks that named
`requireKanbanRecordSource`.
- Dated, append-only `**Correction, 2026-10-01**` notes on four pending
changesets: objectui#6939, objectui#7313, objectui#7780 and
objectui#8990. Their front matter is byte-identical.
**Corrected in round 2 (`2666d824b`).**
- The `objectName` input descriptions on the `object-map`,
`object-gantt` and `object-calendar` registrations, and on
`view:calendar`, which shares the calendar list, now end with: "…refuses
a block that declares none of them, unless the node's
`dataSource.object` names the object, which then lands on this key."
- No input name, type, `required` flag or shape moved.
- `registry-inputs-spec-parity.test.ts` ran read-only and passed 230/230
untouched.
- The `plugin-gantt` and `plugin-kanban` READMEs, and the comments next
to the three registrations, carry the same correction.
- The pending objectui#7470 and objectui#10392 changesets get dated,
append-only corrections.
- `.changeset/11117-registration-objectname-description.md` bumps the
three plugins as a patch.
**CI repair (round 2).** `scripts/markdown-test-inputs.mjs`
`ADJUDICATED` now registers
`element-data-source-objectname-waiver-11117.test.ts` as reading
`content/docs/utilities/data-objectstack.mdx` and
`content/docs/guide/data-source.md`.
- `markdown-test-inputs.test.ts` was red at `993a0c85c` (1 failed / 24
passed) and is 25/25 at `2666d824b`.
- `--audit` reports 108 candidate test files, all adjudicated.
**Round 2 gates, at `2666d824b`:**
- The doc-snippet build closure built (35/35 turbo tasks).
`check:doc-snippets` then passed with 698 of 698 compiled blocks and 0
failed. This replaces the round-1 NOT MEASURED.
- `check:readme-exports` passed.
- `type-check` passed for plugin-map, plugin-gantt and plugin-calendar.
- A 34-file vitest union passed, 1674 tests: every adjudicated reader of
the five edited markdown files, the ledger script's tests, and the
description pins.
- `check:new-line-citations`, `check:control-bytes`,
`check:changeset-claims`, `check-changeset-presence` and
`check-changeset-no-major` all exited 0.
**Round 3 (`01b9fb478`), from contract record 5923725485.** Two
one-clause corrections:
- `content/docs/guide/data-source.md` now says the validator refuses one
of the six blocks only when it declares no other record source and names
its object in neither place. The binding is "a" record source, not "the"
one.
- The `@object-ui/types` changeset now says the base refused the
documented `object-grid`, `list-view` and `object-kanban` bindings, not
every documented binding.
Gates at `01b9fb478`:
- the 11117 pin: 47/47;
- `markdown-test-inputs.test.ts`: 25/25, and `--audit` is clean;
- the 19-file union of the edited files' readers: 819/819;
- `check:doc-snippets`: 698/698 compiled, 0 failed;
- `check:doc-fences`, `check:changeset-claims`,
`check-changeset-presence`, `check:new-line-citations` and
`check:control-bytes`: all exit 0.
**Round 4: merge of `main` (`80ec249bc`).** The merge brings in
objectui#10859 batch 5, under which an authored `object-map` is judged
by its `properties`-bag arm, `ObjectMapBlockSchema`. That arm already
counted a `dataSource` binding, by its presence alone.
- **Conflict in `objectql.zod.ts`.** Batch 5's `at: 'properties'` mode
and this PR's rung list, binding predicate and `when: () => true` are
now ONE helper, `requireRecordSource(type, rungs, at)`.
- **The one narrowing.** The bag arm now counts only a non-empty
`dataSource.object`, like every other arm and like the runtime. So `{
"type": "object-map", "dataSource": { "object": "" } }` with no bag rung
is refused with `RECORD_SOURCE_REQUIRED`. It used to parse, and it
rendered no records.
- **Conflict in `plugin-map/src/index.tsx`.** Main's text is taken. Its
`objectName` input description already names the node's `dataSource`
binding, so this PR no longer edits that file.
- **Population.** Still six arms. `object-map` is now judged on its bag
arm, which keeps a record-source rule read in `properties`. The flat
`ObjectMapSchema` mirror is no longer an arm of the face, and it keeps
the same rule on the node.
- **Pins.** The 11117 pin's `object-map` row moves to
`ObjectMapBlockSchema`, and the flat mirror gets its own case. Batch 5's
flat-key pin (`object-map-properties-bag-10859-b5.test.ts`) now expects
the root `RECORD_SOURCE_REQUIRED` issue beside its flat-key refusals.
- **Changesets.** Both 11117 changesets are corrected for the bag arm
and its one narrowing, and `plugin-map` leaves the registration
changeset.
- **Gates at `80ec249bc`:**
- `@object-ui/types`: build, type-check, and 306 files / 7,734 tests,
all passing.
- plugin-map, plugin-gantt and plugin-calendar: type-check passing.
- A 122-file union of consumers, readers and pins: 2,656 tests passing.
It includes the record-source pins and a read-only run of
`registry-inputs-spec-parity.test.ts` (230/230).
- `markdown-test-inputs`: 25/25, and `--audit` is clean.
- `check:doc-snippets`: 698/698.
- `check:changeset-claims`, `check-changeset-presence`,
`check-changeset-no-major`, `check:new-line-citations` and
`check:control-bytes`: all exit 0.
**Round 5 (`2a237f0ec`): a CI repair.** The round-4 merge resolution
escaped the backticks in `requireRecordSource`'s two `binding` strings.
Those strings are single-quoted, so the escapes are useless, and
`no-useless-escape` failed `Lint` with 6 errors.
- The escapes are dropped. The string values are byte-identical.
- `pnpm --filter @object-ui/types run lint` reports 0 errors. eslint
`--format json` over all 12 TS/JS files in this diff also reports 0
errors.
- `@object-ui/types` type-check passed. The 11117 pin and the batch-5
bag pin passed 93/93.
## The census fixtures (24 in 18 files, from PR objectui#11286's list):
judged, then handed back as a worklist
**What I recommend.** Convert 21 fixtures and keep 3. The conversion is
separable from the validator change and spans 11 packages and 15
dom-test files. Each file asserts the merged filter the gate produces,
so its expected values may need re-spelling. Nothing here converts a
fixture.
**Keep (3).** Each pins how a renderer handles a stored legacy shape:
- `record-picker-malformed-filter-10789.test.tsx`: the `$regex` record,
and its well-formed record control.
- `ElementDataSourceGate.malformedFilter-10789.test.tsx`: the `$gt`
record control.
**Convert (21).** Each fixture's subject is the authored binding, and it
reaches the gate as one; convert it to `[{ field, operator, value }]`:
- `record-picker-element-data-source` (2)
- `ObjectChart.elementDataSource`
- `ObjectPivot.elementDataSource`
- `RecordRelatedListRenderer.elementDataSource`
- `record-related-list.propsRefusal-9963`: the `_fullBinding` type
control
- `EmbeddableForm.elementDataSource`
- `LineItemsPanel.elementDataSource`
- `MasterDetailForm.elementDataSource`
- `ObjectGantt.elementDataSource`
- `ObjectGrid.elementDataSource` (2)
- `ObjectKanban.elementDataSource` (2)
- `ListView.elementDataSource`
- `ListView.sharedGate`
- `ObjectMap.elementDataSource`
- `ObjectTimeline.elementDataSource` (2)
- `ElementDataSourceGate.test` (2). Once it is converted, that file
should carry one explicitly named stored-shape (tuple array) case, so
the gate keeps coverage of a shape a renderer may still receive.
## Tests and gates, at head `993a0c85c`
- **`@object-ui/types`.**
- `pnpm --filter @object-ui/types build` passes, with `dist
completeness: 1 package(s) complete`.
- `type-check` echoes `tsc --noEmit && tsc -p tsconfig.examples.json &&
tsc -p tsconfig.test.json` and passes.
- `pnpm exec vitest run packages/types/`: 302 test files / 7649 tests
passed.
- **Consumer suites, through the vitest source aliases.** I ran every
test file outside `packages/types` that reads `safeValidateSchema`, the
strict face, or one of the six mirrors: 96 files across cli, core,
sdui-parser, the plugin packages, app-shell, apps/console,
examples/schema-catalog and scripts. All passed, in two runs: 70 files /
1330 tests, and 26 files / 257 tests.
- **Gates.** These all exited 0:
- `check:spec-symbols`, `check:new-line-citations` (0 new),
`check:control-bytes`
- `check:doc-types`, `check:doc-fences`, `check:doc-example-ids`
- `check:handler-key-reads`, `check:element-data-source-declaration`,
`check:component-surface-parity`, `check:test-path-roots`
- `check:changeset-claims` (report-only; record-source paragraphs read
and corrected above), `check:pending-changeset-literals`
- `check-changeset-presence` and `check-changeset-no-major`
- **eslint.** `--no-inline-config` over the 8 changed TypeScript files:
8 files in the JSON report, 0 errors. The 38 warnings are all
`no-explicit-any` on unchanged lines. The config has no type-aware
rules, so this diff cannot move a verdict on an untouched file.
- **Ablations.** I ran three against committed `ca5c505ba`, each via
`ablation-replace.mjs` with the anchor proven 1 to 0 on disk. The pins
import `../zod/…` source, so no dist is involved. Each run was restored,
and the blob matched HEAD with `git diff HEAD` empty.
1. Delete the binding rung (`if (dataSourceSuppliesObject(node))
return;`): 14 failed / 33 passed. The failures were the six arms on both
faces, plus both docs pages.
2. Accept an empty name (`typeof object === 'string'`): 6 failed, one
EMPTY case per arm.
3. Drop `when: () => true`: 7 failed. Six were the "not a record" cases;
the seventh was the grid case that reports the missing record source
beside a `columns` error.
**NOT MEASURED: `check:doc-snippets`** (exit 2, precondition: its 34
packages are unbuilt). Separately, I tested the edited fragment marker
against the gate's own marker and verification-claim regexes: it
matches, its reason is 556 characters, and it makes no claim.
## Acceptance notes
- **`object-chart`.** Its registration is gate-wrapped, but the strict
face still refuses `dataSource` by name. That is the deferral the TS
twin's `dataSource` docblock records, outside this card's population.
`objectName` is already optional there.
- **`ObjectViewSchema` and `ObjectTreeSchema`.** They refuse a bound
node without `objectName`, and that is correct: neither registration is
gate-wrapped.
- **The TypeScript twin of `ObjectGridSchema` keeps `objectName:
string`** (seat decision B, round 2). Open PR objectui#11306, since
merged as `582edef1c`, edited the same TS region and plugin-grid, and no
TS-typed producer of a bound grid was found. The mirror's wider
`objectName` is recorded as a CONCRETE `WiderThanDeclared` entry in
`zod-mirror-parity.test.ts`, which goes red when the declaration becomes
optional.
- **The H4 fixture worklist stays as written here.** It is not carded.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VhxTqosz7wn54ahqyxgERT)_
---------
Co-authored-by: Claude <noreply@anthropic.com>objectName when dataSource.object binds the node (objectui#11117) (#11312)1 parent b5b928a commit 0e6e76b
25 files changed
Lines changed: 628 additions & 145 deletions
File tree
- .changeset
- content/docs
- api
- guide
- utilities
- packages
- plugin-calendar/src
- plugin-gantt
- src
- plugin-kanban
- types/src
- __tests__
- zod
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 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 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | | - | |
| 1007 | + | |
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
| |||
0 commit comments