This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(plugin-grid): the no-data-source gate stops reading a bare data array as 「no adapter needed」 - #9783
Merged
Conversation
…ded" in the no-data-source gate
`gridNeedsDataSource` enumerates the escape hatches that let a grid placement
draw rows without a runtime adapter, and `Array.isArray(schema.data)` was one of
them. Both carriers of that shorthand are retired: the shared record-source
ladder refuses it (this block's published `data` row is the `ViewData` OBJECT
arm), and `SchemaRenderer` no longer spreads an authored `data` as a React prop
for a block on that arm.
So the predicate was describing a carrier that no longer exists. A grid authored
with a bare `data` array, an `objectName` and no adapter drew nothing, while the
one diagnostic built to explain exactly that stayed silent — the empty shell the
"no data source" panel exists to replace. The dev-build warn-once at the strip
site does not reach production; this gate is the production-facing half.
The carrier itself is NOT re-opened. Every other escape hatch is untouched and
held by a control in the new pin: the declared `{ provider: 'value', items }`
form, the deprecated `staticData` array, the data-scope `bind`, the `data` React
prop a host uses to hand down rows it already fetched, and the `objectName`
clause that keeps a grid naming no object pointed at its own defect.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018HrVaotisyhgmot9o2MLRq
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #9580
Clause-②: noobject-grid's 「no data source」 gate stops treating a baredataARRAY as evidence that aplacement can draw rows without an adapter.
The defect
gridNeedsDataSourceinpackages/plugin-grid/src/index.tsxenumerates the escape hatches that letTHIS placement draw rows without a runtime adapter, and
Array.isArray(schema.data)was one ofthem. Both carriers of that shorthand had already been retired:
block's published
datarow is theViewDataOBJECT arm;channel —
SchemaRendererno longer spreads an authoreddataas a React prop for a block onthat arm.
⇒ an authored array draws nothing, while the predicate still answered 「this placement needs no
adapter」. So a grid authored with a bare
dataarray, anobjectNameand no adapter rendered theEMPTY SHELL that objectui#5378 item 2 exists to replace, with the one diagnostic addressed to exactly
that situation staying silent. The warn-once objectui#9571 added at the strip site is
__DEV__-only;this gate is the production-facing half.
⛔ The bare-array CARRIER is not re-opened — that was ruled twice. Only what the gate SAYS moves.
The change
packages/plugin-grid/src/index.tsx— one line removed from the predicate(
Array.isArray(schema?.data)), and the docblock that enumerates the hatches re-derived: it hadalso carried the now-false clause that
getDataConfigfolds an arraydatainto inline rows.packages/plugin-grid/src/__tests__/gridNeedsDataSourceBareArray-9580.test.tsx— the pin, 8 rows..changeset/9580-grid-needs-datasource-bare-array.md—patchon@object-ui/plugin-grid; thebehaviour of a published block moves, so this is not a
skip-changesetchange.Premises re-verified on
origin/mainbefore writing anythingThe card is written in the conditional (「After objectui#9571 lands」). Re-taken on
f0b49792159de76697b06109bfe7760938e463a0, which is this branch's base and wasorigin/mainatbranch time:
SchemaRendererno longer spreads an authoreddatafor aview-data-arm blockSchemaRenderer.tsx, gated on'data' in componentProps && recordSourceDataArmForType(type) === 'view-data'gridNeedsDataSourcestill returned false forArray.isArray(schema?.data)packages/plugin-grid/src/index.tsx, unmoved__DEV__-onlyreportRefusedDataPropSpreadunderif (__DEV__), and that function's own docblock says 「Read-only and__DEV__-only」⇒ the defect exists as written;
premise_still_valid: true.The pin can go red — measured, not asserted
The repair was committed first, then the removed line was planted back through
ablation-replace.mjs(literal anchor, hit count declared, write verified against the DISK andagainst
git hash-object, restore proven by blob-equals-HEAD plus an emptygit diff HEAD).Predicted direction before running: 转红 — rows 1-2 fail, every control holds.
With the repair in place the same file is
Tests 8 passed (8). The ablation runs entirely againstSOURCE — the root vitest config aliases
@object-ui/reacttopackages/react/srcand the blockitself is imported relatively — so there is no
dist/leg for it to be true-but-unbuilt in.Rows 3-8 are the controls that a repair reaching too far would break: the declared
data: { provider: 'value', items: [...] }form, the deprecatedstaticDataarray, the data-scopebind, thedataREACT PROP a host such asplugin-list'sListViewuses to hand down rows italready fetched (the leg objectui#9571 deliberately kept), the
objectNameclause, and a grid thatHAS an adapter.
Local verification
Gate list hand-derived from this repo's
package.jsonand.github/workflows/—scripts/pm/dispatch-gates.mjslives only inobjectstackand refuses to answer for this repo.Exit codes were redirected to files and read from there, never from a pipeline's tail.
pnpm exec vitest run packages/plugin-grid/src/__tests__/gridNeedsDataSourceBareArray-9580.test.tsxTests 8 passed (8)pnpm exec vitest run packages/plugin-grid/Test Files 136 passed (136),Tests 1259 passed (1259)pnpm exec vitest run packages/plugin-view/ packages/plugin-list/Test Files 120 passed (120),Tests 1342 passed (1342)object-gridwith a baredataarrayTest Files 3 passed (3),Tests 691 passed (691)pnpm --filter @object-ui/plugin-grid run type-checktsc --noEmitandtsc -p tsconfig.test.json; the first EXCLUDES__tests__, which is why the second is the one that reads the new pin)pnpm --filter @object-ui/plugin-grid run lintno-explicit-any/ react-hooks advisories)pnpm --workspace-concurrency=2 --filter "@object-ui/plugin-grid^..." buildcheck-changeset-presence·check-changeset-no-major·check-changeset-claims·check-pending-changeset-literalscheck-control-bytes·check-new-cross-file-line-citations·check-test-path-rootscheck-element-data-source-declaration·check-component-surface-parity·check-registry-bare-name-collisions·check-unreferenced-sources·check-lint-rule-coveragecheck-vi-mock-specifiers·check-vi-mock-inherit·check-vi-mock-override-shape·check-comment-mask-corpuscheck-sdui-registration-pinsapps/consolebundle to weigh. Owned byperformance-budget.yml, which builds the console first. No registration array moved in this diff.pnpm lint/ fullpnpm testlintand the three suites above are the narrowed substitute, declared here rather than skipped silentlyByte scan beyond the gate:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over both changed sourcefiles returns nothing.
Acceptance notes
packages/plugin-grid/src/ObjectGrid.tsxis outside thiscard's declared file surface, so it is untouched here. Its
getDataConfigdocblock still states as aMEASURED conclusion that an authored
dataarray reaches the component TWICE and that 「throughSchemaRendereran authoreddata: [ ...rows... ]still draws, from the props channel」. objectui#9571made both halves false, and the pin that paragraph cites — row 3 of
__tests__/gridBareArrayDataRefused-8348.test.tsx— now asserts the opposite in the same tree. It isprose drift rather than one of the three filing classes, so no card is raised from here; per
AGENTS.md it is the kind of thing the next change to that file repairs opportunistically. Named
handler: none. Dedupe terms if a seat does decide to file it:
getDataConfig·passedData·two carriers·props channel·objectui#9571 docblock drift.🤖 Generated with Claude Code
https://claude.ai/code/session_018HrVaotisyhgmot9o2MLRq
Generated by Claude Code