Skip to content

finding(plugin-dashboard): ObjectDataTable honours five undeclared authored column keys as field-meta overrides #6425

Description

@claude

Found while implementing #6373 (retiring the six FieldMeta keys ObjectDataTable.enrich()wrote into the TableColumn[] slot). Filed unassigned. #6373's fence is the WRITE; this is the same seam's READ, and it is a different adjudication — retiring an inert write costs nothing, while these keys are load-bearing.

Measured (at 9602dc820)

packages/plugin-dashboard/src/ObjectDataTable.tsx, inside enrich(), the overrides handed to buildFieldMeta:

overrides: {type: col.type,format: col.format,options: col.options,referenceTo: (colasany).referenceTo,currency: (colasany).currency,decimals: (colasany).decimals,},

Five of those six keys — format, options, referenceTo, currency, decimals — are read off the AUTHORED column and are declared by neither TableColumn (packages/types/src/data-display.ts:293) nor its TableColumnSchema mirror. Three are reached through (col as any), which is the same "declared != enforced" tell #5853 removed for type.

This is not a dormant limb. packages/plugin-dashboard/src/__tests__/ObjectDataTable.cells.test.tsx exercises it directly:

constschema: any={type: 'object-data-table',objectName: 'opportunity',columns: [{header: 'Amount',accessorKey: 'amount',format: '$0,0'},{header: 'Probability',accessorKey: 'probability',format: '0%'},],};

and asserts $150,000 / 60% render. Note the : any on the schema — that annotation is what lets the undeclared key past tsc in the test itself.

Why it matters

The widget honours an authoring vocabulary the published types refuse. A TypeScript author who writes the tested spelling gets a compile error; TableColumnSchema.parse strips the key without a word; and a JSON author gets working behaviour that no declaration promises and no validator protects — so a typo (decimal for decimals, precision for scale) is silently inert rather than a loud parse failure. That lenient face is precisely where AI-authored metadata errors hide and spread.

Suggested disposition

Declare-or-retire per ADR-0049, adjudicated per key rather than as a batch, using the rule stated in #6373's PR body — with the direction reversed, because unlike the six retired writes these five have a real consumer:

  • Declare the ones with a genuine authoring story (format is tested and documented behaviour) on TableColumn + the zod mirror, dropping the as any.
  • Retire any that only ever mattered as a schema-derived value, in which case the object schema is the single source and the column-level override goes.

Sizing note: this touches the published @object-ui/types surface and needs the zod-mirror-parity pairing plus a changeset, so it is not a one-line annotation.

Related


Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatneeds-user-decision

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions