Skip to content

fix(components,core,plugin-dashboard,plugin-detail): data-table reads the declared header; the producers translate label (#5351) - #5478

Merged
os-support-ai merged 2 commits into
mainfrom
claude/issue-5120-column-identity-unify
Aug 21, 2026
Merged

fix(components,core,plugin-dashboard,plugin-detail): data-table reads the declared header; the producers translate label (#5351)#5478
os-support-ai merged 2 commits into
mainfrom
claude/issue-5120-column-identity-unify

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes#5351
Part of #5120

Deliberately Part of for the second card: one of its two halves is held, and merging must not close it. The census-first fork fired again, on evidence that did not exist when the ruling was recorded. Details in "What is held, and why" below.

The ruling this implements

Ruled: retire the consumer-side alias; unify the producers — the #3951 direction for the whole family. Provenance: maintainer accepted the batch, verbatim: 「其他接受你的建议。」

  1. The data-table adapter reads only the declared accessorKey — the undeclared col.name tolerance at data-table.tsx:777/:786 is removed (and the #3104 ratchet's blind spot noted in the card stops mattering for this line).
  2. All three producers resolve column identity before delivery: RelatedList already does (RelatedList object columns: spec-canonical field spelling passes every RelatedList read, then renders header + blank cells at the data-table accessor #5022); ObjectDataTable's passthrough (normalizeColumns returning object entries untouched, name-first read at :110, never reading field) and ObjectGrid connect to the same columnIdentity resolution.
  3. This ruling is the family direction for the satellites: 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 (fourth site, static table renderer — its docs-vs-types contradiction resolves the same way: the declared header/accessorKey contract wins, schema-reference.md §TableSchema corrects to match) and finding(components): data-table's column normalization also reads an undeclared col.label alias for header — the sibling alias on the same two lines as col.name #5351 (labelheader: the producer maps the spec's ListColumnSchema.label to header at delivery — metadata vocabulary stays out of the adapter). Both return to the queue in the same stroke.

What landed

data-table no longer reads the undeclared col.label. TableColumn declares header: string and does not declare label, so the adapter accepted a spelling its own type refuses — AGENTS.md #0.1, one key with two spellings. The translation moved to the producers, which is where the two vocabularies actually meet.

@object-ui/core gains columnHeader() next to columnIdentity(). It is adapter-firstheader wins over label — which is the opposite order from columnIdentity, on purpose: columnIdentity folds several metadata spellings of one metadata concept so the canonical metadata key wins, while columnHeader crosses between vocabularies, and an author who wrote the adapter's own key addressed the table directly. That is the same rule accessorKey already had.

Producers, per the ruling's list of three:

Census, with its counter-probe

Corpora: examples/ (463), content/docs/ (202), apps/ (203), skills/ (29), e2e/ (30), packages/*/README.md (39) — 966 text files. Method: bracket-matched extraction of every columns: [ ... ], split into top-level entries, each classified by the enclosing node's type.

Counter-probe, through the same method: within the data-table bucket the control terms accessorKey and header return 31 entries each. The search works, so the small name/label count is a reading and not a broken scan.

Enclosing typenamelabelReaches data-table?
data-table44YES — the fork (2 skill guides)
object-data-table00zero authored usages anywhere
table (static renderer)1112no — its own renderer, #5350
object-grid443no — ObjectGrid maps label itself
grid (form field)3034no — form layer, name is its declared key
crud44no renderer registered in this repo
kanban, lookup, list, object-master-detail-form, exportExcelWithFormulaseach its own vocabulary

Two hits needed individual adjudication rather than a bucket:

  • content/docs/api/schema-reference.md:1128 — a detail-viewrelated[] entry of type: 'table', which does reach data-table through RelatedList. Its columns are { name, label }. This is the site that made the RelatedList producer change non-optional.
  • content/docs/core/report-schema.mdx:327type: 'table' inside a report; ReportViewer renders its own HTML table element with col.label || col.name, its own vocabulary. Not this adapter.

Nothing was migrated. content/docs/api/schema-reference.md is #5352's this round and was not touched.

Per-shape matrix, measured before and after

Rendered through the real renderers; headers and body cells read off the DOM.

Directly authored data-table node (no producer) — the only surface where behaviour changes:

authored shapeheader before → aftercells before → after
{accessorKey}""""Won,LostWon,Lost
{name}""""Won,LostWon,Lost (alias held)
{header,accessorKey}StageStageWon,LostWon,Lost
{label,accessorKey}Stage""Won,LostWon,Lost
{field,label}Stage"""","""","" (cells were already blank)
{name,label}Stage""Won,LostWon,Lost

ObjectDataTable — three shapes get better, none get worse:

authored shapeheader before → aftercells
{label,accessorKey}""StageWon,Lost unchanged
{field,label}""StageWon,Lost unchanged
{name,label}""StageWon,Lost unchanged
the other threeunchangedunchanged

That blank header was a real defect and not merely the alias being bypassed: enrich spreads buildFieldMeta's result over every column and that result carries its own label built from col.header, so an authored label was overwritten with undefinedbefore it ever reached the adapter's alias.

ObjectGrid — all six shapes byte-identical before and after. RelatedList — all six shapes byte-identical before and after: the producer translation replaces exactly what the alias did, with no user-visible delta.

Reverse verification, each half separately

No build artifact sits between any edit and the thing under test: the root vitest.config.mts (L254-290) aliases every @object-ui/* specifier to that package's src/. Checked in the config, not assumed.

Leg 1 — the name half ablated (alias restored at both sites).
Predicted red, by name: does not resolve an accessor from name, LEGIBILITY: an unresolvable accessor keeps its header and its neighbour, sizes from the declared keys.
Observed: exactly those 3 red, 20 green. Prediction matched.

Leg 2 — the label half ablated (alias restored at both sites).
Predicted red: does not resolve a header from label, LEGIBILITY: a headerless column still renders its cells and its neighbour. Predicted green: every producer test, because the producers now stamp header themselves.
Observed: exactly those 2 red, 21 green — including all 15 producer tests. The producer half is alias-independent.

Leg 3 — producers reverted to origin/main, adapter left retired.
Predicted red: 2 in the new RelatedList file, 4 in the new ObjectDataTable file, plus the pre-existingRelatedList.columnIdentityAccessor.test.tsx.
Observed: those 6 exactly, and the pre-existing file went red on 4 tests where I predicted 2 — I under-predicted its blast radius; it also pins a mixed-spelling column set and a header-sort ordering. Reported as observed rather than trimmed to fit.

Leg 3 is the load-bearing one. #5120's name half was measured invisible to CI (PR5353: 2122 tests green with both alias sites cut). #5351's label half is the opposite — the existing suite catches it. Retiring col.label without the RelatedList producer change would have gone red on four pre-existing tests, which is why that file could not be left alone.

Tree restored to the committed state after every leg and verified clean.

What is held, and why

accessorKey: col.accessorKey || col.name still stands. It is ready, measured and reverted only for sequencing.

packages/components/src/__tests__/skill-guide-data-table-binding.test.tsx lifts the fenced JSON blocks out of the real guide files at run time and renders them. Two published guides teach a directly authored data-table whose columns are spelled { name, label }:

  • skills/objectui/guides/data-integration.md:212
  • skills/objectui/guides/schema-expressions.md:410

Retiring name turns that gate red on 2 tests. Measured split: with col.label retired and col.name held, that gate is 15/15 green — the label half is invisible to it; only the name half breaks it. So the two cards separate cleanly at exactly this line.

I did not migrate the guides. skills/** is a customer-published instruction corpus with its own CI gate and its own owning seat, my dispatch names it in a do-not-migrate clause, and two sibling cards are editing that corpus this round under their own claims. The remaining step is small and precise — 4 column entries in 2 files — but it is not mine to take unbidden, and the dev report on #5120 recommended it as a docs-only change landing before the runtime retirement, which the maintainer accepted.

The held alias is pinned as still-read, so the day the guides move that pin goes red and names itself as the thing to delete, rather than the retirement quietly never happening.

Scope note: a file outside the dispatch's stated surface

The dispatch fenced the surface to data-table.tsx, ObjectDataTable.tsx, ObjectGrid.tsx and the shared resolution. packages/plugin-detail/src/RelatedList.tsx is edited here anyway, and that is a breach I am flagging rather than burying.

The ruling names three producers and requires each to translate at delivery; RelatedList is one of them, and the ruling's note that it "already does" is true of identity only, not of the label half. Leg 3 measured the consequence: without this 14-line change the PR is a regression that four pre-existing tests catch. The dispatch also asked for the before/after matrix on all three producers, which puts RelatedList in the measured set. No other worktree holds packages/plugin-detail; checked before editing.

Tests

All from the repo root (a package-scoped run uses a different config than CI), at final HEAD2370882 — the same tree this body describes.

  • pnpm exec vitest run packages/core packages/components packages/plugin-dashboard packages/plugin-detail packages/plugin-grid --maxWorkers=2507 files, 5779 tests, all passed
  • type-check on all four touched packages → clean, after building the dependency closure first (the ^... dependency-closure filter); all four scripts echoed by name, guarding the zero-match trap
  • lint on all four → 0 errors (513 / 898 / 342 / 809 pre-existing warnings)
  • Gates derived from the diff: check:control-bytes (4524 files), check:phantom-deps, check:self-import, check:esm-specifiers, check:published-dist → all OK. check:skills-paths, check:doc-types, check:doc-snippets are not triggered: no skills/** or content/docs/** file is in this diff.

No test is skipped, disabled or quarantined.


Generated by Claude Code

… only its declared column keys (#5120, #5351)
The adapter normalized `header: col.header || col.label` and
`accessorKey: col.accessorKey || col.name`. `TableColumn` declares `header`
and `accessorKey` and declares neither alias, so one key had two spellings —
one the type admits, one only the runtime did (AGENTS.md #0.1).
Both aliases retire. The translation moves to the producers, which is where
the two vocabularies actually meet: `columnIdentity` already resolved the
identity half in RelatedList (#5022), ObjectDataTable (#5120/PR5353) and
ObjectGrid (#5068); a new `columnHeader` in `@object-ui/core` does the same
for the display half, adapter-first so an author-supplied `header` is never
overwritten.
ObjectDataTable gains a fix along the way: `enrich` spreads `buildFieldMeta`'s
own `label` over every column, so an authored `label` was overwritten before
it ever reached the alias — a `{ field, label }` column rendered a blank
header there even while the alias existed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
…; the `label` alias retires (#5351)
The `col.name` retirement is measured and ready but cannot land yet:
`skill-guide-data-table-binding.test.tsx` renders the JSON blocks lifted from
skills/objectui/guides/{data-integration,schema-expressions}.md, and both
teach a directly authored `data-table` with `{ name, label }` columns. The
runtime must not refuse a spelling the shipped instruction set still teaches,
and `skills/**` is another seat's surface.
Measured split: with `col.label` retired and `col.name` held, that gate is
15/15 green — the label half is invisible to it. Only the name half breaks it,
on 2 tests.
#5351 therefore lands in full and #5120 keeps its remaining step. The held
alias is pinned as still-read, so the day the guides move that pin goes red
and names itself as the thing to delete.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

MetricValueBudget
Eager closure (gzip, 58 chunks)3790.8 KB3867.2 KB
Main entry chunk (gzip)25.3 KB350 KB
Entry fileindex-CJXXcwXO.js
StatusPASS

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

PackageSizeGzipped
app-shell (index.js)10.04KB3.72KB
app-shell (runtime-config.js)7.42KB2.32KB
app-shell (types.js)0.01KB0.04KB
app-shell (urlParams.js)10.06KB3.86KB
auth (AuthContext.js)0.31KB0.24KB
auth (AuthGuard.js)1.17KB0.53KB
auth (AuthProvider.js)29.34KB7.05KB
auth (AuthShell.js)3.49KB1.40KB
auth (ForgotPasswordForm.js)12.21KB3.45KB
auth (LoginForm.js)18.15KB5.39KB
auth (PreviewBanner.js)0.90KB0.50KB
auth (RegisterForm.js)6.65KB2.22KB
auth (SocialSignInButtons.js)9.61KB3.89KB
auth (UserMenu.js)3.41KB1.23KB
auth (auth-gate-events.js)1.29KB0.66KB
auth (authStyles.js)5.04KB1.72KB
auth (createAuthClient.js)40.21KB10.80KB
auth (createAuthenticatedFetch.js)6.35KB2.43KB
auth (index.js)2.77KB1.22KB
auth (invitation-status.js)1.22KB0.70KB
auth (org-roles.js)6.66KB2.78KB
auth (phone-identifier.js)1.11KB0.66KB
auth (types.js)0.59KB0.35KB
auth (useAuth.js)5.02KB0.89KB
auth (useIsWorkspaceAdmin.js)3.04KB1.45KB
collaboration (CommentThread.js)26.08KB7.56KB
collaboration (LiveCursors.js)3.17KB1.27KB
collaboration (PresenceAvatars.js)6.49KB2.64KB
collaboration (PresenceProvider.js)2.79KB1.13KB
collaboration (index.js)1.68KB0.73KB
collaboration (useCollaborationTranslation.js)6.05KB2.52KB
collaboration (useCommentSearch.js)1.98KB0.88KB
collaboration (useConflictResolution.js)7.75KB1.86KB
collaboration (useMentionNotifications.js)1.81KB0.68KB
collaboration (usePresence.js)6.33KB1.84KB
collaboration (useRealtimeSubscription.js)7.91KB2.01KB
components (index.js)506.94KB113.63KB
core (index.js)4.11KB1.62KB
create-plugin (index.js)10.08KB3.26KB
data-objectstack (index.js)159.80KB44.34KB
fields (index.js)237.21KB59.50KB
i18n (LocalizationContext.js)1.76KB0.96KB
i18n (currency.js)1.22KB0.64KB
i18n (i18n.js)4.28KB1.75KB
i18n (index.js)3.44KB1.39KB
i18n (pickLocalized.js)7.22KB3.08KB
i18n (provider.js)23.13KB7.63KB
i18n (useDisplayLocale.js)2.85KB1.45KB
i18n (useObjectLabel.js)30.51KB7.57KB
i18n (useSafeTranslation.js)7.77KB3.13KB
layout (index.js)38.95KB10.97KB
mobile (MobileProvider.js)0.92KB0.49KB
mobile (ResponsiveContainer.js)0.94KB0.38KB
mobile (breakpoints.js)1.51KB0.70KB
mobile (createOfflineDataSource.js)5.61KB1.75KB
mobile (index.js)1.55KB0.62KB
mobile (offlineQueue.js)3.91KB1.35KB
mobile (pwa.js)0.97KB0.49KB
mobile (serviceWorker.js)1.48KB0.62KB
mobile (serviceWorkerSource.js)3.41KB1.48KB
mobile (useBreakpoint.js)1.54KB0.65KB
mobile (useGesture.js)6.96KB1.98KB
mobile (useOfflineSync.js)1.99KB0.72KB
mobile (usePullToRefresh.js)2.53KB0.85KB
mobile (useResponsive.js)0.72KB0.42KB
mobile (useResponsiveConfig.js)1.37KB0.63KB
mobile (useSpecGesture.js)4.32KB1.64KB
mobile (useTouchTarget.js)1.01KB0.54KB
permissions (MePermissionsProvider.js)9.35KB3.31KB
permissions (PermissionContext.js)0.31KB0.25KB
permissions (PermissionGuard.js)0.89KB0.45KB
permissions (PermissionProvider.js)4.42KB1.42KB
permissions (evaluator.js)5.12KB1.74KB
permissions (index.js)0.93KB0.41KB
permissions (store.js)0.91KB0.42KB
permissions (useFieldPermissions.js)1.28KB0.53KB
permissions (usePermissions.js)1.81KB0.83KB
plugin-ai (index.js)15.75KB3.80KB
plugin-calendar (index.js)46.62KB12.83KB
plugin-charts (index.js)64.75KB18.37KB
plugin-chatbot (index.js)181.21KB43.14KB
plugin-dashboard (index.js)128.51KB32.94KB
plugin-designer (index.js)212.39KB42.83KB
plugin-detail (index.js)242.15KB60.89KB
plugin-editor (index.js)2.46KB1.10KB
plugin-form (index.js)124.40KB30.26KB
plugin-gantt (index.js)164.10KB39.87KB
plugin-grid (index.js)200.75KB54.24KB
plugin-kanban (index.js)52.93KB14.60KB
plugin-list (index.js)111.64KB27.13KB
plugin-map (index.js)20.08KB6.62KB
plugin-markdown (index.js)13.72KB4.69KB
plugin-report (index.js)43.49KB11.93KB
plugin-timeline (index.js)26.68KB7.66KB
plugin-tree (index.js)8.50KB2.88KB
plugin-view (index.js)84.52KB20.67KB
providers (DataSourceProvider.js)0.75KB0.39KB
providers (MetadataProvider.js)1.37KB0.59KB
providers (ThemeProvider.js)1.90KB0.85KB
providers (UploadProvider.js)11.66KB3.50KB
providers (index.js)0.45KB0.23KB
providers (types.js)0.01KB0.04KB
react-runtime (index.js)5.62KB2.34KB
react (LazyPluginLoader.js)3.77KB1.33KB
react (SchemaRenderer.js)36.10KB12.26KB
react (data-invalidation.js)5.05KB2.08KB
react (index.js)1.33KB0.69KB
react (schema-input.js)1.45KB0.83KB
react (spec-input.js)0.20KB0.18KB
sdui-parser (codegen.js)5.41KB2.34KB
sdui-parser (index.js)4.77KB2.16KB
sdui-parser (input-type.js)2.84KB1.40KB
sdui-parser (parse.js)10.76KB3.17KB
sdui-parser (provenance.js)3.66KB1.82KB
sdui-parser (types.js)0.29KB0.24KB
sdui-parser (validate.js)6.92KB2.40KB
types (ai.js)0.20KB0.17KB
types (api-types.js)0.20KB0.18KB
types (app.js)2.87KB0.99KB
types (base.js)0.20KB0.18KB
types (blocks.js)0.20KB0.18KB
types (complex.js)0.20KB0.18KB
types (crud.js)0.20KB0.18KB
types (dashboard-filter-alias.js)6.23KB2.74KB
types (data-display.js)0.20KB0.18KB
types (data-protocol.js)0.20KB0.19KB
types (data.js)0.20KB0.18KB
types (designer.js)1.87KB0.85KB
types (disclosure.js)0.20KB0.18KB
types (error-code.js)1.54KB0.88KB
types (feedback.js)0.20KB0.18KB
types (field-types.js)0.20KB0.18KB
types (form.js)0.20KB0.18KB
types (http-retry.js)4.32KB2.02KB
types (index.js)3.08KB1.53KB
types (layout.js)0.20KB0.18KB
types (managed-by.js)0.19KB0.18KB
types (mobile.js)2.59KB1.31KB
types (navigation.js)0.20KB0.18KB
types (objectql.js)0.20KB0.18KB
types (overlay.js)0.20KB0.18KB
types (permissions.js)0.20KB0.18KB
types (plugin-scope.js)0.20KB0.18KB
types (record-components.js)0.20KB0.19KB
types (record-semantics.js)1.28KB0.67KB
types (registry.js)0.20KB0.18KB
types (reports.js)0.20KB0.18KB
types (spec-report.js)5.05KB1.93KB
types (system-fields.js)3.33KB1.54KB
types (theme.js)0.20KB0.18KB
types (ui-action.js)3.40KB1.71KB
types (views.js)0.20KB0.18KB
types (widget.js)0.20KB0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

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

Projects

None yet

2 participants

@os-support-ai@claude