Repository navigation
fix(example-showcase): label the project and invoice owner text field "Owner Email" - #28008
Merged
Merged
Conversation
… "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>
Contributor
Author
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
2 tasks
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.
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh
Requested by Bill · project thread
Fixes #27916
Clause-②: no
Metadata-protocol: none
维护者速读
showcase_project)和发票(showcase_invoice)上自带的文本字段owner改名显示为 "Owner Email"(中文 负责人邮箱),API 名仍是owner。owner_id(用户查找字段)也叫 "Owner",管理员在字段列表、选择器、筛选里看到两个 "Owner",只能靠 API 名分辨;该字段在种子数据里存的就是负责人的邮箱。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_projectandshowcase_invoiceeach declare a text fieldownerlabelled "Owner". The registry also injectsowner_id, asys_userlookup 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.ownerholds 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.ownerholdsada@example.com-style addresses. Theshowcase_contributorrow-level-security rule compares it tocurrent_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 (enandzh-CN). The platform's zh-CN label forowner_idis 所有者 (i18n-resolverin@objectstack/spec), so the zh-CN labels stay distinct too.Files: the two object files,
src/system/translations/index.ts(fourownerentries) and a patch changeset for@objectstack/example-showcase. The root.changeset/config.jsonignores 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 statusclean), registeredProjectandInvoicein a realObjectQLPluginregistry and printed the stored field labels.On this branch (head 832181e):
Control: the two object files restored to the base commit 5e1342a (tree only), with the same run:
The files were restored from
HEADafterwards.git diff HEADon them was 0 bytes and the blob hash matchedHEAD.Showcase package, on the merged head 63aaa12
pnpm --filter @objectstack/example-showcase run typecheck: exit 0pnpm --filter @objectstack/example-showcase exec vitest run --maxWorkers=2: Test Files 41 passed (41), Tests 505 passed (505)os-verify-lock.sh, joined with&&after rebuilding the three dependencies the merge frommaintouched: VERDICT command-exit 0Acceptance notes
ownerfield. I searchedexamples/app-showcase/**,ui/**(fixtures, e2e specs),packages/qa/dogfood,packages/lintand the root folders for "Owner" next toshowcase_projectorshowcase_invoice. Theui/e2e/live/record-history-display.spec.ts"Owner" assertions readshowcase_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.tsxkeeps an inline copy ofshowcase_invoice(its header dates the copy to objectstack9e0945cf4) withownerlabelled "Owner". It asserts nothing about that label, and it describes a dated snapshot, so I left it alone.GET /api/v1/meta/objectreading was not taken.pnpm dev -- --freshstopped at its prereq check because the Console'sui/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/objectstackderived 45 commands. Each was run with its exit code captured before any pipe, then reconciled with--ran:All 45 exited 0.
pnpm check:changeset-fixedwas also run (its roster lives under.changeset/): exit 0.check:dual-build-cjs-loadsfirst 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