Commit 2e471dc
fix(types): narrow ObjectCalendarSchema.data to the protocol's array arm (#9348)
`ComponentPropsMap['object-calendar'].data` on `@objectstack/spec` declares
`z.array(z.unknown()).optional()` — "Pre-fetched records — skips the internal
fetch". Both published faces of `@object-ui/types` declared `ViewData` on the
same key: a `{ provider, items }` config object, which that row refuses by kind.
After objectui#8348 put the renderer on the protocol's side (decision batch #83,
maintainer verbatim 8348 uses the protocol as the authority), this mirror was the
lone published face still teaching the config-object spelling, so an author who
validated against `@object-ui/types` got a green verdict for metadata the
renderer ignores, `os validate` refuses and the save gate rejects.
- TS face: `data?: ViewData` -> `data?: SpecObjectCalendarProps['data']`,
DERIVED from the protocol's own row so the key cannot drift from it again.
- Zod mirror: `ViewDataSchema.optional()` -> `z.array(z.unknown()).optional()`.
- Requiredness unchanged on both faces, so the zod-mirror-parity ratchet is
unmoved (verified with `tsc -p tsconfig.test.json`, which is the only
instrument that sees that ledger's type-level reconciliation).
- The `data` equality with `TsObjectGanttSchema['data']` is INVERTED rather than
deleted, and both sides are named; the `staticData` and `objectName`
equalities were re-checked individually and still hold.
- `requireRecordSource`'s docblock says what `data` means per member: the ladder
is shared, the arm is not.
`object-map` / `object-gantt` keep the `ViewData` arm — neither has a
`ComponentPropsMap` row, so the row governing them is this package's own.
`@objectstack/spec` is untouched.
Claude-Session: https://claude.ai/code/session_01L5xpA5q533BgTTNADibEFt
Co-authored-by: Claude <noreply@anthropic.com>1 parent a984600 commit 2e471dc
5 files changed
Lines changed: 308 additions & 39 deletions
File tree
- .changeset
- content/docs/plugins
- packages/types/src
- __tests__
- zod
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
373 | 384 | | |
374 | 385 | | |
375 | 386 | | |
| |||
0 commit comments