fix(examples): catalog entries author the keys their renderers read (#4624) - #4630
Merged
Merged
Conversation
…4624) Three catalog-authoring defects on one surface, plus the #4616 render pin's exclusion tables shrinking to match. - #4624: components-disclosure-toggle-group/with-labels named root type "single", which nothing registers. Now "toggle-group" + selectionType "single", the spelling both siblings use. - #4626: components-overlay-tooltip/basic-tooltip authored its trigger under "children", which the tooltip renderer never reads (it reads schema.trigger at tooltip.tsx:28). Now "trigger". - #4626: components-overlay-hover-card/basic-hover-card was measured NOT to be blank and NOT to author an unread key -- text.tsx:35,40 reads schema.content || schema.value, so the authored "value" was read and the tile drew a text node. Its real defect: a bare text node is not an element, so HoverCardTrigger asChild had nothing to attach to. Trigger is now a link-variant button, the shape the renderer's own defaultProps declare. - #4625: the six components-form-calendar entries authored the bare "calendar" keyword, which plugin-calendar's data-bound ObjectCalendar owns. Measured first that "ui:calendar" is addressable as a schema type, then re-authored all six to it. The pin now asserts all three diagnostics for every non-excluded entry: the per-entry DATASOURCE_REQUIRED exemption table is gone, and only the deliberate OBJUI-001 demo and the six Monaco/maplibre environment abstentions remain excluded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 14, 2026
os-zhuang
marked this pull request as ready for review
August 14, 2026 05:46
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.
Fixes #4624
Fixes #4626
Fixes #4625
Three catalog-authoring defects on one surface, plus the #4616 render pin's exclusion tables shrinking to match reality. Authoring-side only: no renderer or package source is touched.
One of the three filings turned out to be partly mis-diagnosed. That is reported below rather than papered over, and the pin's header is corrected to match what was measured.
Piece 1 — #4624,
components-disclosure-toggle-group/with-labelsNamed root type
"single", which nothing registers. Now"toggle-group"+"selectionType": "single", the spelling both siblings already use. Theitemskeep theiriconkeys:ToggleGroupItem.iconis a declared field (packages/types/src/disclosure.ts:131), so this is not the entry inventing a key — though no renderer reads it, filed as #4632.This was the last unintentional OBJUI-001 tile in the corpus.
Piece 2 — #4626, the two "blank tile" entries
components-overlay-tooltip/basic-tooltip— filing confirmed. It authored its trigger underchildren. Renderer prop reads,packages/components/src/renderers/overlay/tooltip.tsx:renderChildren(schema.trigger)insideTooltipTrigger asChild(schema.content || renderChildren(schema.body))insideTooltipContentchildrenis read nowhere, so the tile drew nothing at all. Measured as authored: 2 elements (both harness wrappers), empty text. Now authorstrigger; measured after: 3 elements, text"Hover me".components-overlay-hover-card/basic-hover-card— filing falsified on both of its claims. The issue states the text renderer readscontentand thatvalueis therefore never read. It reads both:packages/components/src/renderers/basic/text.tsx:35and:40both evaluateschema.content || schema.valueSo the authored
valueWAS read, and the tile was not blank: measured as authored, it drew the text node"Hover over me". The pin's own non-vacuity control accepts text as well as elements (deliberately —components-basic-text/*are bare text nodes), so removing this entry's exclusion turns nothing red. That was verified by removing the exclusion BEFORE touching the entry: the run went red on 9 cases and this was not one of them.What the entry did have is a different defect, one the filing did not name: a bare text node is not an element, so
HoverCardTrigger asChildhad nothing to clone and the card could never open. Measured contrast, same harness — atexttrigger carrying aclassNamerenders a span that Radix wires (data-state="closed"), while the bare one renders no element at all. The trigger is now a link-variant button, which is the shape the renderer's owndefaultPropsdeclare for this slot (hover-card.tsx:50). The content slot keepsvalue, which is the keyTextSchemadeclares (packages/types/src/layout.ts:56).Note the deliberate non-change: the ruled correction
valuetocontentis a no-op at render time AND would author a keyTextSchemadoes not declare.contentappears only in the registry meta. That three-way disagreement is the real class question and is filed as #4631.Piece 3 — #4625, the six
components-form-calendarentriesVerify-first, as ruled.
ui:calendarIS addressable as a schema type. Measured, not inferred:Registry.get(type)with no namespace argument looks the string up verbatim (packages/core/src/registry/Registry.ts:350-358), andregister()stores the namespaced form under exactlyui:calendar(line 163).SchemaRendererpasses the authored type straight in:ComponentRegistry.get(evaluatedSchema.type)atpackages/react/src/SchemaRenderer.tsx:506.{ "type": "ui:calendar", "mode": "single" }produced 115 elements and painted the date-picker grid ("August 2026 SuMoTuWeThFrSa..."). The barecalendarkeyword in the same probe produced 5 elements and"Error: DataSource required for object/api providers".So all six now author
ui:calendarand reach the form-calendar primitive the category exists to demo.form-integrationis adivwhose nested child was the offending node; only that child changed.The bare keyword still resolves to plugin-calendar's
ObjectCalendar. That isskipFallback: trueworking as designed, not something this PR routes around.Piece 4 — the pin
examples/schema-catalog/test/catalog-gallery-render.test.tsx:KNOWN_DIAGNOSTICtable is deleted entirely — it held only Docs gallery: the six components-form-calendar entries author the bare "calendar" keyword, which belongs to plugin-calendar's ObjectCalendar #4625's six DATASOURCE_REQUIRED exemptions. With no exemptions left,diagnosticsFor()is gone too and all three diagnostics are asserted for every non-excluded entry. Strictly stronger, andDATASOURCE_REQUIREDstays asserted as the regression guard that catches an entry sliding back to the bare keyword.Untouched, as ruled: the deliberate OBJUI-001 demo entry, the three Monaco and three maplibre environment abstentions, and
AUTHORED_TEXT_EXEMPT(#4627).Red-first, then green
Predictions were written before the run. Pin edits made first, entries untouched, so the red is the pin reporting on the real corpus:
Verbatim diagnostics:
basic-tooltipand the corpus case fail differently — on the non-vacuity control insiderenderEntry,expected true, received falseat thedrewSomethingwaitFor — because a tile that draws nothing never settles. That is the blank-tile signature, and it is the one #4626 half that reproduced.components-overlay-hover-card/basic-hover-cardis absent from that list: it passes with its exclusion removed and no entry change. Predicted red, measured green — reported rather than forced.After the entry re-authoring, same command:
440 vs the 437 of the pre-change baseline: three entries left the exclusion table and became asserted cases.
Reverse verification. Fix taken back out with
git checkout origin/main -- ...(nevergit stash), pin left in place: the same 9 cases fail,basic-hover-cardagain absent. Restored withgit checkout HEAD -- ...and all nine files verified bit-identical bysha256sum -c.Verification
Gate battery, all PASS:
check-control-bytes,check-phantom-dependencies,check-changeset-presence,check-changeset-no-major,check-changeset-fixed,check-type-check-coverage,check-lint-coverage,check-doc-links. Control-byte self-scan over the changed files (and untracked: none) is clean.Changeset
None owed, and
skip-changesetis applied instead:@object-ui/example-*is in.changeset/config.json'signorelist and@object-ui/example-schema-catalogis"private": true. The diff is entirely underexamples/schema-catalog/**.check-changeset-presencepasses.Out of scope, filed rather than fixed here
inputs/ renderer reads) that disagree. This is Docs gallery: the basic-tooltip and basic-hover-card entries render a completely blank tile — each authors a key its renderer never reads #4626's class question, re-filed standalone with the tooltip and text specimens measured above.TooltipSchemadeclaring a requiredchildrenthat the renderer ignores means an author following the published type gets a blank tile.ToggleGroupItem.iconis declared but no renderer reads it (observation-class).pnpm regenerateis destructive: it blanks six plugin-dashboard entries' curated titles and descriptions #4633 —pnpm --filter @object-ui/example-schema-catalog regenerateis destructive on current main: it blanks sixplugin-dashboardentries' curated titles and descriptions. NOT run for this PR and not needed (no entry added, removed or renamed;index.tsonly imports the JSON by path), soindex.tsis unchanged here.Generated by Claude Code