Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/8478-zod-pins-form-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@object-ui/types': patch
---

Remove stale source-line citations (`NAME.ext:NNN`) from eleven published `.describe()`
schema descriptions in `packages/types/src/zod/form.zod.ts` (9) and
`zod/layout.zod.ts` (2) (objectstack-ai/objectui#8478).

Text only — no accept-set, key, or shape change. Each description was either trimmed to
its author-useful sentence with no loss (e.g. dropping "read at
renderers/form/file-upload.tsx:78" from an "appended to the renderer's own grid classes"
sentence that stands on its own), or rewritten to cite the same fact by identifier or
behavior instead of by file:line (e.g. "sets `required` on the Radix Checkbox and gates
the label's `*` marker" instead of "read at renderers/form/checkbox.tsx:45 ... and :49"),
which survives a line renumbering that a bare address would not.

Two of the eleven addresses removed here were measured to have already drifted by the
same +3 lines: `checkbox.tsx:45`/`:49` (actual `required=` site now `:48`, actual `*`
marker site now `:52`) and `text.tsx:162,167` (actual `{schema.content}` sites now
`:165`/`:170`). Filed back on objectstack-ai/objectui#8478 as further drift evidence for
its own pre-committed p3-to-p2 re-grade trigger.

The remaining 6 addresses (`zod/complex.zod.ts`) stay out of scope for this PR — held by
in-flight PR objectstack-ai/objectui#8799 — and the card does not close here.
18 changes: 9 additions & 9 deletions packages/types/src/zod/form.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export const TextareaSchema = BaseSchema.extend({
description: z.string().optional().describe('Help text'),
error: z.string().optional().describe('Error message'),
wrapperClass: z.string().optional()
.describe('Classes on the wrapper div around the textarea and its label, read at renderers/form/textarea.tsx:37 — `cn("grid w-full gap-1.5", schema.wrapperClass)` (objectui#7722)'),
.describe('Classes on the wrapper div around the textarea and its label (objectui#7722)'),
onChange: handlerKeyRefusal('onChange', 'runtime-slot', 'Change handler'),
maxLength: z.number().optional().describe('Maximum length'),
});
Expand All @@ -272,7 +272,7 @@ export const SelectSchema = BaseSchema.extend({
description: z.string().optional().describe('Help text'),
error: z.string().optional().describe('Error message'),
wrapperClass: z.string().optional()
.describe('Classes on the wrapper div around the trigger and its label, read at renderers/form/select.tsx:45 — `cn("grid w-full items-center gap-1.5", schema.wrapperClass)` (objectui#7722)'),
.describe('Classes on the wrapper div around the trigger and its label (objectui#7722)'),
onChange: handlerKeyRefusal('onChange', 'runtime-slot', 'Change handler'),
});

Expand All @@ -286,9 +286,9 @@ export const CheckboxSchema = BaseSchema.extend({
defaultChecked: z.boolean().optional().describe('Default checked state'),
checked: z.boolean().optional().describe('Controlled checked state'),
required: z.boolean().optional()
.describe("Required affordance, read at renderers/form/checkbox.tsx:45 (`required=` on the Radix Checkbox) and :49 (gates the label's `*` marker) (objectui#6150)"),
.describe("Required affordance — sets `required` on the Radix Checkbox and gates the label's `*` marker (objectui#6150)"),
wrapperClass: z.string().optional()
.describe('Classes on the wrapper div around the box and its label, read at renderers/form/checkbox.tsx:36 — `cn("flex items-center space-x-2", schema.wrapperClass)` (objectui#6938)'),
.describe('Classes on the wrapper div around the box and its label (objectui#6938)'),
description: z.string().optional().describe('Help text'),
error: z.string().optional().describe('Error message'),
onChange: handlerKeyRefusal('onChange', 'runtime-slot', 'Change handler'),
Expand Down Expand Up @@ -321,7 +321,7 @@ export const SwitchSchema = BaseSchema.extend({
checked: z.boolean().optional().describe('Controlled checked state'),
description: z.string().optional().describe('Help text'),
wrapperClass: z.string().optional()
.describe("Classes on the wrapper div around the switch and its label, read at renderers/form/switch.tsx:26 — `flex items-center space-x-2 ${schema.wrapperClass || ''}` (objectui#7722)"),
.describe("Classes on the wrapper div around the switch and its label (objectui#7722)"),
onChange: handlerKeyRefusal('onChange', 'retired', 'Change handler'),
});

Expand Down Expand Up @@ -363,9 +363,9 @@ export const FileUploadSchema = BaseSchema.extend({
name: z.string().optional().describe('Field name for form submission'),
label: z.string().optional().describe('Upload label'),
buttonText: z.string().optional()
.describe('Drop-zone label, read at renderers/form/file-upload.tsx:123 — `schema.buttonText || "DROP PAYLOAD OR CLICK TO UPLOAD"` (objectui#6150)'),
.describe('Drop-zone label; falls back to "DROP PAYLOAD OR CLICK TO UPLOAD" when unset (objectui#6150)'),
wrapperClass: z.string().optional()
.describe('Outer wrapper classes, appended to the renderer\'s own grid classes at renderers/form/file-upload.tsx:78 (objectui#6150)'),
.describe('Outer wrapper classes, appended to the renderer\'s own grid classes (objectui#6150)'),
accept: z.string().optional().describe('Accepted file types'),
multiple: z.boolean().optional().describe('Allow multiple files'),
maxSize: z.number().optional().describe('Maximum file size (bytes)'),
Expand All @@ -391,7 +391,7 @@ export const DatePickerSchema = BaseSchema.extend({
description: z.string().optional().describe('Help text'),
error: z.string().optional().describe('Error message'),
wrapperClass: z.string().optional()
.describe("Classes on the wrapper div around the popover trigger and its label, read at renderers/form/date-picker.tsx:35 — `grid w-full max-w-sm items-center gap-1.5 ${schema.wrapperClass || ''}` (objectui#7722)"),
.describe("Classes on the wrapper div around the popover trigger and its label (objectui#7722)"),
onChange: handlerKeyRefusal('onChange', 'runtime-slot', 'Change handler'),
});

Expand Down Expand Up @@ -724,7 +724,7 @@ export const InputShorthandSchema = InputSchema.omit({ type: true, inputType: tr
// second ledger row for a key that is demonstrably read; shrinking the existing
// row is `InputSchema`'s own repair (objectui#7722's family) and not this card's.
wrapperClass: z.string().optional()
.describe("Classes on the wrapper div around the input and its label, read at renderers/form/input.tsx:42 — `cn('grid w-full items-center gap-1.5', schema.wrapperClass)`"),
.describe("Classes on the wrapper div around the input and its label"),
});

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/zod/layout.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const TextSpanSchema = BaseSchema.extend({
export const TextSchema = BaseSchema.extend({
type: z.literal('text'),
content: z.string().optional()
.describe('Text content — the one content spelling `text` reads, at renderers/basic/text.tsx:162,167 as `{schema.content}` (declared by objectui#6150; its `value` fallback spelling was retired by objectui#6951)'),
.describe('Text content — the one content spelling `text` reads (declared by objectui#6150; its `value` fallback spelling was retired by objectui#6951)'),
// ADR-0049 RETIREMENT TOMBSTONE (objectui#6951 / objectui#7016, maintainer
// ruling A1 of 2026-09-04). `value` was the second spelling of the one
// content slot; the renderer now reads `content` alone, so a plain deletion
Expand Down Expand Up @@ -552,7 +552,7 @@ export const HtmlElementSchema = BaseSchema.extend({
children: z.union([SchemaNodeSchema, z.array(SchemaNodeSchema)]).optional()
.describe('Child components — read as `schema.children ?? schema.body`; ignored for the void tags `img` / `hr` / `br`'),
href: z.string().optional()
.describe('`a` link target; scheme-sanitised at html-elements.tsx:74 (`javascript:` / `data:` / `vbscript:` are dropped)'),
.describe('`a` link target; scheme-sanitised (`javascript:` / `data:` / `vbscript:` are dropped)'),
target: z.string().optional().describe('`a` browsing context — an internal link navigates through the SPA router unless this names another target'),
rel: z.string().optional().describe('`a` link relationship'),
title: z.string().optional().describe('Advisory title — declared for `a`, `img` and `abbr`'),
Expand Down
Loading