Skip to content

fix(example-showcase): label the project and invoice owner text field "Owner Email" - #28008

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-j9w213
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-j9w213

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh

Requested by Bill · project thread
Fixes #27916
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:showcase 的项目(showcase_project)和发票(showcase_invoice)上自带的文本字段 owner 改名显示为 "Owner Email"(中文 负责人邮箱),API 名仍是 owner。
  • 为什么改:平台给这两个对象注入的 owner_id(用户查找字段)也叫 "Owner",管理员在字段列表、选择器、筛选里看到两个 "Owner",只能靠 API 名分辨;该字段在种子数据里存的就是负责人的邮箱。
  • 风险与回滚:只改示例应用的两个显示标签和中英文翻译,不改字段名、数据、流程或权限规则;回滚即 revert 本 PR。
  • 先看:examples/app-showcase/src/data/objects/project.object.ts、examples/app-showcase/src/data/objects/invoice.object.ts、examples/app-showcase/src/system/translations/index.ts。
  • 两分钟验证:pnpm dev 打开 showcase 的项目或发票列表,点列设置或筛选,预期只看到一个 "Owner"(用户)和一个 "Owner Email"(文本)。
  • 需要你做的:无,席位落地。

What changes

showcase_project and showcase_invoice each declare a text field owner labelled "Owner". The registry also injects owner_id, a sys_user lookup labelled "Owner", so each object listed two "Owner" fields in the field grid, pickers and filters.

The authored field is now labelled "Owner Email" on both objects, with the zh-CN translation 负责人邮箱. The label comes from what the field holds in the seed rows:

  • showcase_project.owner holds the provisioned persona emails (ADMIN_EMAIL, PHONE_DEMO_USER.email, AUDITOR_DEMO_USER.email). The notify flows read it as an email-shaped recipient, as the seed's header comment explains.
  • showcase_invoice.owner holds ada@example.com-style addresses. The showcase_contributor row-level-security rule compares it to current_user.email, and the source comment above the field already called it "Owner email".

The API name stays owner, so seeded rows, flows (record.owner), the RLS rule and every test that names the field are unchanged. The translation bundle follows in both locales it carries (en and zh-CN). The platform's zh-CN label for owner_id is 所有者 (i18n-resolver in @objectstack/spec), so the zh-CN labels stay distinct too.

Files: the two object files, src/system/translations/index.ts (four owner entries) and a patch changeset for @objectstack/example-showcase. The root .changeset/config.json ignores only @object-ui/example-*, not this package, and an earlier showcase changeset set the precedent.

Tests

Registry reading, fix and control (in-process ObjectQL registry, the two objects registered as the app registers them)

A throwaway vitest file, deleted after the run (git status clean), registered Project and Invoice in a real ObjectQLPlugin registry and printed the stored field labels.

On this branch (head 832181e):

READING showcase_project: owner.label="Owner Email" owner_id.label="Owner" owner_id.reference=sys_user fields-labelled-Owner=["owner_id"]
READING showcase_invoice: owner.label="Owner Email" owner_id.label="Owner" owner_id.reference=sys_user fields-labelled-Owner=["owner_id"]

Control: the two object files restored to the base commit 5e1342a (tree only), with the same run:

READING showcase_project: owner.label="Owner" owner_id.label="Owner" owner_id.reference=sys_user fields-labelled-Owner=["owner_id","owner"]
READING showcase_invoice: owner.label="Owner" owner_id.label="Owner" owner_id.reference=sys_user fields-labelled-Owner=["owner_id","owner"]

The files were restored from HEAD afterwards. git diff HEAD on them was 0 bytes and the blob hash matched HEAD.

Showcase package, on the merged head 63aaa12
  • pnpm --filter @objectstack/example-showcase run typecheck: exit 0
  • pnpm --filter @objectstack/example-showcase exec vitest run --maxWorkers=2: Test Files 41 passed (41), Tests 505 passed (505)
  • Run under os-verify-lock.sh, joined with && after rebuilding the three dependencies the merge from main touched: VERDICT command-exit 0

