Skip to content

test(showcase): specimens for the inline picker and the record-backed approvers (#3405, #3508) - #3970

Merged
os-zhuang merged 3 commits into
mainfrom
claude/action-param-inline-lookup-5e7as6
Jul 30, 2026
Merged

test(showcase): specimens for the inline picker and the record-backed approvers (#3405, #3508)#3970
os-zhuang merged 3 commits into
mainfrom
claude/action-param-inline-lookup-5e7as6

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

#3405#3508 的平台修复都已合并并随 @objectstack/spec@17.0.0-rc.0 发布,但两边验收各剩最后一条「真机逐一验证」,而 showcase 对这两种形状都没有标本 —— 控件回归了也没人会发现。

改动

#3405 —— p_assignee,指向 sys_user 的内联 lookup

gallery 已有一个指向应用自有对象的内联 picker(p_accountshowcase_account)。但报障的形状(PLAT-DEF-005:点【指派】要选质检员,拿到的是要求粘 UUID 的文本框)是指向系统对象的 picker,而「人」恰恰是人类最无法凭 id 辨认的引用 —— 本机 sys_user 的 id 就是 dvgfa2883S1Ht7Q01q4zJ0vOvI6V6sXI 这种 32 位不透明串。这值得单独一个标本,而不是搭在 account 那个上。

#3508 —— showcase_approver_bindings,每种记录型 approver 一个审批节点

现有流程里 position 覆盖得很密,dynamic-approval 覆盖 org_membership_level + expression;而 user / team / department / manager / field 一个标本都没有 —— 这正是设计器 Value 控件能悄悄回归的原因。queue 故意不含:#3536 已把它移出可授权枚举。

为什么是 draft

这是刻意的,不是漏了。记录型 approver 指向的行在全新启动时并不存在:sys_team 没有种子(种子里的 Team 是 DEMO 对象 showcase_team),而单位成员关系与岗位分配按设计都是运行时管理动作(见 src/data/seed/index.ts 的种子注释)。一个 active 流程压在它们上面会解析到「没有人」—— 那恰恰是 #3508 要消灭的静默死槽,当作 demo 发出去等于把这个 bug 再教一遍。draft 让它不进运行时,但仍能在设计器里打开,而设计器才是被测面。

真机验证

showcase :5411(自有端口 + 自有 DB)+ objectui HEAD 的 console dev :5412(/_console 是 vendored 旧构建,验 objectui 改动必须用它自己的 dev server)。

#3405

  • 服务端两个内联 picker 参数都带上了 reference:p_accountshowcase_accountp_assigneesys_user
  • 动作参数弹窗里 Assignee 渲染成可搜索 picker;输入「Dev」发出 GET /api/v1/data/sys_user?top=50&search=Dev,下拉给出 Dev Admin / admin@objectos.ai(名字 + 邮箱副标题,people-picker 形状)
  • 全程零 ActionParamDialog 降级告警 —— 没有任何参数掉回 UUID 文本框

#3508 —— 逐类型扫过设计器,数据契约取自发布的 xRef.sources:

Type 控件 实测
user 记录 picker GET /api/v1/data/sys_user?top=25
team 记录 picker sys_team?top=50(0 行,sys_team 无种子 —— 控件仍是 picker)
department 记录 picker sys_business_unit?top=50,列出真实种子组织树:Acme Corporation / Field Operations / West Coast / East Coast / HQ Finance
position 记录 picker 见下方遗留项
manager 禁用输入 + 「Resolved automatically」 ✅ 无自由文本框
field 触发对象字段选择器 ✅ 列出 f_textarea / f_email / …
Type 下拉 Manager|Position|Department|Team|Field|Expression|Org Membership Level|User 无 queue;且 user 垫底(间接绑定优先)

全程没有任何 /api/v1/meta/:type 注册表请求 —— 即 #3508 报的那条坏路径已不复存在。

发布契约本身也逐条核过(ApprovalNodeApprover.jsonxRef.sources):position{source:'data', object:'sys_position', valueField:'name'}(存 name)、departmentsys_business_unit(不是 sys_department)、queueunsupportedxEnumDeprecated: ['role','queue']。DATA API 侧 sys_positionname 列实测就是 manager/exec/contributor 这类机器名,sys_business_unit 5 行 bu_* id,与契约一致。

⚠️ 一条未定论的观察(不在本 PR 修)

position approver 存了 manager,但设计器 Value 控件有时不显示这个已存值,而是显示字段描述;该次渲染只请求了 /api/v1/meta/object/sys_position(对象 schema),没有请求 /api/v1/data/sys_position(行),所以机器名没被回填成显示标签。

不敢定论,因为不稳定:第一轮扫描确实在该控件旁抓到了 "Project Manager"(manager 的显示标签),后续两轮干净复现都只有描述文案。已排除的干扰项:published 与 draft 两层的值都完好({type:'position', value:'manager'}),所以不是值被我点掉了。

这正是 objectui#2834 声称修掉的那一类(id_field 非主键时回填走 findOne(主键) 永远查不到、已存值显示为空)—— 可能是没修全,也可能只是我的探针在不同渲染下抓到了不同的 DOM 祖先。建议单独看一眼;若属实,作者打开流程会看到一个已配置的审批人显示为空,是会误导人的。

备注

本 PR 只动 examples/app-showcase(两个标本 + 注册),无包代码改动,故无 changeset。

🤖 Generated with Claude Code

https://claude.ai/code/session_01LkvDs4y4gveyB5NJZKxaZt


Generated by Claude Code

… approvers (#3405, #3508)

Both issues shipped their platform fix but left their last acceptance item on a
real backend, and showcase had no specimen for either shape.

**#3405 — `p_assignee`, an inline `lookup` at `sys_user`.** The gallery already
covered an inline picker aimed at one of the app's own objects
(`p_account` → `showcase_account`). The reported bug (PLAT-DEF-005: "assign an
inspector" handed the supervisor a box wanting a pasted UUID) was a picker at a
SYSTEM object, and a person is the reference a human is least able to identify
by id — `sys_user` ids here are opaque 32-char tokens. That earns its own
specimen rather than riding on the account one.

**#3508 — `showcase_approver_bindings`, one approval node per record-backed
approver kind.** The existing flows cover `position` heavily and
`dynamic-approval` covers `org_membership_level` + `expression`; `user`, `team`,
`department`, `manager` and `field` had no specimen at all, which is why the
designer's Value control could regress unnoticed. `queue` is deliberately
absent — #3536 made it non-authorable.

The flow is `draft` on purpose, not by omission: the record-backed kinds point
at rows a fresh boot does not have (`sys_team` is empty, and unit membership /
position assignment are runtime admin actions by design — see the seed notes).
An `active` flow over them would resolve to nobody, which is the exact silent
dead slot #3508 exists to remove; shipping that as a demo would re-teach the bug.
`draft` keeps it out of the runtime while still loading in the designer, which
is the surface under test.

Verified on a real backend (showcase :5411 + objectui HEAD console :5412, own DB):
- the server publishes `reference` for both inline picker params;
- the param dialog renders Assignee as a searchable picker — typing "Dev" issues
  `GET /api/v1/data/sys_user?top=50&search=Dev` and offers "Dev Admin
  / admin@objectos.ai", with no degrade warning logged;
- the designer renders a record picker per kind off the published
  `xRef.sources`, listing the real seeded org tree for `department`
  (`sys_business_unit`), `manager` as a disabled "Resolved automatically" cell,
  `field` as the trigger-object field selector, and no `queue` in the Type
  dropdown. No `/api/v1/meta/:type` registry calls — the old broken path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LkvDs4y4gveyB5NJZKxaZt
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 30, 2026 12:33am

Request Review

The "Check Changeset" gate requires one on every PR, not only on PRs that touch
a published package — and it sanctions an empty changeset for a change that
releases nothing, which this is: both specimens live in
`@objectstack/example-showcase`, which is `private: true`, so changesets would
skip it regardless. Matches the existing empty-changeset entries
(`adr-0104-design-doc-only.md` and friends).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LkvDs4y4gveyB5NJZKxaZt
@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling labels Jul 30, 2026
`check-i18n-coverage` ratchets each example at its current untranslated count,
so a newly declared label that skips a locale the example claims to support
pushes the count up and fails the gate — 456 → 460 here (`p_assignee`'s `label`
and `helpText`, each counted on two surfaces).

Translated rather than ratcheting the baseline up: ratcheting is what the gate
exists to prevent, and the script only sanctions `--update` for a count that
went DOWN. The gallery's older params sit inside the 456 baseline; this one is
not allowed to widen it.

`负责人` is what the bundle already renders for `showcase_task.assignee`, so the
same idea keeps one word. The flow specimen's own label/description are not
flagged — the `i18n/missing-action` rule covers action params, not flow nodes.

`check-i18n-coverage` now reports "none new"; validate, typecheck and the 58
example tests all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LkvDs4y4gveyB5NJZKxaZt
@os-zhuang
os-zhuang marked this pull request as ready for review July 30, 2026 00:44
@os-zhuang
os-zhuang merged commit 78d8ee8 into main Jul 30, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/action-param-inline-lookup-5e7as6 branch July 30, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants