From 4cc013f35628827ca77b905f8ff640fce579c08a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 9 Sep 2026 11:49:28 +0000 Subject: [PATCH] fix(types): drop stale source-line citations from 11 published describe() strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit form.zod.ts (9) / layout.zod.ts (2): remove the `NAME.ext:NNN` address from each published .describe() string (objectstack-ai/objectui#8478). Each was either trimmed to its author-useful sentence (the line address removed, with no loss), or rewritten to cite the same fact by identifier/behavior instead of 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"). Two of the eleven addresses removed had already drifted by exactly +3 lines: checkbox.tsx:45/:49 (actual sites now :48/:52) and text.tsx:162,167 (actual sites now :165/:170). This drift evidence is reported back on the card, not acted on here. Text only: no accept-set, key, or shape change. The remaining 6 addresses (zod/complex.zod.ts) are out of scope for this commit — held by another in-flight PR at claim time — so the tracking card does not close here; card relationship is declared once, in the PR body. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w --- .changeset/8478-zod-pins-form-layout.md | 24 ++++++++++++++++++++++++ packages/types/src/zod/form.zod.ts | 18 +++++++++--------- packages/types/src/zod/layout.zod.ts | 4 ++-- 3 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 .changeset/8478-zod-pins-form-layout.md diff --git a/.changeset/8478-zod-pins-form-layout.md b/.changeset/8478-zod-pins-form-layout.md new file mode 100644 index 0000000000..ef20669cd0 --- /dev/null +++ b/.changeset/8478-zod-pins-form-layout.md @@ -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. diff --git a/packages/types/src/zod/form.zod.ts b/packages/types/src/zod/form.zod.ts index a5fc0eb5b0..ec2a40a718 100644 --- a/packages/types/src/zod/form.zod.ts +++ b/packages/types/src/zod/form.zod.ts @@ -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'), }); @@ -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'), }); @@ -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'), @@ -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'), }); @@ -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)'), @@ -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'), }); @@ -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"), }); /** diff --git a/packages/types/src/zod/layout.zod.ts b/packages/types/src/zod/layout.zod.ts index cc5b6a21db..ab0fd93dc4 100644 --- a/packages/types/src/zod/layout.zod.ts +++ b/packages/types/src/zod/layout.zod.ts @@ -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 @@ -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`'),