fix(examples,docs): the dashboard gallery renders working charts again — filtered-* entries leave the retired shape (#4600) - #4615
Merged
Conversation
…n — filtered-* entries leave the retired shape (#4600) Implements (d1) of #4600's ruling. The 6 `filtered-*` catalog entries taught and rendered the pre-ADR-0021 inline analytics shape, which the renderer retired in framework#3320: 15 of the category's 28 widgets drew the "retired data format" placeholder and 2 more drew DatasetWidget's unsupported-source error. - The 6 entries now bind live surfaces: inline `options.data` (static series / `options.value` metrics) for the five inline examples, and the dataset variant keeps its two `dataset`-bound widgets, which now render through a gallery stub. Every `globalFilters` / `filterBindings` / `targetWidgets` / `dateRange` declaration is unchanged — the filter pedagogy is the point of these entries — and the #4356 pair-form options stay pair-form. - `apps/site` gains `galleryDataSource` (canned `queryDataset` rows) and `registerCatalogBlocks` (the dashboard + chart registrations the gallery page never loaded). Measured: before this change every dashboard tile in the gallery was the registry's "Unknown component type: dashboard" panel. - The 3 teaching locations move off the retired shape and the false prose is corrected ("Working examples", "mix freely", the metadata-check claim). - New render pin: every entry is rendered through the real SchemaRenderer and may show none of the three diagnostics. Red before this change (retired=15 across 5 entries), green after. 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
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Aug 14, 2026
…4600) The #3904 guard (scripts/__tests__/site-playground-layout-registration-3904. test.ts) discovers every apps/site SchemaRenderer host and reads its imports for `registerLayoutBlocks` by name. Routing that import through the new `registerCatalogBlocks` module satisfied it in the module graph but not in the guard's source-text view, so the host read as one that registers nothing — CI red, correctly. Each host now names both registrars, one per responsibility: layout blocks (#3787) and the gallery's dashboard/chart blocks (#4600). registerCatalogBlocks no longer re-exports the layout one, so the guard's discovery property stays literally true for any host added later. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 14, 2026 01:55
yinlianghui
enabled auto-merge
August 14, 2026 01:56
yinlianghui
disabled auto-merge
August 14, 2026 01:56
yinlianghui
enabled auto-merge
August 14, 2026 01:56
…lery-truth # Conflicts: # apps/site/app/components/SchemaThumbnail.tsx
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Aug 14, 2026
This was referenced Aug 14, 2026
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.
Implements (d1) of #4600's ruling (comment 5287965650). Not
Fixes— the card also tracks (d2), routed upstream to objectstack#8593; the PM decides closure.What was broken, measured on
origin/main@c1d939f7fThe measurement seat found 15 "retired data format" placeholder widgets and 2 dataset-error widgets across the
plugin-dashboardcatalog entries. Rendering them through the gallery's own registration set found one more layer:/docs/guide/schema-catalogloads no plugin at all —PluginLoaderis opt-in per docs page and the gallery never wraps anything in one — so every dashboard tile was the registry's red OBJUI-001 panel. The 15 placeholders are what those entries produce once the plugin is loaded (PROBE B, same commit, plugin registered):Both had to be fixed for the gallery to draw a chart, so this PR does both.
Per-entry surface choice, with the probe evidence
Three candidate live surfaces were rendered in the gallery context before choosing (PROBE C, real DOM markers):
options.dataarray (+xField/yField)[data-chart]=1,.recharts-responsive-container=1, 0 alertsoptions.valuemetricTotal Invoices 1,284options.data = { provider: 'object', … }dataset+dimensions+values, context-only stubThis data source does not support dataset queries.dataset+ … , stub passed as a propRevenue 69 revenueThat fourth row is the load-bearing measurement:
DashboardRenderertakesdataSourceas a React prop, andSchemaRendererContextalone never reaches it — so the stub is passed both ways.filtered-dashboardoptions.data(bar, line) +options.value(metric)filtered-dashboard-date-presetsoptions.data(line, area) +options.valuefiltered-dashboard-dynamic-optionsoptions.data(bar, donut)filtered-dashboard-filter-typesoptions.data(bar, line) +options.valuefiltered-dashboard-target-widgetsoptions.data(bar, line) +options.valuefiltered-dashboard-dataset-widgetsoptions.data, keeping the "dataset + inline" mix the entry's title promisesEvery
globalFilters,filterBindings,targetWidgetsanddateRangedeclaration is byte-identical — the filter pedagogy is what these entries teach — and the #4356 pair-form options stay pair-form (its guardrail is green on both sides, below). The 3 metric-card entries are untouched: they render fine, and their spec-validity is objectstack#8593's question.The gallery stub and the registration
apps/site/app/components/galleryDataSource.ts— cannedqueryDatasetrows shaped from the query's owndimensions/measures, so any dataset-bound widget gets a two-bucket series (or a single value with no dimension). A demo fixture: it does not filter or aggregate. Gallery-only;apps/siteis private, so this is not a published package surface.apps/site/app/components/registerCatalogBlocks.ts— the@object-ui/plugin-dashboard+@object-ui/plugin-chartsside-effect imports the gallery never had.SchemaThumbnailimports it alongside./registerLayoutBlocksrather than through it — see the CI-lap note below for why that separation is load-bearing. Eager, for the same reasonregisterLayoutBlocksis eager (the thumbnails stay in the prerendered HTML). Deliberately not wired intoInteractiveDemo/LiveSplitDemo, so ordinary docs pages keep theirPluginLoader-governed lazy loading; the gallery page's own modal preview is unaffected becauseSchemaThumbnailhas already registered them on that page.Docs truth
content/docs/guide/dashboard-filters.md— Step 1 and Step 4 move off the retired top-levelobject/categoryField/aggregateshape todatasetbinding; a new "Where a widget's data comes from" table names the three surfaces and which of them filters can reach; a retirement note tells legacy authors what the placeholder means and how to rebind. The "Working examples" claim now says what those examples actually are. "Inline (object-based) and dataset-bound widgets can mix freely" is corrected — the mix is real, but it is dataset + inline object query / static array, which behave differently under filters. The Known-limitations metadata-check bullet was false:buildWidgetScopedFiltertakesknownFields, and no renderer passes it (DashboardRenderer.tsx:749is the only call site) — the bullet now describes what actually happens.content/docs/plugins/plugin-dashboard.mdxandpackages/plugin-dashboard/README.md— the same widget examples move todatasetbinding, each with a short note on the retired shape and onoptions.data.The render pin (the CI blind spot this closes)
examples/schema-catalog/test/plugin-dashboard-gallery-render.test.tsxrenders every entry in the category through the realSchemaRendererwith the gallery's context and asserts no tile shows the retired placeholder, the dataset error, or OBJUI-001 — plus every authored widget title, so an entry cannot pass by rendering nothing.smoke.test.tsxcontains norender(call at all, which is why none of this was visible to CI.RED against
origin/main's entries (predictions written before the run; entries reverted withgit checkout origin/main --, nevergit stash):datasetErrorsreads 0 there rather than the measured 2 because the pin already supplies the stub — the 2 dataset errors belong to the old gallerydataSource: {}, and are reproduced verbatim in the PROBE B table above. Reported as measured rather than as predicted.GREEN after — and a second reverse check with the entries kept but the gallery wiring removed fails exactly one case, the parity guard, which is what gives that guard teeth:
The #4356 guardrail (
plugin-dashboard-global-filters-spec.test.ts) is inside that 1134 and green on both sides.Verification
check-changeset-presencereports "0 of them under the src/ of a package the release covers … no changeset is owed" —examples/schema-catalogandapps/siteare changeset-ignored and theplugin-dashboardedit is its README. Henceskip-changeset, applied to this PR.CI laps on this PR, recorded
1.
Test (shard 1/4)went red on the first push, correctly, and it was mine.scripts/__tests__/site-playground-layout-registration-3904.test.tsdiscovers everyapps/siteSchemaRendererhost and reads its imports forregisterLayoutBlocksby name. Reaching that registrar through the newregisterCatalogBlocksmodule put it in the host's module graph but not in the guard's source-text view, soSchemaThumbnailread as a host that registers nothing:Fixed in the second commit by naming both registrars in the host, one per responsibility, and dropping the re-export from
registerCatalogBlocksso #3904's discovery property stays literally true for any host added later.2.
Build Docsis red, and it is red onmainat this branch's base commit. Not introduced here:c1d939f7fis the merge of PR #4608 (#4580, "the union wins"), and the failing step isnext build's TypeScript pass with fiveTS2322s —SchemaNodenot assignable toSchemaRenderer'sschemaprop, inInteractiveDemo×2,LiveSplitDemo,playground/page.tsxandSchemaThumbnail. Four of those five files are untouched by this PR, and the error is on theschema={…}attribute, not thedataSourceone added here. Evidence and the two contract options are on #4617. Deliberately not patched here: the honest fix is a published prop-type decision in@object-ui/react, and casting at the call sites is exactly the consumer-side tolerance contract-first forbids.Generated by Claude Code