Repository navigation
Description
repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i
Filing category ① — a user-visible defect reproduced on the public UI · Source: fleet · carries item 12a of #39439; #39439 keeps every other item
Grade: area:ux · Bug · p3 (suggested; triage grades) · Setup admins creating custom units · evidence: reproduced (UI) + read (code)
维护者速读
- 问题:在设置里新建自定义计量单位「斤」(编码
JIN1),成功提示写的是「计量单位"JIN1"已创建」,显示的是编码,不是名称。 - 原因:平台的
sys_unit对象把标题字段定成了编码(sys-unit.object.ts:125-126:displayNameField: 'code'、nameField: 'code')。界面只是按声明的标题字段显示,界面本身没错。 - 本卡做:
sys_unit改为按label(名称)作标题,和平台其他对象一致,例如sys_email_template、sys_personal_view都用nameField: 'label'。 - 不做:比例显示 12 位小数(第 12b 项)。那是声明的精度,按裁决 A′ 5791809146([finding] an undeclared
numberfield prints two different decimal widths on two faces of the same column — and ⛔number ⇒ 0cannot be the fix, because a declared 0 also turns grouping OFF #19628)照声明显示,不改。
Business reason
An admin who creates a unit sees it named by a machine code in the toast and on every face that shows a record title (pickers, list titles, the record header). The label is "The name shown beside a quantity in this unit" (sys-unit.object.ts:144-152), and ADR-0079 (:61) defines a record's title as "A record's human name". Customers in China type 斤/公斤/箱 as names; seeing JIN1 back reads as broken.
Evidence
- Reproduced in the Setup admin polish: knowledge-base setup is split across three places, delivery log lacks recipients, and smaller rough edges #39439 walkthrough (showcase dev server, zh-CN console): creating unit 斤 (
JIN1, ratio 0.5) answers 「计量单位"JIN1"已创建」. packages/platform-objects/src/system/sys-unit.object.ts:125-126:displayNameField: 'code',nameField: 'code'.- The toast reads the declared name field:
ui/packages/i18n/src/recordSaveMessage.ts:48,:57(form.createdNamed). The UI is correct; the producer decides. - Precedent for a label title on a platform object:
packages/platform-objects/src/audit/sys-email-template.object.ts:36andpackages/platform-objects/src/identity/sys-personal-view.object.ts:58(nameField: 'label'). - ADR-0158 U4 rules that a quantity names its unit by code; it does not rule the unit row's title. No lookup points at
sys_unittoday, and no recorded reason forcodeas the title was found (PR feat(spec, platform-objects): the standard unit table and the organization unit object sys_unit (ADR-0158 U1-U3) #35581 history; issue search below).
Settled without a maintainer question: decision-thread reading 7410294142 on #39439 (item 12a → split to a platform card).
Scope
sys_unitonly. Out of scope:sys_standard_unit_settingandsys_exchange_rate, whose title is the code a person recognises.- Done when: creating a unit answers with its label in the toast, and the record's title on its list/record page is the label; a pin test reads the declared
nameField/displayNameField.
Who acts
The seat holding the card's area on objectstack (os-dev, one small PR in packages/platform-objects).
Dedupe
gh api search/issues with repo:objectstack-ai/objectstack is:issue, open + closed: sys_unit nameField (2: #39439, #6015 seat post), sys_unit title label (11: #39439 and closed unit-of-measure cards #35488, #35970, #38939, #35339; none covers the title field).
Activity
objectstack-fleet commentedon Dec 4, 2026
triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ux · domain:server · Bug · p2 · pm:queue · size XS, touched 2026-12-04T12:16Z. Rationale:
sys_unitnames a unit record by its code, so "unit created" and every lookup showJIN1where the admin typed 斤. No UX problem is p3, so the suggested p3 becomes p2. The fix is the display name field on one object plus its pin, size XS. Issue type set to Bug.Grade: p2 · reach: Setup admins creating custom units · evidence: reproduced in the UI and read (
sys-unit.object.ts:125-126) · claimable.objectstack-fleet commentedon Dec 4, 2026
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV
Claim: PM loop round 8 · 2026-12-04T13:24Z
Session:
session_016WV4d1cnRvyiAqrarmDhZVAccount:
os-elon-muskArea: em-admin
Branch:
claude/issue-39658-wipWorktree:
objectstack-issue-39658Domain:
domain:serverSeat:
repo:objectstack@os-elon-muskFile surface:
packages/platform-objects/src/system/sys-unit.object.ts(nameField/displayNameFieldonly), a pin test beside it, a changeset, and any generated file those declarations regenerate into through its own generator.Container & model:
XS,mode:subagent,model: default,effort: mediumClause-②: no
Metadata-protocol: none
Responsibility: an admin who creates a unit sees its label, not its code, in the toast and on every record title.
Thread-read: none
Premise: per the card and its triage 7411216970.
Pre-claim lane: zone em-admin, p2
pm:queuecard, triage says claimable; picked by customer value.Pre-claim deps: none.
Prior rulings read: decision-thread reading 7410294142 on #39439 (item 12a split to this card; 12b out of scope).
Serial constraints cleared:
check-handover.mjs --inflight --card=39658reads no overlap. The two unread surfaces, #38415 and #35238, were read by hand; both claims say "File surface: none". Card comments re-read: triage only, no live claim.objectstack-fleet commentedon Dec 4, 2026
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV
os-dev-report
Posted 2026-12-04T14:39Z
{ "issue": 39658, "status": "done", "branch": "claude/issue-39658-wip", "pr": "https://github.com/objectstack-ai/objectstack/pull/39712", "session": "session_016WV4d1cnRvyiAqrarmDhZV", "premise_still_valid": true, "summary": "sys_unit now declares label as its title field, both nameField and displayNameField, where it declared code. This follows sys_email_template and sys_personal_view, and ADR-0079's 'a record's human name'. The premise held on origin/main fcdb79d4. Nothing depends on code being the title: no reference field points at sys_unit, the console's unit display reads the label column by name, no test pinned code as the title, and no generated artifact carries these declarations. The diff stays inside the file surface: the two declarations, one pin test and a patch changeset.", "tests": "At f577f2f56f. pnpm --filter @objectstack/platform-objects test: 137 files, 2458 tests passed, command-exit 0. The package's own dist was built first, because its suite self-imports it. typecheck: exit 0. Ablation: with nameField reverted to 'code' on disk, the pin went red (Expected label, Received code; 1 failed, 30 passed), and I restored it afterwards.", "gates": "dispatch-gates --commands derived 65; --ran accounted for all 65: 57 exit 0, 8 NOT MEASURED. Four refused with exit 3 PREREQUISITE NOT MET (dual-build-cjs-loads, lean-entry-closure, i18n, plugin-teardown-shape self-test); four were killed by timeout with exit 124 (comment-mask-corpus, query-options-erasure, slot-lookup, type-check-debt). CI on head f577f2f56f: 39 success, 18 skipped, 0 failure. Successes include Test Core (all 12 shards), TypeScript Type Check, the Type Check lanes, Lint & Repo Gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Type Check · debt ledger, Check Changeset, Build Core, Test UI and Dogfood Regression Gate.", "mcp_calls": "0", "api_writes": "2: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls and POST /repos/objectstack-ai/objectstack/issues/39712/assignees), and this os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/39658/comments)", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["carrier: none · noted, not filed: the sys_unit description still says 'named by a code in the organization namespace'. It describes the code namespace and sits outside the file surface."] }objectstack-fleet commentedon Dec 4, 2026
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV
Delivered · 2026-12-04T15:15Z · zone em-admin
PR #39712 merged (merge commit
bf95e789fb), closing this card. L1 → PR #39712 comment 7414780983 (no L2 owed); landed by zone em-admin (7414815207).pm:dispatchedremoved in this stroke.