Skip to content

Commit d1928d3

Browse files
os-zhuangclaude
andcommitted
docs(releases): v17 升级指南补 objectui#3203 作者破坏性迁移,console 段区间更新到 785b8a5d432c
objectui#3203 从公共 `ActionParam` 移除九个 resolved-only picker 键,对作者 破坏性。迁移处方已进 #4732 的 pin changeset(发布说明的法定输入层),但 RC 期间正在升级的作者读的是文档站 —— 一条只活在 `.changeset/` 里的破坏性迁移 对他们等于不存在。CLAUDE.md 为此留的正门是 dedicated docs-only PR,本 PR 就是那个 PR(PR #4732 的 PM 裁定,选项 B 的第二半)。 两处改动,零代码: 1. `## Breaking changes & migration` 新增一条,紧跟 ADR-0104 D2 的 action param 条目(同一主题):九个键全名、两条处方(内联 picker 目标改 `reference`;其余八个改 field-backed 整组继承)、以及"这不是能力回退" 的理由 —— `ActionParamSchema` 是 `.strict()`,authorable 键表只有 `reference`,别名表点名 `referenceto → reference`,服务端一直硬性 parse 拒绝,只是 `tsc` 放行。 处方逐条与 spec 核对过:`displayField` / `descriptionField` / `lookupColumns` / `lookupFilters` / `lookupPageSize` / `dependsOn` 确为 `FieldSchema` 键(packages/spec/src/data/field.zod.ts),field-backed 参数 由字段元数据继承;`idField` / `titleFormat` 两侧都从来不可作者化 —— 记录标识由 picker 自解,候选标题取被引对象的 `nameField`(ADR-0079)。 这一层精度是 changeset 未展开的,写进文档站是因为错的处方比没有更糟。 2. console 段标题区间 `4a4829d0ef39 → 7d9734d5e321` 更新为 `4a4829d0ef39 → 785b8a5d432c` —— #4732 已合并,`.objectui-sha` 现为 785b8a5d432c,旧区间已失真。 全 diff 只有 `content/docs/releases/v17.mdx` 一个文件。不发版,不 bump 任何 包版本,改动最小化(不重排既有内容、不顺手修别的段落)—— 这个文件是全仓 最热的冲突磁铁。 Fixes #4733 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny
1 parent 072806a commit d1928d3

1 file changed

Lines changed: 38 additions & 1 deletion

File tree

content/docs/releases/v17.mdx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,43 @@ that costs one edited call. The value-shape half of the same ADR went the other
257257
way for the opposite reason: it rejects on the basis of data already at rest,
258258
so it stays gated per deployment (see *Files become platform records* below).
259259

260+
### An action param's picker target is `reference`, and only `reference` (objectui#3203)
261+
262+
`ActionParam` in `@object-ui/types` no longer declares the nine resolved-side
263+
picker keys — `referenceTo`, `displayField`, `idField`, `descriptionField`,
264+
`titleFormat`, `lookupColumns`, `lookupFilters`, `lookupPageSize`, `dependsOn`.
265+
Two rewrites cover everything authored against them:
266+
267+
```diff
268+
- { name: 'account_id', type: 'lookup', referenceTo: 'account' }
269+
+ { name: 'account_id', type: 'lookup', reference: 'account' }
270+
```
271+
272+
- **The inline picker target** — spell it `reference`, as above. It is the only
273+
authorable way to name an inline `lookup` / `master_detail` param's target
274+
object, and `ActionParamSchema` refuses a targetless inline picker at parse
275+
time rather than letting it degrade into a paste-a-UUID text box (#3405).
276+
- **The other eight** — make the param **field-backed** (`{ field: 'account_id' }`)
277+
and the whole picker group is inherited rather than restated: `displayField`,
278+
`descriptionField`, `lookupColumns`, `lookupFilters`, `lookupPageSize` and
279+
`dependsOn` are `FieldSchema` keys, resolved at runtime from the referenced
280+
field's own metadata. `idField` and `titleFormat` were never authorable on
281+
either side — the picker resolves record identity itself, and a candidate's
282+
label comes from the referenced object's `nameField` (ADR-0079).
283+
284+
**This removes a compile-time illusion, not a capability.** None of the nine was
285+
ever storable: `ActionParamSchema` is `.strict()`, its authorable key list
286+
carries `reference` and not `referenceTo`, and its alias table names
287+
`referenceto → reference` by hand (`packages/spec/src/ui/action.zod.ts`) — so an
288+
authored `referenceTo` has always been a hard parse rejection on the server.
289+
Only `tsc` waved it through, against objectui's public type, which moved the
290+
failure from the authoring keystroke out to publish time. `ActionParam` is now
291+
derived from the spec schema (`Omit<z.input<typeof ActionParamSchema>, 'type'>`),
292+
so the authoring type and the parser can no longer disagree about a spelling,
293+
and `resolveActionParams()` names any resolved-only key it still meets in a
294+
dev-mode warning carrying the prescription above — which covers the params
295+
authored in plain JS or JSON, where `tsc` never looks.
296+
260297
### A flow run with no trigger user may not touch data (#3760)
261298

262299
An effective `runAs: 'user'` run that resolved **no trigger user** used to
@@ -1914,7 +1951,7 @@ rc.1, and administrators should know what changed:
19141951
the generated upgrade guide and the `spec_changes` MCP tool actually
19151952
report the 16 → 17 chain (they still said 16.0.0).
19161953

1917-
### New in Console — bundled objectui advanced `4a4829d0ef39 → 7d9734d5e321`
1954+
### New in Console — bundled objectui advanced `4a4829d0ef39 → 785b8a5d432c`
19181955

19191956
143 objectui commits across five pin moves, released as **objectui 17.1.0**.
19201957
(The pin changesets enumerate 79 of them; one range under-enumerated its own

0 commit comments

Comments
 (0)