Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[决策] 文档站 demo 注册路径 registerFields 的收敛形态:A 下沉到 apps/site / B 改表单托管 / C 保持现状 #3798

Closed

Description

@yinlianghui

来自 #3308 / PR #3793 的执行残留决策(objectui 分片 PM 代立,session_01GTRjn8xBqp75dk7kFupVRt)。#3308 裁决第 2 条「收敛废弃的 registerFields(),让注册只剩一条路」的前提在实施中被证伪,终局形态需要维护者拍板。

一句话要拍板的

packages/fields 的 registerFields() + createFieldRenderer()(文档站 demo 注册路径)最终归宿选哪个?

前提证伪的实测(PR #3793 报告在案)

registerFields() 不是废弃的重复注册路径,而是文档站的 demo host adapter:它给每个 widget 合成 label/description 与本地 useState + onChange;活路径 registerAllFields() 注册的是裸控件(withFieldCarrier(lazy(widget))),而 FieldWidgetComponentProps.onChange 必填且 widget 无保护调用。文档站 InteractiveDemo 只渲染 SchemaRenderer 不传 value/onChange —— 一次性 probe 实证:直切活路径后 demo 输入框失灵,每击键一条 TypeError: onChange is not a function,受影响约 content/docs/fields/ 26 页中 24 类。

选项(dev 两轴分析,PR #3793 报告原文)

  • A. demo adapter 下沉到 apps/site —— 从 @object-ui/fields 删 registerFields + createFieldRenderer,文档站自持包装器。库侧只剩一条路,文档不坏,改动小。但它把「文档 demo 与真实渲染不一致」这个二元契约原样保留,只换持有者 —— 下一轮 enforce-or-remove 审计还会在同一处绊倒。
  • B. catalog 例子改表单托管({ type: 'form', fields: [...] }),两个包装器都删 —— 文档从此展示真实应用的渲染结果(真表单渲染器拥有 label 与状态)。代价:约 60 个 catalog JSON + 26 个文档页重验,改变文档教什么。dev 荐 B:模型读现文档看到裸字段节点渲染成带 label 的输入框,会照着生成真实应用里既无 label 也无 onChange 的裸节点 —— 文档正在充当错误权威,与 capability-multiselect widget 在实际注册路径上根本不存在 —— 代码注释却说它可从记录表单用 #3308 那条注释同类;B 让文档只能展示真实可行的写法。
  • C. 保持现状,只把声明改对 —— 已由 PR fix(fields): 退役 capability-multiselect widget 名 —— 删注册面与最后一个 hint 消费方,组件保留 (#3308) #3793 落地(误导性 @deprecated JSDoc 改为如实说明),作为 A/B 落地前的安全垫。最省,但两路并存继续长漂移。

现状

Refs: #3308(裁决单)、PR #3793(实测与两轴分析)、ADR-0049 enforce-or-remove、ADR-0056 P1/P2。

Activity

  1. yinlianghui commented on Aug 9, 2026

    @yinlianghui
    ContributorAuthor

    ⚖️ PM 裁决(维护者已授权 PM 代裁契约机械类决策,session session_01GTRjn8xBqp75dk7kFupVRt):选 B(catalog 例子改表单托管,两个包装器都删)

    裁决依据 —— 这不是新方向,是 #3308 既有裁决意图的忠实执行:

    实施安排:~60 catalog JSON + 26 文档页重验,独立批次单开实施单(见关联),排在 #3240 空批次之后;落地时从 @object-ui/fields 删 registerFields + createFieldRenderer(enforce-or-remove 的 remove 侧,ADR-0049)。维护者若对「改变文档教什么」有保留,实施单派发前可一句话叫停。

    本单决策已做,关闭;实施单接力。


    Generated by Claude Code

  2. os-project-manager commented on Aug 9, 2026

    @os-project-manager
    Collaborator

    Maintainer confirmation (2026-08-09): ruling B stands — card closes.

    The 2026-08-09T01:49Z delegated ruling (B: catalog examples move to form hosting, both wrappers — registerFields + createFieldRenderer — deleted from @object-ui/fields) is confirmed by the maintainer directly this round; the stop-window that ruling left open is hereby answered in the affirmative. Rationale as recorded there: docs are the first-hand transcription source for AI authors, and B is the only option that makes them able to show exclusively real, working write-ups — A relocates the dual contract, C preserves it (already landed as the safety net, PR #3793).

    Implementation proceeds as that ruling arranged: a standalone batch card (~60 catalog JSON + 26 doc pages re-verified), sequenced by the objectui shard PM. This decision card closes as completed.

    Maintainer directive (verbatim, covering all 25 decision-inbox cards this round): 「全部接受」. Recorded by PM session session_01LGRN2cSRfggfX9B2L83bQc.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions