Skip to content

finding(types): five more renderers read schema.wrapperClass that their shipped types never declare — switch, textarea, date-picker, select, list (read-driven residue outside #6938's 8-type batch) #7722

Description

@os-justin

Found while implementing objectui#6938 (declaring CheckboxSchema.wrapperClass). Filed unassigned, not folded into that PR: #6938's own scope note says its re-derivation covered only the 8 types in #6150's batch and that the wider read-driven sweep is a separate card — this is the slice of that sweep a single-key grep exposes.

The measurement (on origin/main f96a781)

Every schema.wrapperClass read under packages/components/src, against the two declaration faces in packages/types/src:

renderer read type TS face zod mirror
renderers/form/switch.tsx:26 — `` `flex items-center space-x-2 ${schema.wrapperClass ''}` `` on the wrapper div SwitchSchema (form.ts)
renderers/form/textarea.tsx:37cn("grid w-full gap-1.5", schema.wrapperClass) TextareaSchema (form.ts) undeclared undeclared
renderers/form/date-picker.tsx:35 — `` `grid w-full max-w-sm items-center gap-1.5 ${schema.wrapperClass ''}` `` DatePickerSchema (form.ts)
renderers/form/select.tsx:45cn("grid w-full items-center gap-1.5", schema.wrapperClass) SelectSchema (form.ts) undeclared undeclared
renderers/data-display/list.tsx:27cn("space-y-2", schema.wrapperClass) ListSchema (data-display.ts) undeclared undeclared

For contrast, the declared instances of the same key: InputSchema (form.ts:133, read at input.tsx:42), FileUploadSchema and FilterBuilderSchema (both declared by objectui#6150), and CheckboxSchema (objectui#6938). On the declaration side wrapperClass appears in packages/types/src only in form.ts (Input, Checkbox, FileUpload), complex.ts (FilterBuilder) and their two mirrors — none of the five types above, on either face.

Same class, same remedy

Same mechanism as #6150 and #6938: each read compiles through BaseSchema's index signature (objectui#5155) and each value parses through .passthrough(), admitted unexamined, so the shipped contract under-declares a working surface on five more types. The remedy applied on #6938 — declare wrapperClass?: string on both faces with a docblock citing the read site, pin membership on the mirror's own .shape plus a control key the renderer does not read — transfers one-for-one: five keys, five types, no consolidation question (each is the same optional string on a wrapper element, distinct from className, which those renderers hand to the inner control).

Not claimed here

Serial note for dispatch

ListSchema lives in packages/types/src/data-display.ts / zod/data-display.zod.ts, which objectui#6972 (data-display*, dispatched in the same batch as #6938) is editing. The four form types are in form.ts / zod/form.zod.ts, in regions that neither objectui#7530 (the top of form.zod.ts) nor #6938 (the CheckboxSchema block) touches.

Dedup before filing: search_issues for wrapperClass undeclared renderer reads schema key returned 21 hits, all 21 read; #6951 and #6952 (the deferred-ruling carriers filed alongside #6938) read in full. None records these five.

Filed by the dev of the domain:spec @ objectui dispatch for #6938, session session_01BAZFhALsQsGqxui8sNqM8s.

Refs: #6938 (where measured) · #6150 (the census whose batch bounded #6938) · #5155 (why the reads compile)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions