Skip to content

finding(plugin-grid): ObjectGrid honours four undeclared authored column keys via (col as any) — the #6425 shape at the other producer #6458

Description

@claude

Found while implementing #6004 (typing ObjectGrid.generateColumns()'s emit). Filed unassigned. #6004's fence is what this producer writes; this is the same producer's READ of its authored input, and it is the exact mirror of #6425 — which recorded this shape for ObjectDataTable, the other column producer. #6004 named only the write side.

Measured (at 129c7a9e7)

packages/plugin-grid/src/ObjectGrid.tsx, inside generateColumns()'s ListColumn branch, reads five keys off the authored column through a cast:

linereaddeclared by ListColumn?
:1815(col as any).formatno
:1840, :1841(col as any).optionsno
:1846(col as any).appearanceno
:1925(col as any).prefixyes — the cast is unnecessary
:1951(col as any).essentialno

ListColumn (@objectstack/spec@17.2.0, re-exported by packages/types/src/objectql.ts:74) declares exactly: field, label, width, align, hidden, sortable, resizable, wrap, type, pinned, summary, prefix, link, action.

So four of the five are honoured at runtime and refused by the schema — ListColumnSchema is a strict object, so an author who wrote essential: true or appearance: … on a list column would get unrecognized_keys at publish while the renderer happily reads them. That is the declared != enforced split AGENTS.md #0.1 exists to stop, and the as any is the tell — the same tell #5853 removed for type.

The fifth (prefix) is the opposite bug and free to fix: it is declared, so the cast is pure noise hiding the other four among lookalikes.

Not dormant

These are live limbs, so this is a different adjudication from #6004's — retiring an inert write costs nothing, while removing a read is a behaviour change:

  • format promotes a text column to a richer renderer via resolveCellRendererType (e.g. format: 'phone'PhoneCellRenderer).
  • options overrides the object schema's select options (:1840-1842).
  • appearance drives badge styling (:1846-1849).
  • essential decides the mobile hidden sm:table-cell class (:1951).

Census correction to #6004, recorded here

#6004's suggested key list named essential among the keys "ObjectGrid attaches". It does not: essential is read off the input and turned into a className, and it is never emitted. It is also not a ListColumn member. It belongs on this card, not that one.

Suggested disposition (not a decision)

Per key: declare it on ListColumn in @objectstack/spec (if the capability is wanted at the authoring surface), or stop reading it (if the object-schema-level spelling is the intended one). Contract-first says the answer cannot be a renderer-side tolerance either way. Drop the prefix cast regardless.

Related


Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions