test(showcase): specimens for the inline picker and the record-backed approvers (#3405, #3508) - #3970
Merged
Merged
Conversation
… 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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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
`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
marked this pull request as ready for review
July 30, 2026 00:44
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#3405 和 #3508 的平台修复都已合并并随
@objectstack/spec@17.0.0-rc.0发布,但两边验收各剩最后一条「真机逐一验证」,而 showcase 对这两种形状都没有标本 —— 控件回归了也没人会发现。改动
#3405 ——
p_assignee,指向sys_user的内联lookupgallery 已有一个指向应用自有对象的内联 picker(
p_account→showcase_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
reference:p_account→showcase_account、p_assignee→sys_userGET /api/v1/data/sys_user?top=50&search=Dev,下拉给出 Dev Admin / admin@objectos.ai(名字 + 邮箱副标题,people-picker 形状)ActionParamDialog降级告警 —— 没有任何参数掉回 UUID 文本框#3508 —— 逐类型扫过设计器,数据契约取自发布的
xRef.sources:userGET /api/v1/data/sys_user?top=25teamsys_team?top=50(0 行,sys_team无种子 —— 控件仍是 picker)departmentsys_business_unit?top=50,列出真实种子组织树:Acme Corporation / Field Operations / West Coast / East Coast / HQ Financepositionmanagerfieldf_textarea/f_email/ …Manager|Position|Department|Team|Field|Expression|Org Membership Level|Useruser垫底(间接绑定优先)全程没有任何
/api/v1/meta/:type注册表请求 —— 即 #3508 报的那条坏路径已不复存在。发布契约本身也逐条核过(
ApprovalNodeApprover.json的xRef.sources):position→{source:'data', object:'sys_position', valueField:'name'}(存 name)、department→sys_business_unit(不是 sys_department)、queue→unsupported、xEnumDeprecated: ['role','queue']。DATA API 侧sys_position的name列实测就是manager/exec/contributor这类机器名,sys_business_unit5 行bu_*id,与契约一致。positionapprover 存了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