Uh oh!
There was an error while loading. Please reload this page.
docs(plugin-view): make the three "Interactive Examples" real object-view nodes (#5113) - #5857
Merged
os-zhuang merged 1 commit intoAug 23, 2026
Conversation
…ew nodes (#5113) The plugin-view docs page presented three hand-built static card layouts as this plugin's "Interactive Examples", wrapped in a PluginLoader for a plugin none of them used, under ids named after the fabricated viewMode trichotomy #5088 removed from the prose. - three new plugin-view catalog entries, each an `object-view` node rendered by the plugin against the docs gallery's data source; - the gallery fixture gains the object surface (getObjectSchema / find / findOne / writes) so an object-bound entry can draw at all, and InteractiveDemo supplies it — it supplied `{}` until now; - the three mock-ups are re-seated as the layout compositions they are (components-layout-card/*, forms/create-user-form), keeping every catalog node the corpus-wide ratchets count; - a pin that the plugin-view entries author object-view AND put the data source's rows on screen. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
os-zhuang
marked this pull request as ready for review
August 23, 2026 16:09
Uh oh!
There was an error while loading. Please reload this page.
os-zhuang
deleted the
claude/issue-5113-plugin-view-interactive-examples
branch
August 23, 2026 16:10
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 freeto 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#5113
The plugin-view docs page presented three hand-built static card layouts as this plugin's "Interactive Examples", inside a
PluginLoader plugins={['view']}wrapper none of them used, under ids named after the fabricatedviewModetrichotomy #5088 had already removed from the prose. Verified on the merge base (d40d2953e) with the issue's own probe: the three entries' node types werebadge/button/card/flex/stack/text,avatar/button/card/flex/stack/textandbutton/card/flex/grid/input/label/select/stack/text— noobject-view, noobjectName, no data source anywhere.The fix makes the examples be the thing they claimed to be, rather than renaming the ids so the fiction reads tidier.
What changed
Three real
object-viewentries (examples/schema-catalog/src/schemas/plugin-view/), one per axis the page's own prose teaches:object-view-listtable.columns,sort,pagination, the toolbar flagsobject-view-named-viewslistViews+defaultListView, two saved views over one objectobject-view-record-surfacelayout/navigation/form/operations— create, read and edit as one surfaceThe docs gallery's data source gained an object surface (
apps/site/app/components/galleryDataSource.ts). This is the machinery question the triage note asked to measure first, and the answer was that the existing fixture — introduced by #4600 for dataset-bound dashboard widgets — is the right home:dataSourceis not a schema key, it is the prop the registered renderer pulls offSchemaRendererContext(packages/plugin-view/src/index.tsx), so with nothing behind that context aplugin-viewexample can only be a drawing of one. It now answersgetObjectSchema/find/findOneand the three writes for one cannedusersobject. No renderer capability was added, no type widened, no pin loosened.InteractiveDemonow supplies that fixture — it supplied{}— which is what lets the page's own previews reach data at all. It is the same moduleSchemaThumbnailalready hands the gallery, not a second one.Honesty about the fixture's limits, on the page and in the file. The fixture answers
$search,$orderbyand the$skip/$topwindow, and does not answer$filter. So the three entries authorshowFilters: falseand the page says why: a filter affordance that silently did nothing would be the same defect this card removes, one control over.The three mock-ups are re-seated, not deleted — they are legitimate static card compositions, just not examples of this plugin:
components-layout-card/user-list-card,components-layout-card/profile-detail-card,forms/create-user-form. Their gallery descriptions now say what they are and point at the object-bound examples. Deleting them was tried first and rejected on evidence: it dropped three corpus-wide counters below their floors (layout-dom-leak-5574'sNODE_CENSUS, and two ratchets inlayout-props-conversion—className-carrying layout nodes 172 < 175,stacknodes 152 < 153). Re-seating keeps every node in the corpus, so no floor and no census moved. For the same reasongrid-columns-key.test.tsx's #4001 row is renamed, not dropped:plugin-view/form-view-mode→forms/create-user-formis the same file with the samecolumns: 2grid node, so the repair that row pins is still pinned.A new pin (
examples/schema-catalog/test/catalog-gallery-render.test.tsx), because "does every tile draw" could not see this defect: everyplugin-viewentry authors anobject-viewnode, and its rendered tile shows a record that exists only in the gallery's data source. The second half is the discriminating one — it cannot be satisfied by a picture of a view. Host-parity cases pin that both docs hosts hand the fixture to the renderer and that the host fixture still exposes every method the test's mirror implements.plugin-view.mdxkeeps its## Interactive Examplesheading, which is now true.Verification — all at
7a4c3a477Each line below is the gate's own verdict, not a shell exit code.
pnpm exec vitest run examples/schema-catalog/(repo root) —Test Files 10 passed (10),Tests 1632 passed (1632).pnpm exec vitest run scripts/__tests__/{site-catalog-card-interactive-nesting-3903,site-playground-layout-registration-3904,extract-mdx-demos,doc-version-claims,catalog-index-regenerable-4633,check-doc-component-types}.test.ts—Test Files 6 passed (6),Tests 96 passed (96).node scripts/check-doc-component-types.mjs—✅ Every documented component type is registered.(882typeliterals against 659 registered keys).node scripts/check-doc-snippet-types.mjs—Every covered documentation snippet compiles against the built types.Semantic phase: 101 of 101 block(s) judged, 0 failed.node scripts/check-doc-links.mjs—Links are valid across 13 scan roots.node scripts/check-changeset-presence.mjs—✅ No source of a released package changed in this range, so no changeset is owed.(apps/siteandexamples/schema-catalogare bothprivate.)python3 scripts/regenerate-catalog-index.py --check—examples/schema-catalog/src/index.ts is up to date (426 entries).node scripts/check-control-bytes.mjs—✅ check-control-bytes: OK (scanned 4871 tracked text file(s)).pnpm --filter @object-ui/example-schema-catalog type-checkandpnpm --filter @object-ui/site type-check— both exit 0 with their scripts echoed (tsc --noEmit && tsc -p tsconfig.test.json;fumadocs-mdx && next typegen && tsc --noEmit). The site run is only meaningful after@object-ui/example-schema-catalogis built — unbuilt, it reports three phantomTS2307s.Reverse verification — both halves of the new pin were shown to fail, each with the mutation confirmed on disk before the run and restored by an
EXITtrap:object-view-list.jsonwith a static card ("type": "card"count 1,object-viewcount 0 in the file):expected [ 'card', 'text' ] to include 'object-view'. The render half still passed — deliberately, because that mutation hard-coded the row text, which is exactly why both halves exist.data: [...USERS_ROWS]occurrences 1 → 0): all three render cases red —expected 'User DirectoryEveryone with an accoun…' to contain 'Alice Johnson'— while the structure half stayed green.Declared narrowing: repo-wide
pnpm lintwas not run locally; ESLint ran on the five changed.ts/.tsxfiles — exit 0,files linted: 5read from--format json, 0 errors and one pre-existing warning on generatedindex.tsline 13 ('ExampleMeta' is defined but never used), a line byte-identical onorigin/main. The narrowing is sound because this repo's ESLint config declares noproject/projectService(eslint.config.jslanguageOptionsisecmaVersion+globalsonly), so it is not type-aware and no untouched file's verdict can move. CI runs the full farm regardless.Out of scope, filed
plugin-gridcatalog entries are hand-built static card layouts that never authorobject-grid— the last instance of #5113's class #5856 — bothplugin-gridcatalog entries are the same defect one category over (badge button card flex stack text, noobject-grid). A census across everyplugin-*category is in that issue; after this PR,plugin-gridis the only one left. The new pin is deliberately not generalized to all ofplugin-*— the general rule needs a per-plugin map of registered types, and that category is why it could not simply be switched on.Generated by Claude Code
Generated by Claude Code