Skip to content

finding(plugin-dashboard): ObjectDataTable's enrich() spreads a FieldMeta into the TableColumn[] slot, writing seven keys TableColumn does not declare #6373

Description

@claude

Found while implementing #5853 (folding column-inference values onto the declared TableColumn.type vocabulary at each producer's emit seam). Filed unassigned; deliberately NOT absorbed into #5853, whose fence is the type key's VALUE set.

Measured (at e4559d1e0)

#6004 records that ObjectGrid.generateColumns() is untyped, so nothing type-checks what it writes into the strictly-typed DataTableSchema.columns: TableColumn[] slot. There is a second producer with the same hole, and #6004 names only the first.

packages/plugin-dashboard/src/ObjectDataTable.tsxenrich() returns:

return{ ...col, ...fieldMeta,align: inferredAlign, cell };

fieldMeta is a FieldMeta built by buildFieldMeta (recordFields.tsx:145-155), whose members are name, label, type, options, referenceTo, format, currency, decimals. Spreading it writes seven keys TableColumn does not declare into a TableColumn slot: label, options, referenceTo, format, currency, decimals (and name, which is the held alias #5120 covers).

It is invisible to tsc for the same structural reason as #6004: NormalizedColumn carries [key: string]: any, and the array is handed to data-table without ever being checked against TableColumn[].

Why it matters

Same class as #5453 (a wrap key forwarded that nothing reads) and #6004, from the producer side. declared != enforced in the direction where the producer writes more than the type admits: the keys are inert unless the renderer happens to read them, and nothing signals which. #5853 fixed one key's VALUE divergence at this exact seam and had to establish by hand that these other keys were out of its scope — the next such card will have to do the same until the boundary is typed.

Suggested disposition

This is #6004's remedy applied to the second producer, hence filed as its sub-issue: type the producer's output boundary (annotate the return as TableColumn[]), then triage each undeclared key it surfaces as declare / retire / hold-as-alias. type is already handled — #5853 folds it at this seam.

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