Skip to content

ObjectView forwards table.columns on the grid path only — kanban/gallery/calendar and the delegated renderer read table.fields alone, so a canonical table: { columns: [...] } yields an empty field list #5269

Description

@os-support-ai

Found while implementing #5102 (canonical table key forwarding). Filed unassigned, not claiming. Deliberately NOT fixed in that PR — the #5102 maintainer ruling names exactly four keys (pagination / selection / filter / sort), and columns is not among them. Recorded here so the measurement is not lost.

This is the fact first measured on #5102's third comment (then against origin/main @ 405d54e4d); re-verified on origin/main @ bc2922a82, still present, and the sweep found a third read point the original note did not list.

The three table field-list read points

packages/plugin-view/src/ObjectView.tsx:

linepathreads
:842generateViewSchemabaseProps — non-grid (kanban / gallery / calendar / timeline / gantt / map)schema.table?.fields only
:1056 / :1057gridSchema — grid pathschema.table?.fieldsandschema.table?.columns
:1247delegated renderListView (list-view schema)schema.table?.fields only
:842 fields: currentNamedViewConfig?.columns || activeView?.columns || schema.table?.fields,
:1057 columns: currentNamedViewConfig?.columns || activeView?.columns || schema.table?.columns,
:1247 columns: currentNamedViewConfig?.columns || activeView?.columns || schema.table?.fields,

So schema.table?.columns has exactly one read point in the file, and it is the grid one.

Consequence

An author who writes defaultViewType: 'kanban' with table: { columns: [...] } gets an empty field list. The same table block under defaultViewType: 'grid' works. The first two segments of both chains (listViews entry, then activeView) are columns-keyed on every path — only the table segment disagrees — so the symptom appears only when an author skips named views and writes table directly.

columns is the canonical spelling and fields is the @deprecated one (ObjectGridSchema.fields: "@deprecated Use columns instead"). So this is the same user-visible shape as #5102 — the canonical key is inert — but a different mechanism: not "the whitelist only knows legacy spellings" (the grid path forwards columns fine), but "the whitelist is inconsistent between two rendering paths".

Suggested fix

One line per site, in the same shape #5102 used for its four keys — canonical first, deprecated key kept as a working alias:

- fields: currentNamedViewConfig?.columns || activeView?.columns || schema.table?.fields,
+ fields: currentNamedViewConfig?.columns || activeView?.columns || schema.table?.columns || schema.table?.fields,

applied at :842 and at :1247. Whoever takes this should check the ⛔ #region object-view HOST-COMPOSITION SURFACE fence around :1247src/__tests__/objectViewHostSurface.test.tsx re-derives the read set from between those markers, though it matches (schema as any).K casts only, which this edit does not add.

Separability from #5102

Confirmed separable: #5102's PR never touched :842 or :1247's fields: line and did not rewrite baseProps, so no fork arose.

Dedup

Searched open issues (table.columns, generateViewSchema, kanban empty field list, plus the file path). Nothing on this. Related: #5102 (the four canonical keys, ruled and implemented), #2890 (ListView columns vocabulary migration).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions