From d1928d3845f71d475c8438684e6d5df81b1a7a7c Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Mon, 3 Aug 2026 01:24:45 +0000 Subject: [PATCH] =?UTF-8?q?docs(releases):=20v17=20=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E6=8C=87=E5=8D=97=E8=A1=A5=20objectui#3203=20=E4=BD=9C?= =?UTF-8?q?=E8=80=85=E7=A0=B4=E5=9D=8F=E6=80=A7=E8=BF=81=E7=A7=BB,console?= =?UTF-8?q?=20=E6=AE=B5=E5=8C=BA=E9=97=B4=E6=9B=B4=E6=96=B0=E5=88=B0=20785?= =?UTF-8?q?b8a5d432c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny --- content/docs/releases/v17.mdx | 39 ++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/content/docs/releases/v17.mdx b/content/docs/releases/v17.mdx index 1f8716560b..28456a0f25 100644 --- a/content/docs/releases/v17.mdx +++ b/content/docs/releases/v17.mdx @@ -257,6 +257,43 @@ that costs one edited call. The value-shape half of the same ADR went the other way for the opposite reason: it rejects on the basis of data already at rest, so it stays gated per deployment (see *Files become platform records* below). +### An action param's picker target is `reference`, and only `reference` (objectui#3203) + +`ActionParam` in `@object-ui/types` no longer declares the nine resolved-side +picker keys — `referenceTo`, `displayField`, `idField`, `descriptionField`, +`titleFormat`, `lookupColumns`, `lookupFilters`, `lookupPageSize`, `dependsOn`. +Two rewrites cover everything authored against them: + +```diff +- { name: 'account_id', type: 'lookup', referenceTo: 'account' } ++ { name: 'account_id', type: 'lookup', reference: 'account' } +``` + +- **The inline picker target** — spell it `reference`, as above. It is the only + authorable way to name an inline `lookup` / `master_detail` param's target + object, and `ActionParamSchema` refuses a targetless inline picker at parse + time rather than letting it degrade into a paste-a-UUID text box (#3405). +- **The other eight** — make the param **field-backed** (`{ field: 'account_id' }`) + and the whole picker group is inherited rather than restated: `displayField`, + `descriptionField`, `lookupColumns`, `lookupFilters`, `lookupPageSize` and + `dependsOn` are `FieldSchema` keys, resolved at runtime from the referenced + field's own metadata. `idField` and `titleFormat` were never authorable on + either side — the picker resolves record identity itself, and a candidate's + label comes from the referenced object's `nameField` (ADR-0079). + +**This removes a compile-time illusion, not a capability.** None of the nine was +ever storable: `ActionParamSchema` is `.strict()`, its authorable key list +carries `reference` and not `referenceTo`, and its alias table names +`referenceto → reference` by hand (`packages/spec/src/ui/action.zod.ts`) — so an +authored `referenceTo` has always been a hard parse rejection on the server. +Only `tsc` waved it through, against objectui's public type, which moved the +failure from the authoring keystroke out to publish time. `ActionParam` is now +derived from the spec schema (`Omit, 'type'>`), +so the authoring type and the parser can no longer disagree about a spelling, +and `resolveActionParams()` names any resolved-only key it still meets in a +dev-mode warning carrying the prescription above — which covers the params +authored in plain JS or JSON, where `tsc` never looks. + ### A flow run with no trigger user may not touch data (#3760) An effective `runAs: 'user'` run that resolved **no trigger user** used to @@ -1914,7 +1951,7 @@ rc.1, and administrators should know what changed: the generated upgrade guide and the `spec_changes` MCP tool actually report the 16 → 17 chain (they still said 16.0.0). -### New in Console — bundled objectui advanced `4a4829d0ef39 → 7d9734d5e321` +### New in Console — bundled objectui advanced `4a4829d0ef39 → 785b8a5d432c` 143 objectui commits across five pin moves, released as **objectui 17.1.0**. (The pin changesets enumerate 79 of them; one range under-enumerated its own