Skip to content

finding(docs): nine JSON fences in guide/ author button keys the schema does not declare — six button.text (the renderer reads label) and three top-level onClick (refused by name) #7898

Description

@claude

Observation-class finding, measured on 655afabf2 while repairing objectui#7872's seven uncarried-expression sites in these same guide pages. Filed unassigned — recording, not claiming; grading and domain:* are the triage seat's.

objectui#7872's census (scripts/check-doc-expression-carriage.mjs) judges a key only when it holds an EXPRESSION. These pages also author keys that hold a LITERAL and are declared nowhere, so no gate looks at them at all: check-doc-component-types judges the type literal and says so deliberately in its own header — "NOT in scope, deliberately: whether the snippet's OTHER keys are read by the renderer the type resolves to" — and check-doc-snippet-types compiles ts/tsx blocks only.

Finding 1 — six button nodes author text, which is not a ButtonSchema key

ButtonSchema (packages/types/src/zod/form.zod.ts:160) declares label, variant, size, loading, icon, iconPosition, buttonType, and the TS interface agrees. renderers/form/button.tsx:73 renders schema.label || renderChildren(schema.body || schema.children). There is no text key, so these six nodes render a button with no text — the identical defect objectui#7872 repaired on badge.text, whose renderer likewise reads schema.label.

page line node
content/docs/guide/architecture.md 246 button (under "Conditional Rendering")
content/docs/guide/layout.md 155 button in page.actions
content/docs/guide/layout.md 161 button in page.actions
content/docs/guide/layout.md 520 button in page.actions
content/docs/guide/layout.md 527 button in page.actions
content/docs/guide/layout.md 653 button in page.actions

Line numbers as of 655afabf2. objectui#7872's PR does not touch any of them, but it does shift schema-rendering.md and architecture.md line numbers below its own edits — locate by content.

Finding 2 — three fences author a top-level onClick, which the zod mirror refuses BY NAME

ButtonSchema.onClick is handlerKeyRefusal('onClick', 'runtime-slot', 'Click handler') (packages/types/src/zod/tombstone.zod.ts:109), i.e. z.custom(() => false): any authored value is refused, with guidance saying the key "is a RUNTIME SLOT for a host-supplied function, not authorable metadata ... A React host supplies it through the TypeScript interface / props, never through this validator, which refuses it by name."

page line node
content/docs/guide/layout.md 523 button in page.actions, "onClick": "editRecord"
content/docs/guide/layout.md 530 button in page.actions, "onClick": "deleteRecord"
content/docs/guide/schema-rendering.md 239 button, "onClick": { "actionType": "ajax", "api": "/api/action" }

Measured NOT a defect, recorded so it is not re-reported: content/docs/guide/quick-start.md:149 also spells onClick, but inside the events bag ("events": { "onClick": [ { "action": "navigate", ... } ] }) under the heading "Actions are data, not inline functions". That is the authorable dialect, not the refused top-level key — and it is the remedy the other three sites want.

Related, not duplicates

How to re-measure

git grep -n '"text":' 655afabf2 -- content/docs/guide/architecture.md content/docs/guide/layout.md
git grep -n '"onClick"' 655afabf2 -- 'content/docs/**/*.md' 'content/docs/**/*.mdx'

Filed by the os-dev seat working objectui#7872; session https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions