Repository navigation
fix(examples): repair the class (i) keys the strict authoring face refuses (objectui#5250 slice C) - #12128
Merged
Conversation
…fuses (objectui#5250) Slice C of the objectui#5250 programme. Each catalog fixture, the hello-world schema and packages/types/examples/dashboard.ts carried a key no schema declares; each pair was rendered through the real SchemaRenderer with and without the key before it changed: - renamed to the declared key the renderer reads: navigation-menu `items[].items` -> `children`; form `submitButton.label` -> `submitLabel`; form field `columnSpan` -> `colSpan`; button `content` -> `label` (hello-world); card `content` -> `children` (dashboard.ts, whose data table never rendered); button `fullWidth` -> `className: "w-full"`; - removed, with no runtime effect: list `items[].type`, combobox `searchPlaceholder` / `emptyText`, label `required`, object field `schema`. `packages/types/examples/login-form.ts` keeps `defaultChecked`: the checkbox field widget reads it (a `true` renders the box checked), so it is a class (ii) pair, reported rather than deleted or declared. The layout DOM-leak census moves by the three list items the structural walk no longer collects as bare text nodes. Claude-Session: https://claude.ai/code/session_01DwLS3LzXyNmyTunMGbpc8W Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5250
Clause-②: no
Slice C of the objectui#5250 programme: the non-docs class (i) documents. These are authored documents that the shipped strict authoring face (
StrictAnyComponentSchema, the faceobjectui validatejudges with) refuses only because they carry a key that no schema declares. The slice table and its drop-list are in the park review (comment 5887006513): no deletion without runtime proof, and no declaration. Slice B is objectui#12127 (the JSON-fence gate plus the docs repairs). This card stays open until both have merged.The set, re-derived on the dispatch base 5a65f7d
Instrument: a throwaway script. It reads every
examples/schema-catalog/src/schemas/**/*.json,examples/hello-world/schema.json, and the exported nodes ofpackages/types/examples/*.ts. It judges each node document whole with the builtStrictAnyComponentSchemaandAnyComponentSchema, and names keys with the CLI's ownfindUndeclaredKeys.Reading: 435 node documents. 26 are refused, 13 of them strict-only. 14 documents carry an undeclared key, and they hold 12 (component, key) pairs:
examples/hello-world/schema.json;packages/types/examples/dashboard.ts;packages/types/examples/login-form.ts.The other 12 refusals (5
carousel, 6resizable, 1 toasterstack) name no undeclared key. Both faces refuse them for value or shape reasons, so they are not class (i) and are not touched here.The dispatch order's "25 files" is the whole class (i) set of the measurement report, docs included. The non-docs half is these 14.
Per-pair disposition and runtime proof
Instrument: a throwaway dom-project test, never committed. It renders each node through the real
SchemaRendererand the real registry (packages/components/src/renderersplus@object-ui/fields), once with the key and once without it. It compares the normaliseddocument.bodyHTML. Combobox cases are compared with the popover OPEN, where a search placeholder or an empty text would show.Controls: every declared key a pair is renamed to changes the output, so the instrument can see a read key:
items[].children,className: "w-full",submitLabel,colSpan,label,children, and the comboboxplaceholder.components-basic-navigation-menu/documentation-nav.json,site-navigation.jsonitems[].itemsitem.children(control: it draws a submenu trigger)childrencomponents-data-display-list/basic-list.jsonitems[].type(x3)ui:listdraws each item'scontentcomponents-form-button/full-width-button.jsonfullWidthclassName: "w-full"adds the class)className: "w-full", the declared key the fixture's name asks forcomponents-form-combobox/country-selector.json,searchable-combobox.jsonsearchPlaceholder,emptyTexttoFormControlDomProps)components-form-form/contact-form.json,login-form.json,registration-form.jsonsubmitButtonsubmitbuttonDOM attribute on theformelement (control:submitLabelchanges the button text)submitLabelcomponents-form-form/contact-form.jsoncolumnSpancolumnspanattribute on the textarea (control:colSpanadds themd:col-span-2class)colSpancomponents-form-label/required-label.jsonrequiredrequiredattribute on thelabelelement, which draws no indicatorfields-object/structured-configuration.jsonschemaexamples/hello-world/schema.jsoncontentlabeldraws it)label(the park review's rename)packages/types/examples/dashboard.tscontentcontentDOM attribute. The data table never rendered (control:childrenrenders it)childrenpackages/types/examples/login-form.tsdefaultCheckedtruethe checkbox renderschecked.falseis identical only because it is the defaultH6, checked: only the
buttonnode'scontentis undeclared inhello-world. Its twotextnodes authorcontent, whichtextdeclares and reads, so they stay.After the change
The same instrument reads 435 documents, 0 strict-only refusals, and 14 refused:
login-form.ts: the class (ii)defaultChecked, plus the host-suppliedonSubmitfunction that both faces refuse by name as a runtime slot;dashboard.ts, which is NEW to the refused list for a non-class-(i) reason. Withchildrenin place, the data table is parsed (and rendered) for the first time, and it carries host-suppliedonRowEdit/onRowDeletefunctions. That is the same runtime-slot refusal aslogin-form.ts'sonSubmit. It was masked until now, because the misplacedcontentkey kept the table out of every parse and every render.Reverse leg: with the 13 repaired documents reverted to
5a65f7d5, the instrument reads 26 refused, 13 strict-only, and 14 carrying an undeclared key, which is the base reading. Restored withgit checkout HEAD -- FILES;git diff HEADis empty afterwards.Pins
examples/schema-catalog/test/safe-validate-corpus-6318.test.tspins seven named fixtures, none of them touched here, and by design it pins no corpus count. It is unchanged and green.NODE_CENSUSinexamples/schema-catalog/test/layout-dom-leak-5574.test.tsx. Its structural walk collectedbasic-list's threetype: "text"items as bare text nodes, sotextmoves by exactly three: rendered 687 to 684, no-element 140 to 137. It is re-pinned with a dated comment in the file's own style.Gates (HEAD
54a95e75)vitest runoverexamples/schema-catalog/(including the 6318 pin and the census) and every test outside it that namesschema-catalogorhello-world(71 files, two runs)pnpm --filter @object-ui/types type-check(echoedtsc --noEmit && tsc -p tsconfig.examples.json && tsc -p tsconfig.test.json)node scripts/check-changeset-presence.mjspackages/types/examples/**is outside@object-ui/types'files, and the catalog and hello-world are private examples)pnpm check:new-line-citationspnpm check:control-bytespnpm docs:check-linkspnpm check:doc-typesnode scripts/check-governed-queue-guard.mjs --testover the 14 pathspnpm check(the CLI self-checklint.ymlruns)Acceptance notes
login-form.ts'sdefaultCheckedis read through the checkbox field widget. Slice B measured the same channel for a text field'sdefaultValue. The strict face refuses both, soobjectui validatetells an author to remove keys that work. Reported on the card for the declaration side; nothing is declared here.content/docs/components/form/button.mdx(fullWidth),form.mdx(submitButton) andlabel.mdx(required, "Show required indicator"). The probes above show nothing reads them. Those pages are outside both slices' file surfaces, so this is reported on the card rather than changed here.The session that produced this change is
https://claude.ai/code/session_01DwLS3LzXyNmyTunMGbpc8W.Generated by Claude Code