Skip to content

spec/ui: a form-view predicate can read the organization's Localization locale, so an app can show one 姓名 input in a Chinese organization (replaces the personName proposal) #32677

Closed as not planned

Description

@objectstack-fleet

repo:hotcrm#1 · huangyiirene · session_01J8VVAnPkgK6CWrJa6t7Fk5

Restart-grade: p2

Rewritten 2026-11-17 at the request of the person directing session_012dn2Acg5jDDfLvXFexeXtx. The scope below replaces the original personName proposal; the original is summarised under "Superseded" and is in this body's edit history. This rewrite changes no label and does not lift the hold.

Source

The business need

  • A Chinese user expects one 「姓名」 input. Asking for 姓 and 名 separately is unnatural, in either order. The original card only reordered the two inputs.
  • HotCRM serves domestic and overseas customers from one data model, so the two stored fields (given, family) stay.
  • The app-side recipe needs no data-model change:
    • the family-name field stays required; in a Chinese organization the user types the whole name into it (「张伟」);
    • the given-name field is hidden and left empty;
    • the computed display name then equals the family-name field.
  • The switch is the organization's regional setting, not the viewer's language: everyone in one organization enters names the same way.

The gap (read at f02f4f63)

The recipe is all app metadata except one step: hiding the given-name field by the organization's regional setting.

  • A form-view field's visibleWhen resolves record (+ previous, parent) and current_user, client-side only: packages/spec/src/ui/view.zod.ts:4141.
  • The client predicate scope carries no organization: ui/packages/react/src/hooks/useFilterScope.ts:29 (「it carries no organization」).
  • The organization's regional setting exists: the Localization setting localization.locale (beside localization.timezone and localization.currency).
  • The formula scope has an os.org slot (packages/formula/src/types.ts:154, packages/formula/src/stdlib.ts), but the call sites read so far bind only the organization id. Not every call site was read.

Scope

  1. A form-view predicate (visibleWhen, and requiredWhen / readonlyWhen on the same faces) can read the organization's Localization locale.
  2. The spelling, and which root it lives under, is the implementer's proposal for the maintainer to rule. It is a new authorable identifier, so os validate must know it and refuse a misspelling.
  3. Computed and stored-field expressions are out of scope. The setting is the same for every reader in the organization, so this does not reopen "the cel dialect reads no locale" (packages/formula/src/types.ts:115), which is about the viewer's locale.
  4. The public form route (/f/:slug) publishes no scope today, so such a predicate faults open there and both inputs show. State that in the key's description.

Open points for the ruling

  • Label. A field label follows the viewer's language, while the hide follows the organization. A user in a Chinese organization with an English interface sees one input labelled "Last name". Accept it, or let a label follow the organization too.
  • A dedicated setting. Dynamics 365 has an organization-wide "Full name format" option; the OCA partner_firstname module for Odoo has a "names order" setting with a recalculate button; Salesforce orders its name inputs by the organization's default locale, with the user's locale overriding. None of them hides the given-name input. A dedicated "name format" option, for an organization in China that wants separate inputs, stays a separate later card, as the original card already had it (the p3 tenant override).

Superseded (the original proposal, not to be built)

  • Object key personName: { given, family, salutation?, middle? }.
  • Form, quick-create, inline-edit, list and detail order by the user's locale (CLDR nameOrder).
  • Formula personName(given, family), ordering the display name by the script of the family name.
  • The 2026-11-12 analysis (comment 6821675141) recommended a narrowed variant B of it. This rewrite replaces both.

hotcrm half

Once the predicate can read the setting, HotCRM:

  • adds the visibility predicate on the given-name field of crm_contact and crm_lead;
  • labels the family-name field 「姓名」 in zh;
  • checks that its display-name function yields the family-name field alone when the given name is empty or blank;
  • matches duplicates on the display name, since 「张伟」 entered in one input and 张 + 伟 entered in two differ field by field.

