Skip to content

owner survives as a live field-type in ~13 more code faces after #4814's retirement — including a published Zod enum that still accepts it #4914

Description

@os-steve

Measured while implementing #4814 (ruling A′ — retirement of the owner widget alias). Filed unassigned, out of that card's scope; recording it rather than widening the ruled batch into 8 packages.

What the A′ ruling scoped vs. what is actually there

The A′ ruling (comment 5310924344) scoped "all three code consumers" plus the fourth face app-shell/src/utils/paramToField.ts, working from the fork report's map (comment 5308145625). That map was built by sweeping for field:owner and widget-registration usages. Re-sweeping on the implementation branch for owner in the field-type namespace (i.e. type === 'owner' predicate branches, not the field nameowner) finds substantially more.

PR for #4814 retired these five: field-type-alias.ts, index.tsx (widget map + cell renderer), plugin-grid/bulkParamToField.ts, app-shell/paramToField.ts, and app-shell/paramValueShape.ts (that last one surfaced only because its own drift guard turned red).

All of the following were present at the fork report's own base commit 1ef236e18 — verified with git show 1ef236e18:path. They are pre-existing faces the sweep did not reach, not consumers that appeared since.

Residual faces

Published contract surfaces (these are the ones that matter):

  1. packages/types/src/zod/reports.zod.ts:49 — a runtime Zod enum for ReportFieldSchema.type that still lists 'owner' as legal. After owner widget 拿不到表单下发的 dataSource,而 plugin-grid 认为它需要 —— 且 owner 根本不在 spec 的 FieldType 里(enforce-or-remove 待判) #4814 this is a published validator blessing a spelling the renderer now refuses.
  2. packages/types/src/reports.ts:105 — the TS twin of the above.
  3. packages/types/src/field-types.ts:584UserFieldMetadata.type: 'user' | 'owner', i.e. published .d.ts autocomplete still offers owner.

Note #4814 shrank the three doc unions (content/docs/fields/user.mdx, filter-builder.mdx:27, report-schema.mdx:99) as ruled. Items 1-3 are the code twins of those exact docs, so the repo currently has docs and code disagreeing in the opposite direction from before.

Predicate branches that treat owner as a lookup-like/user-like type (dead rather than broken after the retirement, but each is a drift channel of the kind the ruling exists to close):

  1. packages/components/src/custom/filter-builder.tsx:707,982,1442
  2. packages/plugin-detail/src/InlineFieldInput.tsx:107,290
  3. packages/plugin-detail/src/synth/buildDefaultPageSchema.ts:433
  4. packages/plugin-view/src/config/view-config-utils.ts:133
  5. packages/plugin-dashboard/src/ObjectDataTable.tsx:102
  6. packages/plugin-dashboard/src/recordFields.tsx:34
  7. packages/plugin-list/src/UserFilters.tsx:49,505
  8. packages/fields/src/FieldEditWidget.tsx:170

Test fixtures still spelling it:

  1. packages/plugin-list/src/__tests__/list-offered-operator-expressible-parity.test.ts:100
  2. packages/plugin-detail/src/__tests__/inlineEditTypeCoverage.test.tsx:234
  3. packages/components/src/__tests__/filter-builder-field-switch-value.test.tsx:451
  4. packages/fields/src/FieldEditWidget.test.ts:74

None of 4-15 turn red from #4814 — they were all green on the implementation branch, which is precisely why they need filing rather than discovering later.

Why this was not folded into #4814

Three reasons, offered for triage rather than as a settled call:

  • it spans 8 packages well outside that card's claimed file surface, with in-flight-agent collision risk that was never checked for those files;
  • the ruled batch is coherent and strictly-better on its own: the retired spelling now fails loudly, so the residual faces are surfaced by the tombstone rather than hidden by it;
  • items 1-3 in particular are a contract decision (does @object-ui/types mirror @objectstack/spec's closed FieldType?), which overlaps Unify hand-written @object-ui/types zod with @objectstack/spec/ui (ListViewSchema drift) #2231 and is not an implementer's call.

Suggested disposition

Items 1-3 look worth doing promptly and together — a published runtime validator that accepts a spelling the renderer refuses is exactly the declared-but-unenforced shape ADR-0049 targets. Items 4-15 are mechanical dead-branch cleanup and could ride one follow-up PR.

Related: #4814 (this measurement's origin), #4855 (the coverage-guard gap — its premise should be re-read against #4814's landed state, since that PR removed owner from CELL_RENDERER_TYPES while the form half still omits user), #2231 (types/spec zod unification).


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 seatpm:queue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions