Uh oh!
There was an error while loading. Please reload this page.
feat(plugin-grid): type the data-table schema slot ObjectGrid fills, shown able to fail (#6459) - #6637
Merged
Conversation
…6459) `const dataTableSchema: any` becomes `ObjectGridDataTableSchema` = RemoveIndexSignature<DataTableSchema> & the two measured schema-level holds (renderCellEditor, cellClassName); buildGroupTableSchema's return is annotated with the same type and the `(dataTableSchema.columns as any[])` cast drops. Measured on 38a123c before choosing the shape: a bare `DataTableSchema` annotation with an undeclared bogus key written longhand in the fresh literal compiles with ZERO diagnostics — BaseSchema's `[key: string]: any` makes every key a member, so excess-property checking never has a non-member to refuse. Stripping the index signature is what makes the annotation able to fail. Part of #6459 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
…, and the census holds Seven compile-time pins in dataTableSchemaSlot-6459.test.ts: the bare `DataTableSchema` annotation is blind (index signature admits a bogus key at a fresh literal — MUST COMPILE), the strip is real (`string` no longer indexes the seam type), the seam type refuses longhand bogus keys at both writer shapes (fresh literal; spread + longhand in an annotated return), a non-fresh value still smuggles (assignability — the pinned boundary), the two HELD keys are accepted, and declared members survive the strip with modifiers intact. Plus the changeset (minor, matching #6004's precedent). Part of #6459 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
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 was referenced Aug 28, 2026
os-sales
marked this pull request as ready for review
August 28, 2026 07:57
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 28, 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 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.
Part of #6459
What this does
packages/plugin-grid/src/ObjectGrid.tsxbuilt its data-table schema asconst dataTableSchema: any, so the ~46 keys assembled there — and thecolumnsslot itself — were checked against nothing, while the importedDataTableSchemawent unused as that object's annotation. This PR:ObjectGridDataTableSchema;buildGroupTableSchema's return with the same type;(dataTableSchema.columns as any[]).map((c: any) => …)cast, which existed only because the surrounding value wasany;dataTableSchemaSlot-6459.test.ts(7 compile-time pins);minorchangeset (matching PR precedent for the producer half of this seam).Part of, notFixes: the annotation landed and is shown able to fail (below), but the census leaves two keys that need a maintainer ruling onDataTableSchemaitself, which is out of this card's fence.The measured mechanism — why the annotation is NOT a bare
DataTableSchemaThe card's sizing note predicted a bare annotation would be inert through the spread in
buildGroupTableSchema(excess-property checking is a freshness check). Measured on38a123cacbefore shaping the fix, the truth is stronger — the spread is not even needed:const dataTableSchema: DataTableSchemawithbogusKeyForProbe6459: truewritten longhand in the fresh literal →tsc --noEmitexit 0, zero diagnostics.The root cause is
BaseSchema's[key: string]: anyindex signature, whichDataTableSchemainherits: under an index signature every key is a member, so excess-property checking never has a non-member to refuse — at a fresh literal, through a spread, anywhere. This is the terminal case of the #6626 rule ("a pin enforced by a key's non-membership silently stops enforcing the moment the key becomes a member"): with an index signature there is no non-membership, ever.The seam type strips the signature (
RemoveIndexSignatureapplied toDataTableSchema— derived, never a hand-copied member list) and re-adds the two measured holds. That is what turns the annotation from inert to able-to-fail.Shown able to fail (reverse verification, commit-first)
Both probes on the committed implementation; mutation proven on disk by anchored grep counts plus a blob-hash difference vs HEAD; restore proven by observation (
git diff HEADempty ANDgit hash-object= HEAD blob), never by exit code; both probe scripts carrytrap restore EXIT INT TERMwith absolute paths.src/ObjectGrid.tsx(3393,5): error TS2353: Object literal may only specify known properties, and 'bogusKeyForProbe6459' does not exist in type 'ObjectGridDataTableSchema'.(tsc exit 2)buildGroupTableSchema's annotated return literal. Predicted RED; observed:src/ObjectGrid.tsx(3592,5): error TS2353: … 'bogusGroupKeyProbe6459' does not exist in type 'ObjectGridDataTableSchema'.(tsc exit 2)The instrument's boundary, stated and pinned rather than papered over: a bogus key riding a non-fresh value assigned into the slot is admitted — assignability admits extra members; that is structural typing. Both real writers are literals sitting directly in annotated positions, so the live mechanism at this seam is freshness — unlike the producer seam, where
.map()laundered freshness away and only?: nevertombstones could bite. A key RETIRED by ruling still needs a per-key tombstone; an open census cannot be tombstoned, because a tombstone needs the key's name. Pinned as a MUST-COMPILE test so nobody mistakes this for tombstone-grade coverage.The census — a REPORT for a ruling, not a declaration
Diffing every key the two literals write (46 flat + 8 group) against
DataTableSchema+BaseSchemadeclared members, on38a123cac. The card's speculative list (pagination,manualPagination,rowCount,frozenColumns,singleClickEdit,selectionResetKey,disableInnerScroll,borderless) has since been declared onDataTableSchema— the interface grew after the card was filed. Exactly two undeclared keys survive:data-table?renderCellEditordata-table.tsxreads it via its own(schema as any).renderCellEditorcast and hands cell editing to the returned widget (the renderer itself acknowledges the key is undeclared)packages/typesdocblock as "the host's renderCellEditor"cellClassName(schema-level)className(three call sites; the column-level twin IS declared, onTableColumn)⛔ Deliberately NOT done here, per the dispatch fence: declaring either key on
DataTableSchema(that ispackages/types— published, human floor, and currently held by PR #6627), or retiring either (both have live readers; removal is a behaviour change). Both are HELD at the seam (ObjectGridDataTableSchemaHolds), visible instead of anonymous, until the ruling. The open question for the ruling is whetherDataTableSchemashould declare them (and document them), or whether they should remain seam-level holds.Census side-observation, recorded for completeness:
caption: schema.label || schema.titlereadstitleoffObjectGridSchemathrough the sameBaseSchemaindex signature (ObjectGridSchemadeclares notitle), so that read is equally invisible to any key check on the grid's own authoring surface. Out of this card's fence.Verification
pnpm --filter @object-ui/plugin-grid type-check— both programs (tsc --noEmitandtsc -p tsconfig.test.json) green; the test program's--listFilesnamesdataTableSchemaSlot-6459.test.ts(1 hit — verified, not assumed).pnpm exec vitest run packages/plugin-grid/src/__tests__/dataTableSchemaSlot-6459.test.ts→ 1 file, 7/7 passed.eslinton both changed files: exit 0 (0 errors; 217 pre-existing warnings inObjectGrid.tsx, none on the added lines).node scripts/check-changeset-presence.mjs→ 1 released-package source file changed, 1 changeset declared.check-changeset-no-majorgreen (minor).check:control-bytesgreen.2df78a8b(the final commit), run as 16 sequential--shard=N/16invocations of the rootpnpm test(CI runs the same whole-repo suite in 4 shards):command-exit 0(per the shared verify-lock wrapper's own verdict lines, never a piped$?); 2132 test files passed, 26859 tests passed, 1 skipped (the skip pre-exists onmain, shard 3).ECONNREFUSED 127.0.0.1:3000stack traces on stderr while every file in them passes — connection-refusal paths under test printing unhandled noise. Recorded because the noise is easy to misread as a red gate when a run is killed early.Worktree cleaned after PR creation. No service was started; nothing listens on any port from this task.
Generated by Claude Code