Repository navigation
docs: layout.md names the object-grid object with objectName, and flex.mdx teaches the four direction values (objectui#11298) - #11314
Conversation
…lex.mdx teaches the four direction values the schema takes (objectui#11298) The "With Action Buttons" snippet in content/docs/guide/layout.md wrote `"object": "products"` on its `object-grid` node. `object` is no ObjectGridSchema key and `objectName` is required, so safeValidateSchema (what `objectui validate` calls) refused the verbatim snippet at `children` and the grid never named its object. It now writes `"objectName": "products"`. The Schema block in content/docs/components/layout/flex.mdx taught `direction?: 'row' | 'column'`. FlexSchema.direction is `'row' | 'col' | 'row-reverse' | 'col-reverse'`: `'column'` is refused with invalid_value and the flex renderer adds no direction class for it. The block now lists the four values the schema declares and the renderer draws. No alias and no renderer fallback for `object` or `column`: the validator is right and the docs were wrong. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
…tems, the key the tabs node reads (objectui#11298) The "Settings Page with Tabs" snippet in content/docs/guide/layout.md wrote its tab list under `tabs` on a `type: "tabs"` node. TabsSchema requires `items`, and the tabs renderer reads `schema.items`, so safeValidateSchema (what `objectui validate` calls) refused the verbatim snippet at `children` and the node draws no tabs as taught. It now writes the list under `items`. No alias and no renderer fallback for `tabs`. This is the third site of the same family, folded into this card by the dispatching seat. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Inputs: card objectui#11298 (body; triage ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #11298
Clause-②: no
Two docs snippets taught a key and a value that
objectui validaterefuses. This PR corrects both in today's flat spelling, and nothing else.content/docs/guide/layout.md, the "With Action Buttons" snippet, itsobject-gridnode"object": "products""objectName": "products"content/docs/components/layout/flex.mdx, the Schema block,direction'row' | 'column''row' | 'col' | 'row-reverse' | 'col-reverse'objectorcolumn. The validator is right, and the docs were wrong.FlexSchema.directiondeclares the four values above, and the flex renderer maps each one to a class (flex-row,flex-col,flex-row-reverse,flex-col-reverse). It has no branch forcolumn.Measured before and after (head
680a2be4b4)The probe reads both snippets from the docs on disk and runs
safeValidateSchemafrompackages/types/src/zod/index.zod.tson them. That is the functionobjectui validatecalls. The probe lives in the scratchpad and is not committed.Before, on base
caa0cd3927:After:
On the strict authoring face (
StrictAnyComponentSchema), the fixed "With Action Buttons" snippet passes, and so does{ type: 'flex', direction: 'col' }. The controls stay red:direction: 'column'failsinvalid_value, and{ type: 'object-grid', object: 'products' }fails bothobjectName invalid_typeandunrecognized_keys: object.Other copies
A census of every
object-gridnode literal (in any fence language) and everydirectiontaught as a quotedcolumncoveredcontent/docs/**and every trackedREADME.md(257 files, 48object-gridliterals). It found exactly one copy of each mistake, and this PR fixes both. After the fix, both counts read 0.Do the repo's snippet checks reach these fences? No, so no pin is added
check:doc-snippetscompilests/tsxfences only. Its header names schema-key validity as blind spot 1.jsonfence. The flex.mdx block is aplaintextfence thatcheck:doc-fenceslists in its declared shrink-only debt (the objectui#5867 lane).check:doc-typesreads thetypeliteral only.check:doc-examplesreads JSDoc@exampleblocks underpackages/*/srconly.jsonfences (page-actions-refusal-7926.test.ts,guide-layout-page-buttons-7926.test.tsx) assertactionsandchildren, and that the buttons render. None of them runssafeValidateSchema.The ruling made a snippet pin conditional on a snippet check reaching these fences, and no check reaches them. So no pin and no new gate are added.
Checks (run at
680a2be4b4)node scripts/markdown-test-inputs.mjs --listrecords as reading either edited file, run under the verify lock from the repo root withpnpm exec vitest run --maxWorkers=2and those 23 paths:Test Files 23 passed (23),Tests 851 passed (851),VERDICT command-exit 0.pnpm check:doc-fencesexits 0: "every TypeScript block in 227 document(s) is fenced ts/tsx/typescript, except 72 declared file(s)…".pnpm check:doc-typesexits 0: "Every documented component type is registered."node scripts/check-doc-links.mjsexits 0: "Links are valid across 17 scan roots."pnpm check:control-bytesexits 0: "OK (scanned 9780 tracked text file(s); skipped 85 binary)".node scripts/check-changeset-presence.mjsexits 0: "No source or published contract of a released package changed in this range, so no changeset is owed."pnpm changeset:checkexits 0.pnpm check:new-line-citationsexits 0: "0 new citation(s)".node scripts/check-governed-queue-guard.mjs --teston both paths reports NOT GOVERNED.pnpm check:doc-snippetsis NOT MEASURED. It exited 2 with PRECONDITION NOT MET because its 34-package build closure is not built in this container, and that build does not fit the foreground cap. This diff changes nots/tsxfence, so the gate's population is untouched. CI'sdoc-snippet-types.ymlbuilds the closure and runs it.No changeset is added: docs are not a released package, and the presence gate agrees. ⛔ No
skip-changesetlabel, because nothing in this repo reads it.Acceptance notes
object-gridbatch may later move this node into thepropertiesbag, andflex.mdxis part of the objectui#11300 decision's corpus. This PR corrects the key and the value in the flat spelling only. Whichever batch moves the node later carries the corrected key.alignandjustifylist a subset of whatFlexSchemaaccepts (baseline/stretch,around/evenlyare missing).childrenis shown as required, but the schema makes it optional and accepts a single node or an array. Every value taught there validates, so they are left as they are: incomplete, not wrong. The block is also incheck:doc-fences' declared debt, so no gate reads it.object-gridnodes elsewhere in the docs that bind throughdataSourcewithoutobjectName.This PR was written in session
https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ(objectuidomain:uiseat 1 dispatch).Generated by Claude Code