Acceptance notes

  • No test pinned the label "Owner" on either object's owner field. I searched examples/app-showcase/**, ui/** (fixtures, e2e specs), packages/qa/dogfood, packages/lint and the root folders for "Owner" next to showcase_project or showcase_invoice. The ui/e2e/live/record-history-display.spec.ts "Owner" assertions read showcase_account.owner_id, not these fields. So no test reads the new label, and no ablation applies.
  • ui/apps/console/src/services/approvalRequestsDataSource.servedPageSummaryAmount-12534.test.tsx keeps an inline copy of showcase_invoice (its header dates the copy to objectstack 9e0945cf4) with owner labelled "Owner". It asserts nothing about that label, and it describes a dated snapshot, so I left it alone.
  • No new test pins the label. A label is display copy, and the card's ruling puts a platform-side guard against an authored label that matches an injected one out of scope, as a separate triage question.
  • The live GET /api/v1/meta/object reading was not taken. pnpm dev -- --fresh stopped at its prereq check because the Console's ui/ packages had no build output in this worktree. The in-process registry reading above stands in for it.

Verification

Derived gates, on the merged head 63aaa12

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 45 commands. Each was run with its exit code captured before any pipe, then reconciled with --ran:

Run reconciliation — 45 derived, 45 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 45 derived famil(ies) accounted for — 45 run, 0 NOT-MEASURED (a DERIVED zero — all 45 recorded an exit code and none of them is 3).

All 45 exited 0. pnpm check:changeset-fixed was also run (its roster lives under .changeset/): exit 0. check:dual-build-cjs-loads first stopped at PREREQUISITE NOT MET because seven packages outside the showcase closure had no build output. I built those seven, and it then passed.

CI owns the type-check lanes, the path-scheduled jobs and the repo-wide scans.


Generated by Claude Code

… "Owner Email"

showcase_project and showcase_invoice each author an `owner` text field
labelled "Owner" beside the platform-injected `owner_id` lookup, also
"Owner", so the field grid, pickers and filters list two "Owner" fields.
The authored field holds the owner's email in every seeded row, so it is
now "Owner Email" (zh-CN 负责人邮箱). The API name stays `owner`.

Claude-Session: https://claude.ai/code/session_01Utp6CbDAucNyQ4UtzCJKyh
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh

席位核对

ACCEPT · head 63aaa12d94ba5a0d150057630e5f8b255c652771 · 2026-10-30T07:44Z

  • Shape: draft → main, Fixes #27916. Clause-②: no and Metadata-protocol: none. The changeset is patch on @objectstack/example-showcase; the root config ignores only @object-ui/example-*.
  • Change, read (4 files, +22/−7):
    • The text field owner on showcase_project and on showcase_invoice is now labelled "Owner Email". The API name owner is unchanged.
    • The translation bundle follows in en ("Owner Email") and zh-CN (负责人邮箱). The platform's zh-CN label for owner_id is 所有者, so the two stay apart in both locales.
    • Each object now carries one field labelled "Owner": the injected owner_id.
  • Label choice, checked against the seed data: both fields hold an email address. On projects it is the provisioned persona emails that the notify flows read as recipients. On invoices it is the value the showcase_contributor row-level rule compares to current_user.email.
  • Evidence (report 6517456342):
    • In-process registry reading: on the head, owner_id is the only field labelled Owner on each object. The base control reads [owner_id, owner].
    • Showcase type-check exits 0. Showcase vitest: 41/41 files, 505/505 tests.
    • Derived gates: 45/45 exit 0, with --ran reconciled.
    • No ablation: no test reads the label. The dev searched the showcase, ui fixtures and e2e, packages/qa/dogfood and packages/lint.
  • Deviations, accepted:
    • Live GET /api/v1/meta/object was not measured, because the dev stack's prerequisites were not built. The registry reading stands in.
    • Report and PR-body formats follow the seat's order where os-dev differs.
  • Gates (check-runs on the head): 29 success, 13 skipped, 0 failure. mergeable_state is clean. NOT governed: 0 of 4 paths hit the register, 29 changed lines.
  • Landing: non-governed and all green, so the seat lands it with pr_ready and automerge_enable.

Generated by Claude Code

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/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

app-showcase: showcase_project and showcase_invoice author an owner field labelled "Owner" beside the platform's owner_id, also "Owner"

1 participant