Repository navigation
Commit 6212fdc
fix(plugin-approvals): label the approval request's record_id "Record", since the column shows the record and not its id (#28347)
domain:spec#2 · os-tesla · session_01L9qibx5r5nhDMwpRs4SL6D
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoWhH54PfJ4zCeekSwbSNYhf)_
Fixes #28250
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:审批请求(sys_approval_request)的 `record_id` 字段显示名由 “Record ID” 改为
“Record”;中文 “记录”、日文 “レコード”、西班牙文 “Registro” 同步改。
- 为什么改:Setup › 审批请求列表里这一列显示的是目标记录的图标和名称,不是 ID;表头写 “Record ID”
让管理员去找一个并不存在的 ID(HotCRM 客户走查 S9 发现)。
- 风险与回滚:只改显示名;字段名 `record_id`、查询、种子数据、与 `object_name` 的指针对、记录锁都不变;回滚即
revert 本 PR。
-
先看:packages/plugins/plugin-approvals/src/sys-approval-request.object.ts(record_id
的
label)、packages/plugins/plugin-approvals/src/translations/zh-CN.objects.generated.ts(sys_approval_request.fields.record_id)。
- 两分钟验证:在 Console 打开 Setup › 审批请求,四个列表视图的表头、请求详情页的亮点条与 Details 标签都显示
“Record”(中文界面显示 “记录”)。
- 需要你做的:无,席位落地。
## What changes
The Approval Requests list views draw the `record_id` cell as the target
record (its object's icon and name), because `record_id` is the id half
of the request's pointer pair with `object_name` (ADR-0052 §5). The
header "Record ID" therefore disagreed with the cell.
-
`packages/plugins/plugin-approvals/src/sys-approval-request.object.ts`:
`record_id` label `'Record ID'` becomes `'Record'`. Nothing else in the
field moves.
-
`packages/plugins/plugin-approvals/src/translations/en.objects.generated.ts`:
regenerated by `node scripts/check-i18n-bundles.mjs --write`; the only
diff across all nine bundle packages is this one leaf.
- zh-CN / ja-JP / es-ES hand values: 记录 ID → 记录, レコード ID → レコード, ID de
registro → Registro. These are the words the same plugin already uses
for `sys_approval_action.record_id` ("Record"), so the two approval
objects now agree. The leaf has no source-hash entry in any locale, so
no hash table moves.
- Changeset: `@objectstack/plugin-approvals` patch.
## Tests
No test pinned the old label (`git grep` for each of the four old
strings outside the bundles: 0 hits in tests, 0 under `ui/`), and a
label is display copy no consumer parses, so no new pin is added. The
pointer-pair, query and seed tests are untouched and pass unchanged.
## Acceptance notes
- `object_name` keeps its label "Object". It is not a list column (no
list view shows a pointer's type half), and on the Details tab "Object"
beside "Record" reads correctly, so it is not the same defect.
- `origin/main` moved after branch-off; `git merge-tree` against it is
clean and none of the incoming files are this PR's.
- Same pattern elsewhere, carried by the seat as its own `domain:server`
card: `sys_audit_log` and `sys_activity` (plugin-audit) also declare
`record_id` with `referenceVia` and keep "Record ID".
`sys_mail_association.record_id` (service-mailbox) is a different case:
its record page shows it only in the highlights strip, which draws the
stored id, so its label is right until that strip leaves it out.
## Verification
All readings at head `f17b7d75` on objectstack-ai/objectstack (merge
base `501c864d`), unless a line names an earlier head.
<details><summary>Tests</summary>
- At `27ee7b7d` (the later commits change only the changeset text in
this package's scope): `pnpm --filter @objectstack/plugin-approvals
test`: Tests 1361/1361 passed; `pnpm --filter
@objectstack/plugin-approvals typecheck` (tsc, scripts tsconfig,
test-typecheck ledger held): lock VERDICT command-exit 0.
- `node scripts/check-i18n-bundles.mjs --write`: exit 0; only
`en.objects.generated.ts` changed, by the one leaf.
</details>
<details><summary>Gates</summary>
- Build: the i18n prerequisite closure (62/62 tasks) and then `turbo run
build --filter='./packages/**'` (77/77 tasks), lock VERDICT command-exit
0 both.
- `dispatch-gates --commands` at `f17b7d75`: 55 families (the same list
as at `27ee7b7d`), each run with stdin from `/dev/null`, exit codes
recorded before any pipe. `--ran`: 55 derived, 55 run, 0 NOT-MEASURED, 0
UNRUN, 0 red.
- All 55 answered exit 0 on the first run at this head. At `27ee7b7d`
two had first answered exit 3 (prerequisite not met) until their
prerequisites were cleared: `check-plugin-teardown-shape --self-test`
(its pinned control commit `621a4876` fetched into the shallow clone)
and `check:dual-build-cjs-loads` (after the packages build).
- The full CI farm (`test:repo`, the UI lanes) is CI's.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibz9o2UXx9eqto4hqY3)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f048e42 commit 6212fdc
6 files changed
Lines changed: 15 additions & 5 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals/src
- translations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments