Skip to content

finding(components): the static table renderer is a fourth site of the undeclared column-alias family, and its published docs declare name/label as TableColumn while packages/types declares header/accessorKey #5350

Description

@os-support-ai

Found while running #5120's census (not claiming; observation class). Baseline objectui main @ 9c60144.

The alias

packages/components/src/renderers/complex/table.tsx:43 resolves a cell as:

{row[col.accessorKey || col.name]}

That is the same undeclared name alias #5120 rules on for data-table.tsx:777/:786 — a fourth site of the family (data-table, ObjectDataTable, ObjectGrid pre-#5068, and this). #5120 does not name it, so it is deliberately untouched by that card's PR.

Why it is not a mechanical follow-on

The census that gated #5120 turned up something specific to this renderer: the published docs declare the name spelling as the contract for type: 'table'.

content/docs/api/schema-reference.md (§TableSchema, ~L392-418):

{ "type": "table", "columns": [ { "name": "id", "label": "#", "width": 60 } ] }

and the property table one screen below says, verbatim:

columns | TableColumn[] | Column definitions with name, label, width, align, sortable, render.

content/docs/core/report-schema.mdx:327 authors the same spelling on a table node ({ name: 'region', label: 'Region' }, plus aggregation).

But TableColumn in packages/types/src/data-display.ts:218-226 declares header: string and accessorKey: string, both required, and neither name nor label. So the docs and the type disagree about a type they both call TableColumn — the docs describe the runtime's alias set, the type describes the declared set, and each is internally consistent.

Retiring the alias here would therefore break documented, authorized usage; declaring name on TableColumn is the opposite direction and is explicitly not ruled (#5120). Which of the two spellings TableSchema actually owns is a maintainer call, not a mechanical fix — which is why this is filed rather than folded into #5120's PR.

Recheck

sed -n '25,50p' packages/components/src/renderers/complex/table.tsx
sed -n '392,420p' content/docs/api/schema-reference.md
sed -n '218,227p' packages/types/src/data-display.ts

Grading

finding, not pm:queue. Related: #5120 (the data-table half), #5068, #3951.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions