`packages/components/src/renderers/form/checkbox.tsx:36` reads
`cn("flex items-center space-x-2", schema.wrapperClass)` and neither the
TypeScript interface (`form.ts`) nor the zod mirror (`zod/form.zod.ts`)
declared the key: it compiled through `BaseSchema`'s index signature and
parsed through `.passthrough()`, admitted unexamined. The same key, on the
same class of read, is declared on `FileUploadSchema` and
`FilterBuilderSchema`; the checkbox was left out only because its doc
page's schema block is a six-line summary.
Pin: `__tests__/checkbox-wrapper-class-6938.test.ts` — mirror-shape
membership, parse acceptance with the value surviving (mirror and union
entry point), refusal of a wrong-typed value at the key, invariant
type-level pins on the TS face, and a control key the renderer does not
read (derived from the renderer source) that stays undeclared on both
faces.
Changeset: `@object-ui/types` patch — the accept set only widens toward
what already renders.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
Fixes #6938
What
Declares
wrapperClass?: stringonCheckboxSchema, on both faces — the TypeScript interface inpackages/types/src/form.ts(docblock citing the read site, in the form the objectui#6939 declarations use) and the zod mirror inpackages/types/src/zod/form.zod.ts— plus one pin and an@object-ui/typespatchchangeset. Nothing else moves: no consolidation withclassName, no other schema block touched.Why the card shrank to one key (measured, not inherited)
The card has two halves. Its context-menu half —
ContextMenuSchema.triggerClassName/contentClassName/modaland the retirement of the dead requiredchildren— is already onmain, landed with objectui#6939 group 1 (PR objectui#7456): re-verified on this branch's basef96a781atpackages/types/src/overlay.ts:617/624/630andzod/overlay.zod.ts:237-246. It is not touched here.The residue is
CheckboxSchema.wrapperClass. OnmainthewrapperClassatform.ts:133belongs toInputSchemaand the one at:606toFileUploadSchema; theCheckboxSchemainterface (from:306) declared none, and the mirror (form.zod.ts:255) declared none — whilepackages/components/src/renderers/form/checkbox.tsx:36readscn("flex items-center space-x-2", schema.wrapperClass). The read compiled throughBaseSchema's index signature and the value parsed through.passthrough(), admitted unexamined. This pulls the declaration back to delivered behaviour (Bug side, triage half 甲).Contract review (Clause-② yes — a new declared key on a published payload type)
wrapperClassit used to admit unexamined (wrapperClass: 42— green before, refused at the key now). Enforcement of the declared type, not a new capability.wrapperClasson acheckboxnode — zero (examples/,apps/,content/,skills/grepped). The read is the fact the declaration records; the same key on the same class of read is declared onInputSchema,FileUploadSchemaandFilterBuilderSchema. The checkbox was left out only because its doc page's schema block is a six-line summary.patch, following the objectui#6939 group-1 precedent (.changeset/6939-overlay-trigger-mirror.md, same argument).Pin —
packages/types/src/__tests__/checkbox-wrapper-class-6938.test.ts(10 tests)Form borrowed from
undeclared-but-consumed-keys-6150.test.ts: membership on the mirror's own.shape(acceptance cannot tell declared from admitted-unexamined under passthrough); parse accepts the key and the value survives, through the mirror and throughsafeValidateSchema; refusal of a wrong-typed value AT the key; invariant type-level pins on the TS face (an undeclared key resolves toanythrough the index signature, soEqualfails); and a CONTROL key the renderer does not read —labelClass, checked against the read set derived fromcheckbox.tsx— that stays undeclared on both faces (absent from.shape, resolves to the index signature, still admitted unexamined).Ablation (fix committed first; restore by trap, proven by bytes)
Mutation:
git checkout BASE -- form.ts form.zod.ts(both faces lose the declaration; anchorsobjectui#69381 → 0 in each file). Observed direction: RED — vitest2 failed | 8 passed (10)(mirror-shape membership, refusal at the key; the 8 that stay green are the passthrough before-state by design) andtsc -p tsconfig.test.jsonexit 2 withTS2344on the two type-level pins (:75,:76). Restore:git checkout HEAD -- ...,git diff HEAD= 0 lines, on-disk blob hashes equal toHEAD's (12dd197…,21ee145…), anchors back to 1. Restored leg:10 passed (10), tsc exit 0. Resolution path issrcon both legs (relative imports in the pin;tsconfig.test.jsonreadssrc), so no dist preflight applies.Gates (exit captured before any pipe; at HEAD
d54e1b9unless noted)pnpm exec vitest run --maxWorkers=2 packages/types/Test Files 112 passed (112),Tests 1935 passed (1935)pnpm --filter @object-ui/types type-check(three tsc projects incl.tsconfig.test.json)pnpm --filter @object-ui/types lintpnpm --workspace-concurrency=2 --filter "@object-ui/components^..." buildthenpnpm --filter @object-ui/components type-check@object-ui/typesfromdist, rebuilt with this change (dist/form.d.ts:346carries the key); identical pre-commit treenode scripts/check-changeset-presence.mjsnode scripts/check-changeset-fixed.mjsnode scripts/check-changeset-no-major.mjsnode scripts/check-control-bytes.mjspnpm check:spec-symbolscheck:doc-typestypeliterals only, and no doc gate requires a documented row for a declared keyzod-mirror-parity.test.tsstays green with the key on both faces (it is among the 112). Heavy runs went through the shared verify lock; repo-widepnpm lintis CI's.Docs
content/docs/components/form/checkbox.mdxuntouched: its schema block is a six-line summary (the card's own diagnosis of the asymmetry) and no doc-parity gate asks for the row; adding one row there whilechecked,description,errorandclassNameare also absent from that summary is a docs card, not this one — handed to the PM in the report.Out of scope, filed
objectui#7722 — five more renderers read
schema.wrapperClassundeclared on either face (switch,textarea,date-picker,select,list); same class, same remedy; dedup done (21 search hits read, #6951 / #6952 read in full).Serial
Base
f96a781=origin/mainat PR time (re-fetched; nothing to merge). objectui#7530 edits the top region ofform.zod.ts, a different region from theCheckboxSchemablock; conflicts, if any, go to the merge queue.packages/typesis not a governed surface;needs:contract-reviewattached; stays draft for the in-seat review at tier.Dev of the
domain:spec@ objectui dispatch, sessionsession_01BAZFhALsQsGqxui8sNqM8s.🤖 Generated with Claude Code
https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
Generated by Claude Code