From bd44c956aba577fe13720644907048f1e34ff202 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 10 Sep 2026 22:48:39 +0000 Subject: [PATCH 1/2] docs(types): the four objectql mirror docblocks say "not defaulted on parse" (objectui#8735) objectui#8317 made `@object-ui/types`' zod mirrors stop substituting imported `@objectstack/spec` defaults on parse, via `stripImportedDefaults`. Four docblocks in `zod/objectql.zod.ts` still described the OLD behaviour in the present tense, so each stated the opposite of what its own export does: :98 `method` "now defaults to `'GET'` on parse" :121-122 `prefix.type` "defaults to `'text'` on parse ... so the renderer always gets a value" :128-129 `type` "now defaults to `'none'` on parse" :135-136 `pageSize` "with a default of 25 on parse" Each is rewritten to say the key is declared and accepted but NOT defaulted on parse. Measured per key against the code, spec leg vs mirror leg, each with a firing control (a key whose authored value does survive the same parse): method spec {"url":"/x","method":"GET"} mirror {"url":"/x"} prefix.type spec prefix{field,type:"text"} mirror prefix{field} type spec {"type":"none"} mirror {} pageSize spec {"pageSize":25,...} mirror {"pageSizeOptions":[10,20]} Comment-only: no default, no behaviour and no accept set moves. Each key is still declared, still accepted, and still checked (an illegal value is refused on all four). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w --- packages/types/src/zod/objectql.zod.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/types/src/zod/objectql.zod.ts b/packages/types/src/zod/objectql.zod.ts index 1cb8452d24..e92e66eb84 100644 --- a/packages/types/src/zod/objectql.zod.ts +++ b/packages/types/src/zod/objectql.zod.ts @@ -95,7 +95,9 @@ export const HttpMethodSchema = stripImportedDefaults(SpecHttpMethodSubsetSchema * HTTP Request Schema — `@objectstack/spec/ui` schema re-exported by reference * (issue #2231; formerly a hand-written mirror). Differences vs the old mirror: * `body` is the spec's `z.unknown()` (a superset of the old record/string/FormData/ - * Blob union) and `method` now defaults to `'GET'` on parse. + * Blob union). `method` is declared and accepted but NOT defaulted on parse: + * the spec's `.default('GET')` is stripped at the import boundary above, so a + * request that omits `method` comes back without it. */ export const HttpRequestSchema = stripImportedDefaults(SpecHttpRequestSchema); @@ -118,22 +120,27 @@ export const ViewDataSchema = stripImportedDefaults(SpecViewDataSchema); * and `prefix` is the spec's `ColumnPrefixSchema`. With both upstream the * extension collapses to the plain re-export it always said it would become. * - * One behavior change rides along: the spec's `prefix.type` defaults to `'text'` - * on parse instead of staying `undefined`, so the renderer always gets a value. + * The spec declares `prefix.type` with a `.default('text')`. That default is + * stripped at the import boundary above, so the key is declared and accepted but + * NOT defaulted on parse: a column omitting `prefix.type` comes back without it, + * and a renderer reading it cannot assume a value is present. */ export const ListColumnSchema = stripImportedDefaults(SpecListColumnSchema); /** * Selection Config Schema — `@objectstack/spec/ui` schema re-exported by reference - * (issue #2231; formerly a hand-written mirror). `type` now defaults to `'none'` - * on parse instead of staying undefined. + * (issue #2231; formerly a hand-written mirror). `type` is declared and accepted + * but NOT defaulted on parse: the spec's `.default('none')` is stripped at the + * import boundary above, so an omitted `type` stays omitted. */ export const SelectionConfigSchema = stripImportedDefaults(SpecSelectionConfigSchema); /** * Pagination Config Schema — `@objectstack/spec/ui` schema re-exported by reference - * (issue #2231; formerly a hand-written mirror). `pageSize` is now the spec's - * positive-int with a default of 25 on parse. + * (issue #2231; formerly a hand-written mirror). `pageSize` is the spec's + * positive-int, declared and accepted but NOT defaulted on parse: the spec's + * `.default(25)` is stripped at the import boundary above, so an omitted + * `pageSize` stays omitted. */ export const PaginationConfigSchema = stripImportedDefaults(SpecPaginationConfigSchema); From 6249be354fe6a0b6ae6af1129bbf59e4f96e6c6a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 10 Sep 2026 22:49:54 +0000 Subject: [PATCH 2/2] chore(changeset): declare the objectql mirror docblock correction (objectui#8735) `scripts/check-changeset-presence.mjs` guards `/src/**` of every package in the `fixed` group; `isPublishedSource` clause (a) returns true for anything under `src/` first and unconditionally, with no content-level inspection, so a comment-only edit inside `packages/types/src/` is guarded like any other source change. Independently, the corrected text is emitted verbatim into the published `dist/zod/objectql.zod.d.ts`, so it really does ship. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w --- ...8735-objectql-mirror-docblocks-not-defaulted.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .changeset/8735-objectql-mirror-docblocks-not-defaulted.md diff --git a/.changeset/8735-objectql-mirror-docblocks-not-defaulted.md b/.changeset/8735-objectql-mirror-docblocks-not-defaulted.md new file mode 100644 index 0000000000..e2704861b1 --- /dev/null +++ b/.changeset/8735-objectql-mirror-docblocks-not-defaulted.md @@ -0,0 +1,14 @@ +--- +'@object-ui/types': patch +--- + +Correct four `zod/objectql.zod.ts` docblocks that described the behaviour objectui#8317 +removed. Since that change the zod mirrors strip imported `@objectstack/spec` defaults at +this package's import boundary, but the docblocks on `HttpRequestSchema`, `ListColumnSchema`, +`SelectionConfigSchema` and `PaginationConfigSchema` still said, in the present tense, that +`method`, `prefix.type`, `type` and `pageSize` are defaulted on parse — the opposite of what +each export does. Each now says the key is declared and accepted but NOT defaulted on parse. + +Comment-only: no default, no behaviour and no accept set moves. The corrected text is +published — it is emitted verbatim into `dist/zod/objectql.zod.d.ts`, which is why it earns +an entry rather than being an internal note.