feat(types,fields)!: the grid field's columns and object-chart's dataSource are the spec's, by reference; GridColumnDefinition retires (objectui#11070, round 7) - #11352
Conversation
…ource are the spec's, by reference The grid field's `columns` is declared as `@objectstack/spec`'s `FieldSchema.inlineColumns` (the strict inline grid column) on `GridFieldMetadata` and on the form-field face (TS and zod, with its coverage row). `GridColumnDefinition` is retired: nothing read it and it was not the shape the widget read. `GridField`'s `GridColumn` is the spec's `InlineGridColumn` by reference; the widget already read exactly the spec's keys. `object-chart` declares the per-element `dataSource` binding at node level on the flat mirror and the authored arm, like the other gate-wrapped blocks, and the stale `SHOWCASE_NODE` pin drops the `dataSource: null` the react-page wrapper no longer writes. grid.mdx follows the spec column. Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh Co-authored-by: Claude <noreply@anthropic.com>
…larations; date the notes they falsify One changeset for `@object-ui/types` and `@object-ui/fields` (minor, breaking banner), and a dated note on each pending changeset of this release whose sentence the round makes false (11276, 10872 flat arm, 11070 strict face, 6138, 8209). Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh Co-authored-by: Claude <noreply@anthropic.com>
The import line made the fence-language classifier read the sketch as TypeScript under a plaintext fence; the type is named in a comment instead. Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ 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
|
Round 6 (PR #11333) and objectui#10859 batch 6 landed. Two test files conflicted, each resolved by keeping both sides: the 11070 strict-face pin keeps round 6's dashboard-dialect rows and round 7's node-level object-chart binding row (round 6's "refused until declared" row is superseded by the declaration), and the 10872 envelope census names both object-gantt (batch 6) and object-chart (round 7). Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh Co-authored-by: Claude <noreply@anthropic.com>
✅ 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
|
…jectui#11168 slice 3, round 3, third merge) origin/main advanced to 5638529 while the round-3 gates ran: #11317 (docs), #11352 (types, fields) and #11350 (plugin-grid, core). No conflict. #11352 also edits packages/types objectql.ts, objectql.zod.ts and zod-mirror-parity.test.ts, which this branch edits too; it auto-merged, and the gates are re-run at this head. The guard is untouched by this merge, so its census still reads as at 2817b5f: objectui#11168 5, unjudgedBlocks 2, refusedArms 0. Claude-Session: https://claude.ai/code/session_01VhxTqosz7wn54ahqyxgERT Co-authored-by: Claude <noreply@anthropic.com>
Refs #11070
Clause-②: yes (narrowing). The strict face's accept set widens (a grid field's
columnsand anobject-chartnode'sdataSourcebinding parse), and the tolerant face narrows (both keys are now judged by their declared type: a grid column the spec refuses, or a non-bindingdataSourceonobject-chart, is refused where it used to be stripped or kept unjudged).GridColumnDefinitionretires from@object-ui/types, andGridColumnin@object-ui/fieldsbecomes the spec'sInlineGridColumn. Priced in.changeset/11070-grid-columns-chart-binding-round7.mdas minor with a BREAKING banner.Refs, not a closing keyword, on purpose. Round 7 of the card, under the seat's claim5925545318(remainder items 2 and 3 of5919314708). Draft; the dev does not mark it ready.What changed
(i) The grid field's
columns, by reference to the spec.GridFieldMetadata.columns(field-types.ts) andFormField.columns(form.ts) areSpecField['inlineColumns']; the zod mirrorFormFieldSchemadeclaresstripImportedDefaults(SpecFieldSchema).shape.inlineColumns.form-field-zod-coveragegains thecolumnsrow.FormFieldSchemawas already a registered, spec-derived pair inzod-mirror-parity; itsSPEC_DERIVED_PAIRSnote records the new member, and no ledger total moved.GridColumnDefinitionis retired (interface and barrel export). Nothing in production read it, and it was not the shape the widget read.GridField'sGridColumnisInlineGridColumnfrom@objectstack/spec/data, by reference. The renderer notes its per-member JSDoc carried move into one docblock. No read changes: the widget already read exactly the spec's twenty keys.fields-grid/*already write onlyname/label/type; all nine columns parse against the spec element, so none changes.content/docs/fields/grid.mdx: the typed fence drops a columndefaultValue; the prose names the spec column and lists the nine cell types; the plaintext fences stop teachingboolean,percentandusercolumn types; the validation sketch drops a columnminthe column does not have.(ii)
object-chart·dataSource, re-measured and declared.ObjectChartSchema(TypeScript and the flat zod mirror) declaresdataSourceas the spec'sElementDataSource/ElementDataSourceSchema, by reference.OBJECT_CHART_NODE_LEVEL_KEYSkeeps it out of the authored bag, andObjectChartBlockSchemacarries it at node level (the mirror's own member), asObjectFormBlockSchemaandObjectMapBlockSchemado.SHOWCASE_NODEpin (object-chart-react-tier-node-10770.test.ts) dropsdataSource: nulland the comment describing a wrapper write that round 2 removed; a binding row and anull-refused row join it.Rows the declarations force (fixture triage):
object-chart-properties-bag-11276(the node-level key set gainsdataSource, on the type and runtime legs; its "left undeclared" row becomes a "parses at node level, not a bag member" row) andpublic-block-responsive-styles-10872(DECLARES_DATA_SOURCEnamesobject-chart, the control built to redden exactly when an arm gains the key).strict-face-read-keys-11070movescolumnsandobject-chartto the declared blocks and empties its PENDING list. Comment-only:deriveMasterDetail.declaredSpelling.test.tsx, and the twoGridFieldtests now type their fixturesGridFieldMetadata['columns'].Changesets. One new (
@object-ui/types,@object-ui/fieldsminor). Dated notes on the five pending changesets of this release whose sentence the round makes false:11276-object-chart-properties-bag,10872-flat-arm-responsive-styles,11070-strict-face-read-keys,6138-fields-schema-block-parity-pr2,8209-datetime-widget-faces.Census (i): the grid column, measured at
5262f7dd@objectstack/spec17.5.0gridfield type and nocolumnsmember onFieldSchema. The list isinlineColumns(onmaster_detail), elementsInlineGridColumnSchema: strict, 20 keys (namerequired;label,typein nine values,width,required,options,prefix,step,reference,displayField,idField,multiple,accept,defaultHidden,computed,expr,scale,autofill,readonlyWhen,requiredWhen). Named refusals:field/fieldName/key(→name),title/header(→label),size,expression,hidden;scalerefused on acurrencycolumn.GridField's localGridColumntype. Value domain differs onreadonlyWhen/requiredWhenonly (local object arm had an optional free-stringdialect).GridFieldreadscfg.columns, and per column exactly those 20 keys (a census of member reads off the column: 20 distinct, 0 outside the spec; no spread or computed read of a column).GridColumnDefinitionname,label,type(required, free string),required,defaultValue,width,validate. 2 keys not in the spec,typewider. Production readers: 0 (twofieldstests and the docs prose).fields-grid/*fixturesname/label/type(text,number,currency,date); 9 of 9 parse againstInlineGridColumnSchema.grid.mdxdefaultValue; plaintext fences:boolean(2),percent,usercolumn types; validation sketch: a columnmin.94608a7d7)gridfield (the spec has none). One producer of the spec element:app-showcaseinvoice.object.tsinlineColumns, seven identity-only{ name }entries.H1 holds in substance, not as posed: the spec declares no grid
columns; itsinlineColumnselement is key-for-keyGridColumn. H2 holds:GridColumnDefinitionhad no production reader, so it retires. No non-spec column spelling is read, so nothing else retires and no producer stop applied. The alignment is a type reference, not a renderer redesign.Census (ii):
object-chart·dataSourceon5262f7ddobject-chartregistration iselementDataSourceBlock-wrapped;ElementDataSourceGatereads the node'sdataSourceand landsobjectonobjectName{ ...props, specType, type }, nodataSourcewrite (round 2){ type: 'object-chart', properties: { objectName, chartType }, dataSource: { object } }refused, unrecognized keydataSourcedataSource: nullor an adapter object, accepted unjudged (the arm is passthrough)Not resolved by PR #11328 or round 2, and no ruling needed: declared like the seven other gate-wrapped blocks.
M3 before / after
scripts/measure-strict-authoring-face.mjs --jsonplus the PR #11069findUndeclaredKeysport for pairs, each on a freshly built@object-ui/types.5262f7dd770cc5ba62fe84aeMain to head: exactly
form · fields[].columns(3 occurrences, 3 strict-only, the threefields-griddocuments) leaves; no pair enters or moves, and the tolerant face refuses the same documents. H3 holds.object-chart·dataSourcehas no corpus occurrence, so it moves no M3 figure; its pins carry it.Verification
All on this branch; heavy runs through
os-verify-lockwith 2 workers and a memory watchdog.@object-ui/types:type-checkexit 0 andvitest packages/types/309 files / 7828 tests passed at62fe84ae; build exit 0.type-checkexit 0 in all 11 census packages (types, core, components, fields, plugin-form, plugin-charts, plugin-dashboard, plugin-detail, plugin-tree, plugin-grid, schema-catalog) at3eecfc2c.3eecfc2c:packages/fields/226 files passed, 1 skipped (3515 tests);packages/plugin-form/157 / 1822;packages/plugin-charts/+examples/schema-catalog/121 / 3233; the 86 test files outside those packages that read the zod faces, 86 / 2110.plugin-formfile assigning abooleancolumn, a columndefaultValue, an adapterdataSourceand a dialect-lessreadonlyWhenobject madetscexit 2 with exactly those four errors (TS2322, TS2353, TS2353, TS2322), and a spec-valid control line none; the file was removed.ablation-replace.mjs(anchor 1 → 0, restore blob == HEAD,git diff HEADempty; subjects resolve from source):FormFieldSchema.columns. Predicted 7 red + tsc red; measured 7 failed / 52 passed,tsc -p tsconfig.test.jsonexit 2 (the parity ledger).defaultValueback ingrid.mdx's typed fence. Predicted 1 block red; measuredcheck:doc-snippets698 judged, 1 failed (TS2353 ondefaultValue).dataSourcefromObjectChartBlockSchema. Predicted 5 red, tsc green; measured 5 failed / 321 passed, tsc exit 0.62fe84ae:check:doc-snippets698 of 698 judged, 0 failed (closure rebuilt, 35 of 35 tasks);check:doc-fences,docs:check-links,check:control-bytes,check:changeset-claims,check:pending-changeset-literals,changeset:check,check-changeset-presence,check:new-line-citations(0 new),check:spec-symbols,check:test-path-roots,check:doc-types,check:doc-examples,check:doc-example-idsall exit 0.check-governed-queue-guard --testover the 23 net paths: NOT GOVERNED.**/*.{ts,tsx}(the config'sfiles), so 16 of the 23 changed paths;eslint --no-inline-config --format jsonon those 16 at head and at the base: 0 new errors, warnings equal per file exceptfield-types.ts5 → 4. The one error (index.ts,no-restricted-imports) is present at the base too. The config has no type-aware linting and no rule reads another file, so the diff cannot move an untouched file's verdict.Notes
Spec Main Shape Gate. objectui#11330's repair (PR fix(types,runner): the retired-key pins and the runner sidebar compile against both the pinned spec and objectstack main (objectui#11330) #11343) landed onmainas47e3ce00and is merged into this branch, so its fleet-wide red is not expected here; the result is CI's.packages/types/src/field-types.tson disjoint hunks (FormulaFieldMetadatathere, the grid metadata here). This branch mergesmainagain once it lands.strict-authoring-face.ts, PR feat(types,plugin-form,plugin-charts,app-shell)!: dashboard widgets bind a dataset in the catalog and docs; FormulaFieldMetadata takes the spec's expression; three display-pointer readers read displayField alone (objectui#11070, round 6) #11333's surface,docs/adr/0001-master-detail-subform.md(a governed record that still namesGridColumnDefinition).Acceptance notes
grid.mdx's typed fence still teachesallow_reorder: false.GridFieldMetadatadeclaresallow_reorder, andGridFieldreadsreorderable: a probe rendering the widget measured two drag handles with no key, two withallow_reorder: false, and none withreorderable: false. The widget's other field-level reads (total_field,amount_field,amountField,allow_duplicate,show_line_numbers,sort_field,add_label,reorderable) are declared on neither face. These are field-level keys, outside this round'scolumnsscope; they are in the report for the seat.Generated by Claude Code