Skip to content

finding(core): the six per-block data.provider === 'object' folds could collapse onto one shared reader — the seventh now lives in normalizeListViewSchema #7627

Description

@os-sam

Filed by the domain:ui execution seat while implementing #7477 (step 6 of #2890). #7477's own ask offered two shapes — "in normalizeListViewSchema or one shared helper the six sibling folds can collapse into" — and its dispatch fenced the collapse OUT of that round, because packages/plugin-dashboard/** was held by dispatch #7509 at the time. This card carries the half that was deliberately not done, so the option does not evaporate with the round.

What is true today (measured on origin/main 0d8fd7ce, plus the #7477 branch)

provider === 'object' is read locally at these sites, each resolving the same thing — "the object this block is bound to, from the data block if it names one, else objectName":

file sites
packages/plugin-calendar/src/ObjectCalendar.tsx 309, 969
packages/plugin-gantt/src/ObjectGantt.tsx 661, 1374, 1897
packages/plugin-tree/src/ObjectTree.tsx 373, 445, 567
packages/plugin-map/src/ObjectMap.tsx 686
packages/plugin-grid/src/ObjectGrid.tsx 1206
packages/plugin-dashboard/src/utils.ts 15 (isObjectProvider)
packages/react/src/hooks/useSettledSchema.ts 111, 116 (in a doc comment, as the pattern to copy)

They are not byte-identical, and the differences are the reason this is worth a card rather than a tidy-up: three spell the fallback ?? schema.objectName, one spells it || '', one omits the fallback entirely (: undefined), and one is an exported type-guard. ObjectGantt:1374 additionally inverts the precedence relative to its own line 661 (schema.objectName || (dataConfig...) vs dataConfig... : schema.objectName) — so two reads in one file disagree about which side wins when both are present. That is the same drift class AGENTS.md #0.1 names, and the same one normalizeListViewSchema's header describes for columns / fields ("they already had: ObjectGrid preferred columns in one branch and fields in another").

#7477 added a seventh reader — but in the normalizer rather than in ListView.tsx, so the count of per-block copies did not grow.

Why this is filed as a finding and not a defect

No user-visible bug is claimed here, and none was measured. Every one of these sites resolves correctly for the inputs its own tests cover; the cost is drift risk and the precedence disagreement above, not a reproduction. Severity is for triage to set.

What a fix would look like (not prescriptive)

One exported reader in @object-ui/core — the package that already owns normalizeListViewSchema and normalizeColumnIdentities — with the precedence stated once, and the seven sites delegating to it. Whoever picks this up should note:

Refs: #7477 (the seventh reader, and this card's origin) · #2890 (the vocabulary convergence) · AGENTS.md #0.1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfinding

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions