Skip to content

finding(components): data-table reads two column keys TableColumn does not declare — headerIcon and fitContent #6424

Description

@claude

Found while implementing #6373 (typing ObjectDataTable's column emit against the TableColumn[] slot it fills). Filed unassigned. Deliberately NOT absorbed into #6373, whose fence is what a PRODUCER writes; this is the same slot seen from the other end.

Measured (at 9602dc820)

packages/components/src/renderers/complex/data-table.tsx, comments stripped, every col.<key> read:

keyreadsdeclared by TableColumn?
accessorKey28yes
width6yes
align5yes
header4yes
className4yes
sortable3yes
editable3yes
cell2yes
cellClassName / resizable / type1 eachyes
name2no — the alias #5120 holds, deliberately and documented
headerIcon2no
fitContent4no

TableColumn (packages/types/src/data-display.ts:293) declares exactly: header, accessorKey, className, cellClassName, width, minWidth, align, fixed, type, sortable, filterable, resizable, editable, cell.

Both undeclared reads are live, not vestigial:

Why it matters

An author writing { accessorKey: 'x', headerIcon: <Icon/> } on a data-table column gets a compile error for a key the renderer honours, and TableColumnSchema.parse silently strips it — while the same key placed there by an untyped producer works. So the runtime admits a vocabulary the declaration refuses: the second de-facto contract AGENTS.md #0.1 forbids, in the direction where the CONSUMER is the one out of step.

Not a duplicate

Suggested disposition

Apply the rule #6373's PR states, in the declare branch this time: a key the consumer reads gets declared on TableColumn (interface + TableColumnSchema mirror + the zod-mirror-parity pairing), and the as any at the two fitContent sites goes with it. The alternative — retiring the reads — is a behaviour change and needs the usual measurement of who authors these keys today.

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