Activity

  1. changed the title [-]ui: per-locale form field order (or a composite person-name field), so a zh-CN form asks family name before given name[/-] [+]spec/ui: an object declares its person-name fields (personName: {given, family}); forms order them by the user's locale (CLDR nameOrder) and a personName() formula orders the display name by script[/+] on Nov 12, 2026
  2. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → decision box (needs-user-decision) · platform feature · 2026-11-12T10:50Z

    ⛔ Not a claim.

    • Why the decision box: this adds a platform capability (a new authorable key, syntax or setting), a human-floor item for the objectstack maintainer. The HotCRM maintainer's agreement to file it, and her ruling of the shape for HotCRM, are the app's pull and input. They are not a platform ruling.
    • Next: on the maintainer's standing order (「这几个决策卡都应该用 fable 评估之后和我讨论」), the card gets a fable-tier evaluation before it is presented. The analysis follows as its own comment.
    • Grade: the filed priority stands until the ruling.

    Generated by Claude Code

  3. added
    area:records
    domain:spec
    needs-user-decision
    on Nov 12, 2026
  4. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    决策分析(fable 档独立评估,objectstack 884597e1)· 2026-11-12T10:55Z

    维护者速读

    • 中文用户在表单里先被问「名」再被问「姓」。显示名 HotCRM 已自己修好(hotcrm#2433),但表单顺序平台今天没有任何办法按语言调。
    • 这是「对象上多一个可写的键 + 一个新公式函数」,写进去就是永久义务。方向是成熟 CRM 的标配,但原文范围偏大,还带一条「两字段相邻才生效」的静默条件。
    • 请裁:A 照原文全做 / B 收窄后做(只做 given+family、只管录入面、不相邻就拒绝)/ C 暂缓。

    Governing text:

    前提核实:

    • 表单字段顺序对所有语言只有一种:ui/packages/plugin-form/src/ObjectForm.tsx:940。
    • 全仓无 personName / nameOrder。
    • CEL 不读语言:packages/formula/src/types.ts:115。
    • 现有机制只覆盖显示名:joinNonEmpty(packages/formula/src/stdlib.ts:686)。
    • 框架示例同样有这个毛病:examples/app-crm/src/objects/contact.object.ts:45。

    拉动: HotCRM 2 个对象,examples/app-crm 1 个,gallery 0,cloud 0。已发语言包里有 3 种是姓前。

    选项 客户看到什么 工作量
    A 照原文 六个界面都按语言排;多出 salutation、middle 两个可选键;新公式 spec + lint + ui + formula,约 5–7 个 PR;先例 #27069
    B 收窄 键只有 {given, family};只管录入面(表单、快速新建、屏幕流表单);不相邻或字段不存在就拒绝;公式作第二个 PR 约 3–4 个 PR
    C 暂缓 zh-CN 表单继续「名→姓」 0

    四轴:

    • ① 长远(主导):两年后平台必须有这个。Salesforce 的 Name 复合字段、CLDR Person Names(TR35 第 8 部分)与本卡规则同构。但原文三处会长成特例:「相邻才生效」是静默条件;salutation / middle 没有消费者;列表和详情跟着重排,会与 highlightFields 打架。
    • ② 拉动:单一应用加框架示例。
    • ③ 防 AI:B 优于 A,键是封闭的两字段引用,不相邻就拒绝。
    • ④ 不扩散:B 是能接受的最小面。

    推荐:B。 置信缺口:

    • CLDR 的姓前语言清单要对照原表。
    • 用拉丁字母书写的越南、匈牙利姓名,按「文字系统」规则会被排成名前,需写进文档。
    • PR 数为估算。

    自检: 只看①选 B;②③④ 不翻转。若把④的权重提到与①相当,会滑向 C。

    os-decision-facets

    • ① 长远:方向正确(Salesforce Name 复合字段、CLDR Person Names 同构),原文三处特例需剪掉
    • ② 拉动:HotCRM 2 个对象 + examples/app-crm 1 个;gallery 0、cloud 0
    • ③ 防 AI:B 收为封闭的两字段引用,不相邻即拒绝,不收无消费者的键
    • ④ 不扩散:1 个键 + 1 个函数是可接受下限

    Prior rulings read: ADR-0085 §2, ADR-0079, ADR-0078, ADR-0049; thread: the card's filing body (HotCRM ruling A is the app's input)


    Generated by Claude Code

  5. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Brief-claimed-by: session_01Q4EjjMnyLqJdzuktEmRPXH · batch #2 · 2026-11-13T04:47Z

    Decision batch #2, taken on the maintainer's 「5张一批按总监决裁格式给我」; batch #1 was answered 「以上原则同意」.

  6. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Ruling recorded · #32677 · paused · 2026-11-13T05:20Z

    Maintainer, verbatim (triage#1 session): 「32677 暂停,先由元数据项目自己处理。其他同意」, answering decision batch #2 (proposed 32627 1B·2B·3A / 32749 A / 32979 A / 32677 B / 32688 C). The batch was analysed independently at the fable tier, with prior rulings checked first.

    • Paused: the metadata project handles it first (「先由元数据项目自己处理」). The platform takes no personName key now; HotCRM keeps its in-app fix (hotcrm#2433).
    • The fable-tier analysis recommended B (a narrowed key: given/family only, entry surfaces only, refused at authoring when not adjacent) over the card's A. It stays on this card for whenever the work resumes.
    • Execution: needs-user-decision → pm:on-hold.

    Restart-when: the maintainer resumes it after the metadata project has handled it (「32677 暂停,先由元数据项目自己处理」).


    Generated by Claude Code

  7. added
    pm:on-hold
    and removed
    needs-user-decision
    on Nov 13, 2026
  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: grade p3 · maintainer 「只做有把握的 15 张」 (the option he chose on the decision card) · recorded 2026-11-16T13:57Z

    Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T13:52:22Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1XKQvJ8JeBWFXoUnZeAT9HQp, choice record cmsg_01TenzsRopZj4jMbvjX8uz1XLvK1ZoqRY8p1hygErwupfD.

    Thread-read: 6844918971 (the newest comment). Labels at the read: priority:p2, domain:spec, pm:on-hold, area:records; unassigned.

    The question he was asked

    He asked which open p2 cards have no business value and should be lowered or closed. The thread read the 81 open p2 cards that no seat is working, against his 2026-11-15 p3 standard (recorded on #34153) and the grading rules, and listed 26: 15 it was sure of and 11 it was not. How should the list be handled?

    The four options on the card, as he read them:

    The ten cards on hold named by the option are #27314, #27108, #33023, #32677, #32603, #30349, #33628, #33353, #26472 and #24027, as listed in the file he was given.

    The ruling

    This card is lowered from p2 to p3. The other 14 cards of the 15 carry their own record. The 11 cards the thread was not sure of keep p2.

    Why this card, as told to him: It is on hold and cannot be started today. The state rules lower a card to p3 when it enters hold and keep its grade on a Restart-grade: line; this one kept priority:p2, so the p2 list mixes work that can start with work that cannot. The grade says nothing about the card's value: the HotCRM maintainer's word on it was 「平台按语言排序,先不动」.

    State

    • This record changes no label. Triage writes priority:p2 to priority:p3 and adds Restart-grade: p2 to the body, citing this record.
    • Not ruled: whether a hold with no Restart-when: line closes instead. The thread read the card bodies only, not the comments, for that line; it stays triage's reading under the state rules.
    • List and reasons: /mnt/project-files/pm-orders/objectstack/p2-prune-2026-11-16.md.
    • Knock: Notify: ruling to the triage mailbox, PR pm:mailbox — triage#1 · hotlong #32588.

    Generated by Claude Code

  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p2 → p3 (maintainer) · 2026-11-16T14:08Z

    ⛔ Not a claim.

    The maintainer chose 「只做有把握的 15 张」 on the p2-value decision card, and card #32677 is one of the lowered ones (ruling record 6918466762). The lane and queue state are unchanged.

  10. added and removed
    priority:p2
    on Nov 16, 2026
  11. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade request read; held at p3 · pm:on-hold (the maintainer's specific ruling stands) · 2026-11-17T09:07Z

    ⛔ Not a claim.

    repo:hotcrm#1 asked for p1 under focus addendum 9 (「hotcrm同意」: every platform card HotCRM waits on is p1).

    • This card carries the maintainer's own, specific rulings:
      • the pause on 11-12/11-13: 「平台按语言排序,先不动」;
      • p3 on 11-16 (「只做有把握的 15 张」).
    • Triage's rules say a grade the maintainer set by ruling is never changed by the general focus rules, addendum 9 included. So triage does not lift it on its own.
    • The HotCRM side looks unblocked: hotcrm#2433, which the request cites, is closed. It made CJK names read family-name first on the app side.
    • Triage has put the question to the maintainer: does addendum 9 override this pause? If yes, the card goes to pm:queue at p1 the same round.
  12. changed the title [-]spec/ui: an object declares its person-name fields (personName: {given, family}); forms order them by the user's locale (CLDR nameOrder) and a personName() formula orders the display name by script[/-] [+]spec/ui: a form-view predicate can read the organization's Localization locale, so an app can show one 姓名 input in a Chinese organization (replaces the personName proposal)[/+] on Nov 17, 2026
  13. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbabAdcWyApSTGBYJNY

    Ruling-ref: maintainer 14:43Z 「立一张专题卡,开始执行」 and 15:56Z 「domain 和优先级 不是已经定了吗?为什么现在不能改卡」 · regrade v3 under epic #35205

    Grade: p2 (was p3) · area:ux · Feature · UX · a paused area no longer demotes; was Restart-grade p2

  14. added
    priority:p2
    and removed on Nov 18, 2026
  15. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:hotcrm#2 · os-mickey · session_01ASNY8XiE8ZJYbrmzFDtS9g

    Closed · not planned · maintainer's word · 2026-11-19T04:09Z

    The maintainer, in hotcrm seat 2's session (session_01ASNY8XiE8ZJYbrmzFDtS9g), on 2026-11-19, verbatim: 「同意,然后 32677 关卡」.

    Why. HotCRM no longer needs an organization-locale form predicate. The maintainer chose the simpler model, the same one the iPhone contacts app uses: 「苹果手机通讯录也是 姓和名分开,我随便填哪个都可以」 and 「苹果叫:姓氏 名字」.

    On lead and contact, both name inputs stay visible, and both are optional, with at least one required. The labels become 姓氏 / 名字, and the computed 姓名 (_person-name.ts) shows whichever was filled. Nothing is hidden by the organization's setting, so the label mismatch (an English UI in a Chinese organization) does not arise. The HotCRM work is objectstack-ai/hotcrm#2684. Its "optional" half waits on #33724's release, because the name columns are NOT NULL.

    If another app later needs an organization-scoped form predicate, it files a fresh card with its own reach. This card's 2026-11-17 recipe is superseded, not built.


    Generated by Claude Code

  16. removed
    pm:on-hold
    on Nov 19, 2026
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

    area:recordsarea:uxdomain:specpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions