Skip to content

fix(example-crm): full-name contact titles, a complete zh-CN bundle, declared highlight strips and a user-typed lead owner - #28886

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-w26whq
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-w26whq

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

Requested by Steedos · project thread

Fixes #28870

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:改 examples/app-crm 的元数据,另把 scripts/i18n-coverage-baseline.json 里 app-crm 的未翻译上限从 101 写成 0。联系人标题改为全名(nameField: 'full_name',公式声明 returnType: 'text');五个对象的复数名去掉「列表」;zh-CN 词条补齐导航、字段、选项、仪表板、数据集、对象描述、校验提示和欢迎页(os lint --i18n-strict 未翻译数 101 → 0);客户、联系人、商机、线索、活动各声明 highlightFields(不含阶段字段,阶段已由阶段路径显示);线索「分配给」改为用户字段;误挂在 Acme 下的 "Discovery Call — Bletchley Systems" 改名为 "Discovery Call — Acme Platform Renewal";仪表板说明改写成业务语言。
  • 为什么改:epic: record page v2 — one default open mode per object (drawer by default, page by declaration; modal / split / popover retired as metadata); the drawer and the page are one page at two widths; related records open in place #26676 裁决 B 把 app-crm 定为预览面,它的元数据错误在评审里被当成平台缺陷。维护者裁决:「联系人标题只显示 “Ada”,不处理,这种就是元数据的bug」,所以平台不动,只修元数据。
  • 风险与回滚:风险低。示例包是私有包,不发布;平台代码零改动。种子不再给线索写 assigned_to(原值是客户联系人的邮箱,不是用户),新库里该列为空,要在界面上分配。回滚即 revert 本 PR。
  • 先看:① examples/app-crm/src/objects/lead.object.ts(assigned_to 改为 Field.user,is_closed 声明 boolean);② examples/app-crm/src/data/index.ts(去掉种子里的邮箱、活动改名);③ examples/app-crm/src/objects/contact.object.ts(标题字段)。
  • 两分钟验证:pnpm dev:crm -- --fresh -p 38427,浏览器语言设为中文后登录:侧栏是「线索 / 客户 / 联系人 / 商机 / 活动 / 销售漏斗」,联系人页标题是 "Ada Lovelace",页签没有「列表」二字。
  • 需要你做的:无,席位落地。

What changes

Every metadata edit is in examples/app-crm, per the ruling: no platform change, no lint, no inference, no gate. The one other file is the app-crm row of the i18n coverage baseline.

  1. Contact title. crm_contact declares nameField: 'full_name', and the full_name formula declares returnType: 'text', which makes it title-eligible. Title, lookups and pickers read "Ada Lovelace".
  2. Plural labels. The zh-CN pluralLabel of account, contact, opportunity, lead and activity is the plain noun (客户, 联系人, 商机, 线索, 活动).
  3. zh-CN bundle. Navigation entries keyed by id (nav_leads … nav_pipeline_dashboard), every declared field label, every select option (industry, stage, approval status, lead status and source, activity type and status), the line-item object, the crm_convert_lead action, the dashboard title, description and six widgets, the opportunity_metrics dataset (tile and axis names), object descriptions, the five validation messages and the welcome page.
  4. Highlight fields. Picks, at most 6, never the title field, and never the field the record page already draws as the stage path (detectStatusField: opportunity stage, lead and activity status), so the stage is not shown twice once Default record page: no derived highlight strip (declared highlightFields only); the stage field leaves the body when the path draws it; the owner appears once, under one word #28868 shows a declared strip as declared:
    • crm_account: industry, annual_revenue, website
    • crm_contact: account, email
    • crm_opportunity: account, amount, close_date, probability
    • crm_lead: company, source, lead_score, assigned_to
    • crm_activity: type, due_date, contact, account
  5. Lead owner. crm_lead.assigned_to is Field.user (target sys_user). The seed no longer writes the four email addresses into it; see the deviation below.
  6. Seed ownership. The activity "Discovery Call — Bletchley Systems" was linked to Acme Corp, Ada and the Acme renewal. It is renamed "Discovery Call — Acme Platform Renewal" to match its links.
  7. Dashboard copy. The widget and dashboard descriptions are rewritten in business words (no compareTo, no chart-type notes) and translated.

Also, as a bounded in-place fix of the same class as item 1 (a formula without its result type), crm_lead.is_closed declares returnType: 'boolean'. The zh-CN lead page showed the raw word "false" under 已关闭; it now shows 否.

Deviation from the card (seat ruling B)

The card asks for "seeded user references" on assigned_to. Measured on 45efba2a: no sys_user row exists when app-crm's seed runs. The dev admin is minted at kernel:ready, after AppPlugin.start() seeds, and people otherwise come from sign-up (examples/app-showcase/src/security/demo-personas.ts; content/docs/data-modeling/seed-data.mdx, "Owner-style fields"). The only way to resolve a seeded user reference would be for app-crm to seed sys_user rows itself. Those are directory rows with no login, and packages/plugins/plugin-auth/src/auth-manager.ts (the #14157 docblock) records that seeded people close the first-visitor bootstrap sign-up under invite_only. The seat ruled option B: Field.user, and the seed leaves the field unset, which is the documented owner-style pattern. The acceptance screenshot of the lead list was taken after assigning three leads in the UI.

Tests

  • pnpm --filter @objectstack/example-crm typecheck: exit 0.
  • pnpm --filter @objectstack/example-crm test: 7 files, 48 tests passed.
  • os lint --i18n-strict on the app: 0 errors (was 101 untranslated declared strings). The 4 remaining field-no-consumers warnings were on the base too; the base had 9, and the highlight strips and the contact title now consume 5 of them.
  • os validate: exit 0.
  • Fresh boot (pnpm dev:crm -- --fresh): seed loads 28 rows with no unresolved-reference line.

Acceptance notes

  • Screenshots (1440 px, zh-CN, fresh boot; 375 px contact page too) are held in the maintainer's project folder issue-28870/ and are not uploaded to GitHub: zh-account-page.png, zh-contact-page.png, zh-lead-list.png, plus the lead, opportunity, activity and dashboard pages and the account and contact lists. The seat read them before landing.
  • crm_contact.full_name is a text formula, so the title is display-only: a sort by it is refused and search does not reach it. Search still finds a contact by last_name and email (both searchable). The contact list and record page load and render the full name; see the screenshots. A stored text field with an expression would make the title searchable; the card ruled the formula, so this PR keeps it.
  • zh-CN assigned_to reads 分配给, because the platform's owner_id already reads 负责人 on the same page.
  • scripts/i18n-coverage-baseline.json: the app-crm entry is written down from 101 to 0 by node scripts/check-i18n-coverage.mjs --update (claim amended to add this one entry), so a regression cannot creep back under the old ceiling. No other entry moved.
  • No changeset: @objectstack/example-crm is private and publishes nothing, so the PR carries skip-changeset.

Verification

Derived gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at the final head: 42 gates (34 for the app files, 8 more for the baseline file under scripts/), each run with exit 0 and reconciled with --ran, 0 NOT-MEASURED. The PR-body gates ran against this body through GITHUB_EVENT_PATH.

Dogfood battery: not owed (no ! in the title and no (narrowing) arm).


Generated by Claude Code

Contact titles read the full name, plural labels drop the list suffix,
the zh-CN bundle covers navigation, fields, options, the dashboard and
its dataset, the five record pages declare highlight fields, the lead
owner is a user field, the mislinked seed activity is renamed, and the
dashboard copy is written for business readers.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRrzBxwrREVnKhpyXn
…d To is 分配给

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRrzBxwrREVnKhpyXn
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 2, 2026
@github-actions github-actions Bot added the size/m label Nov 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

席位核对 · ACCEPT · 2026-11-02T03:49Z

Head-sha: 707dbd57b24d6d1823d50b9761f76e1bd7e1d0da

  • Shape: draft → main. The first content line after the attribution is Fixes #28870, and no other card number sits beside a closing keyword. 9 files, +220 / −27 (247 lines ≤ 3000). No governed path: check-governed-merges --pr 28886 hit 0 of 9 paths. Author objectstack-fleet[bot]. Clause-②: no and Metadata-protocol: none are line-initial, as claimed. No changeset: @objectstack/example-crm is private, and the PR carries skip-changeset.
  • File surface: inside the claim as amended (6568071382, the app-crm entry of scripts/i18n-coverage-baseline.json). The other 8 files are under examples/app-crm/src/**.
  • Wanted, item by item, read in the diff:
    1. The contact title is nameField: 'full_name', with the formula's returnType: 'text'.
    2. The five zh-CN pluralLabels drop 「列表」.
    3. The zh-CN bundle is filled: os lint --i18n-strict goes from 101 untranslated to 0, and the ratchet ceiling is written down to 0.
    4. highlightFields are declared on all five objects. After the seat's REWORK, none repeats the field detectStatusField draws as the stage path (opportunity stage, lead and activity status).
    5. Lead assigned_to is Field.user, and the seed leaves it unset (seat ruling B, named as a deviation).
    6. The mislinked activity is renamed to match its Acme links.
    7. The dashboard descriptions are in business words, with no compareTo or chart-type notes.
  • Bounded in-place fix, accepted: crm_lead.is_closed declares returnType: 'boolean', which is the same class as item 1. The zh lead page showed "false" and now shows 否.
  • Gates (check-runs on this head): 29 success, 17 skipped, 0 failed or pending. Of the ten required contexts, Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Test UI and Live E2E UI succeeded. Lint UI, Type Check UI and Build & E2E UI are skipped by their path filters, since the diff touches no ui/**. Check Changeset is skipped by skip-changeset.
  • Tests: example-crm typecheck 0 and 48/48 tests; os lint --i18n-strict 0; os validate 0; 42 derived gates, all exit 0 and reconciled with --ran. A fresh boot loads 28 seed rows with no unresolved reference.
  • Acceptance screenshots: held in the maintainer's project folder issue-28870/ and not on GitHub. The seat read the opportunity page, the contact page and the lead list. The contact title is "Ada Lovelace", the tabs carry no 「列表」, the strips carry no stage, and the lead list shows a user name under 分配给 after assignment in the UI.
  • Out of scope, carried by Default record page: no derived highlight strip (declared highlightFields only); the stage field leaves the body when the path draws it; the owner appears once, under one word #28868: the stage still shows in the body beside the path, and the owner still shows twice under 所有者 / 负责人. Those are the platform rules Default record page: no derived highlight strip (declared highlightFields only); the stage field leaves the body when the path draws it; the owner appears once, under one word #28868 lands.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #28870 closes the card on merge.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

1 participant