Found while implementing #6459 (typing the data-table schema slot in plugin-grid). Filed unassigned, observational — recording a mirror drift, not proposing a shape.
Measured (at 38a123cac)
The two declared surfaces of DataTableSchema.rowActions disagree:
- TS interface (
packages/types/src/data-display.ts): rowActions?: boolean — "Show row actions (edit/delete)". - Zod mirror (
packages/types/src/zod/data-display.zod.ts:222): rowActions: z.array(z.any()).optional().describe('Row action buttons') — an array.
Both real ends of the seam side with the TS interface:
- Producer:
plugin-grid's ObjectGrid.tsx passes rowActions: !!(inlineEditable && hasActions) — a boolean. - Consumer:
components' data-table.tsx destructures rowActions = false off the schema and branches on it as a boolean.
So a metadata author validating against the zod mirror is told to write an array of "action buttons" that nothing reads, and a spec-compliant boolean would be rejected by that mirror while being the only value the renderer understands. This is the declared != enforced family, in the same shape as #4605 (closed) — the zod BaseSchema mirror drifting from the TS declarations — one interface further down the same file pair.
Scope note
Deliberately not fixed in #6459's PR: that card's fence is packages/plugin-grid/src/ObjectGrid.tsx only, and packages/types is published, human-floor surface. Whichever way the repair goes (align the zod mirror to boolean, or rule that the mirror is authoritative and the TS declaration plus both readers are wrong), it is a one-line-plus-pin change in packages/types with its own review floor.
Found while implementing #6459 (typing the data-table schema slot in
plugin-grid). Filed unassigned, observational — recording a mirror drift, not proposing a shape.Measured (at
38a123cac)The two declared surfaces of
DataTableSchema.rowActionsdisagree:packages/types/src/data-display.ts):rowActions?: boolean— "Show row actions (edit/delete)".packages/types/src/zod/data-display.zod.ts:222):rowActions: z.array(z.any()).optional().describe('Row action buttons')— an array.Both real ends of the seam side with the TS interface:
plugin-grid'sObjectGrid.tsxpassesrowActions: !!(inlineEditable && hasActions)— a boolean.components'data-table.tsxdestructuresrowActions = falseoff the schema and branches on it as a boolean.So a metadata author validating against the zod mirror is told to write an array of "action buttons" that nothing reads, and a spec-compliant boolean would be rejected by that mirror while being the only value the renderer understands. This is the
declared != enforcedfamily, in the same shape as #4605 (closed) — the zod BaseSchema mirror drifting from the TS declarations — one interface further down the same file pair.Scope note
Deliberately not fixed in #6459's PR: that card's fence is
packages/plugin-grid/src/ObjectGrid.tsxonly, andpackages/typesis published, human-floor surface. Whichever way the repair goes (align the zod mirror toboolean, or rule that the mirror is authoritative and the TS declaration plus both readers are wrong), it is a one-line-plus-pin change inpackages/typeswith its own review floor.