Uh oh!
There was an error while loading. Please reload this page.
docs(schema-reference,skills): object-grid columns key off field, not name (#5352) - #5463
Merged
Merged
Conversation
…ot `name` (#5352) Two published corpora authored `object-grid` columns in a `name` spelling that `ObjectGrid` does not read. `ListColumnSchema` (`@objectstack/spec/ui`) is a strict object whose column-identity key is `field`; `{ name, label }` is refused by name (`unrecognized_keys: ["name"]`) and contributes no rendered column. Measured by rendering the doc bytes themselves, before and after: schema-reference.md headers ["#","Name","Email","Company","Phone","Actions"] -> headers ["#","Name","Email","Company","Phone","Status","Actions"] page-builder.md headers ["#"] (row-number column only, zero data columns) -> headers ["#","Name","Price","Status"] The schema-reference example needed more than a key rename: it authored a MIXED array, and `normalizeColumns` dispatches the whole array on `columns[0]`, so a column object standing behind a bare string is dropped whatever it spells. It is now uniformly `ListColumn` objects. The property table names `field` and states the no-mixing rule. The adjacent `object-form` example is deliberately untouched — `FormField.name` is that layer's real key, and that adjacency is the documented cause of this defect family (`packages/core/src/utils/column-identity.ts`). Renderer behaviour is unchanged; this is the docs half only, per triage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
os-support-ai
marked this pull request as ready for review
August 21, 2026 00:53
Uh oh!
There was an error while loading. Please reload this page.
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#5352
Docs half only, per the triage ruling on the card.
ObjectGrid's behaviour is not changed here; the fold-vs-filter renderer question stays with #5349 and the wider alias-family ruling with #5120.What the card said, and what I had to correct
The card describes both shapes as dropped silently — "no throw, no console line". I re-measured on today's
main(77f846a8b), after #5349 / PR #5456 landed its diagnostic. That wording is now half true, and the half that survives is the opposite of what the card's ordering suggests.content/docs/api/schema-reference.mdskills/objectui/guides/page-builder.mdconsole.warnnaming each columnschema-reference.mdis still dropped with no diagnostic at all.partitionAuthoredColumnsreturnsnullwhencolumns[0]is not an object, so the whole array is judged thestring[]arm andObjectGridrenders a header-only grid in total silence when no column resolves — one wrong first column used to take the whole set down, now every wrong column does #5349's reporter deliberately declines it. MeasuredDIAGNOSTICS: 0both before and after my edit.page-builder.mdis no longer silent.ObjectGridrenders a header-only grid in total silence when no column resolves — one wrong first column used to take the whole set down, now every wrong column does #5349 emits exactly one warning that names the block, the index, the keys seen and the rewrite.I have not copied the card's "silently" forward as a blanket claim.
Current behaviour, measured by rendering the doc bytes
Not by reading the type: a throwaway harness extracted the
object-gridJSON blocks out of the two files themselves —git show origin/main:FILEfor the before leg, the working tree for the after leg — and rendered each through the realObjectGrid. The harness was deleted before the commit; only the two corpora and one changeset are in the diff.content/docs/api/schema-reference.mdskills/objectui/guides/page-builder.mdRenaming the key was not enough for
schema-reference.mdThe card frames this as one spelling defect. Rendering showed a second, independent defect in the same array, and this is the part worth reviewing:
normalizeColumnsdispatches the whole array oncolumns[0]. With a bare string first, the array takes thestring[]arm, whose filter istypeof fieldName === 'string'— so a column object standing behind a bare string is dropped whatever it spells. Mixing the two forms is unsupported, and silently so. The example is therefore uniformlyListColumnobjects now, and thecolumnsrow of the property table namesfieldand states the no-mixing rule.Contract check
Every corrected column parses under the real strict schema, and every old one is refused by name:
sortableandtypeare kept becauseListColumnSchemagenuinely declares them (along withwidth,align,hidden,resizable,wrap,pinned,summary,prefix,link,action).Sweep, with its counter-probe
A scanner walked every fenced
jsonblock in both corpora, JSON-parsed each, recursed forobject-grid/view:gridnodes anywhere in the tree, and applied the renderer's own two filters. Grep alone would have missed the two nested grids.Three things make the zero trustworthy: parse failures are reported, never skipped, so no block was silently unread (0 of 35); the counter-probe is the same scan reporting 4 grid blocks it still locates by name after the fix, so the search demonstrably works; and the arm reading for
schema-reference.mdflippedstringtoobject, confirming the dispatch change landed.Two adjacent things were checked and deliberately not changed:
object-formexample directly below the grid example was never wrong —FormField.namereally is that layer's key. The two layers mean the opposite thing by the same pair of words, whichpackages/core/src/utils/column-identity.tsnames as the cause of this defect family, so I added a short note between them rather than "fixing" a correct example.type: "table"andtype: "crud"examples also spellname/label, but against a different contract (TableColumn) and a renderer that readscol.header || col.labelandrow[col.accessorKey || col.name]— they render, so they are not this card's class. No new issue was filed: that finding is already open and unassigned as finding(components): the statictablerenderer is a fourth site of the undeclared column-alias family, and its published docs declarename/labelasTableColumnwhilepackages/typesdeclaresheader/accessorKey#5350 (which quotes the same property-table row and the sametable.tsxline), and thecrudhalf astype: 'crud'has four declaration faces and no renderer —api/schema-reference.mddocuments it as reference material, so a reader who copies it gets OBJUI-001 #5373. Both are out of scope here and untouched.Gates
Run on the committed head
e8714f782, working tree clean:check:control-bytescheck:skills-pathscheck:doc-typescheck-changeset-presence.mjscheck-changeset-no-major.mjscheck:doc-snippetswas not run: it needs 15 built package dists and reads only fencedts/tsxsnippets. This diff changes zerots/tsxfences (mechanically:git diff --merge-baseover the two files matches 4 json-language fences and zerotsortsxfences). CI builds and runs it.Worth noting for the record: no gate in this repo would have caught this.
check:doc-typesverifies that thetypeliteralobject-gridis registered — it is — andcheck:doc-snippetsexplicitly excludes schema-key validity of metadata blocks as #5138 shape 1, left unruled on purpose. That blind spot is exactly how both corpora drifted.Changeset: empty frontmatter — docs and skills only, no package
src/touched, nothing to publish.Generated by Claude Code
Generated by Claude Code