Filed unassigned by the os-dev seat while implementing #6318. Grading and domain:* are the triage seat's.
Measured
packages/types/src/zod/data-display.zod.ts:249
rowActions: z.array(z.any()).optional().describe('Row action buttons'),Every other face of the same key says boolean:
packages/types/src/data-display.ts:850 — rowActions?: boolean; (the TS declaration this const mirrors)packages/components/src/renderers/complex/data-table.tsx:718 — destructured as rowActions = false- same file, 2046 / 2467 — used as a truthiness gate around the actions cell
- same file, 2069 / 2511 — used as
+ (rowActions ? 1 : 0) in a colSpan - same file, 2669 — the registered input is
{ name: 'rowActions', type: 'boolean', label: 'Show Row Actions', defaultValue: false } - same file, 2682 —
defaultProps: { rowActions: true } - same file, 677 — the renderer's own docblock example authors
"rowActions": true
So the mirror is the single outlier, and it is the published one: safeValidateSchema refuses rowActions: true, which is the spelling the component's own documentation, defaults and authoring inputs all teach.
Cost, today
Two examples/schema-catalog entries fail safeValidateSchema for this and no other reason — components-complex-data-table/user-table.json and .../full-featured-table.json. Both are reported by objectui check as content carrying a registered type that does not validate.
Why the array spelling is not merely "also accepted"
#6318's triage test applied to it, rendering through the real SchemaRenderer:
| authored | elements | text |
|---|
rowActions: true (as the fixtures have it) | 42 | UserActionsJohn Doe |
rowActions: [] (the smallest zod-valid value) | 42 | UserActionsJohn Doe |
| key absent | 39 | UserJohn Doe |
An empty array renders the actions column, because [] is truthy. "Correcting" the fixtures to satisfy the mirror would therefore change nothing on screen while making the documents say something the renderer cannot act on — the fixtures are right and the mirror is wrong.
Suggested repair
Mirror the declaration: rowActions: z.boolean().optional(). This is a widening for no author (nothing can be reading a value the renderer only tests for truthiness) and it takes the two catalog entries out of the bucket. packages/types/src/__tests__/data-table-declared-keys-6882.test.ts is the natural place to pin it.
⚠️ Note packages/types/src/zod/objectql.zod.ts:143 declares a differentrowActions — z.array(z.string()), the list view's legacy bare-name action list (packages/types/src/objectql.ts:857). That one is correct as it stands and is not part of this finding; the two keys share a name and nothing else.
Related
Filed unassigned by the
os-devseat while implementing #6318. Grading anddomain:*are the triage seat's.Measured
packages/types/src/zod/data-display.zod.ts:249Every other face of the same key says boolean:
packages/types/src/data-display.ts:850—rowActions?: boolean;(the TS declaration this const mirrors)packages/components/src/renderers/complex/data-table.tsx:718— destructured asrowActions = false+ (rowActions ? 1 : 0)in acolSpan{ name: 'rowActions', type: 'boolean', label: 'Show Row Actions', defaultValue: false }defaultProps: { rowActions: true }"rowActions": trueSo the mirror is the single outlier, and it is the published one:
safeValidateSchemarefusesrowActions: true, which is the spelling the component's own documentation, defaults and authoring inputs all teach.Cost, today
Two
examples/schema-catalogentries failsafeValidateSchemafor this and no other reason —components-complex-data-table/user-table.jsonand.../full-featured-table.json. Both are reported byobjectui checkas content carrying a registered type that does not validate.Why the array spelling is not merely "also accepted"
#6318's triage test applied to it, rendering through the real
SchemaRenderer:rowActions: true(as the fixtures have it)UserActionsJohn DoerowActions: [](the smallest zod-valid value)UserActionsJohn DoeUserJohn DoeAn empty array renders the actions column, because
[]is truthy. "Correcting" the fixtures to satisfy the mirror would therefore change nothing on screen while making the documents say something the renderer cannot act on — the fixtures are right and the mirror is wrong.Suggested repair
Mirror the declaration:
rowActions: z.boolean().optional(). This is a widening for no author (nothing can be reading a value the renderer only tests for truthiness) and it takes the two catalog entries out of the bucket.packages/types/src/__tests__/data-table-declared-keys-6882.test.tsis the natural place to pin it.packages/types/src/zod/objectql.zod.ts:143declares a differentrowActions—z.array(z.string()), the list view's legacy bare-name action list (packages/types/src/objectql.ts:857). That one is correct as it stands and is not part of this finding; the two keys share a name and nothing else.Related
safeValidateSchema#6318 — the parent card, which measured this group and reports rather than sweeps itBaseSchemaonly — the ~17 sibling zod mirrors have nothing equivalent, and the class already has two confirmed instances #5684 — the mirror-parity ratchet. It compares each mirror against its TS twin, so this pair should in principle have been caught; worth checking why it was not, since a boolean declaration versus an array mirror is exactly its subject