Repository navigation
Commit afc64fc
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLG265nPSasYMMTgKjN4W36)_
Fixes #39057
Clause-②: no (navigation data and labels move inside the declared shape;
no accept set widens, no export moves)
Metadata-protocol: none
## 维护者速读
-
管理员在系统设置左侧导航看到:平台自带的菜单项进入新的十个分组,按裁定顺序排列并改用新名字(公司信息排在用户与组织第一位),七个设置页面打开后的标题和总览卡片也同名改过来,「全部设置」不再出现在菜单里,但原地址仍能打开。
- 属于「系统设置导航改为两层十组」专题:让管理员按使用频率找到日常设置,并让改名后的页面仍能用旧名字搜到。
- 出错时管理员会在错误的分组里看到某个菜单项,或者某个页面的名字和打开后的页面标题不一致;撤回只需回退本次改动,没有数据迁移。
- 需要你人工合并:本 PR 改了
`docs/adr/0057-erp-authorization-core-business-units-and-scope-depth.md`
里的一行锚点(`setup-nav.contributions.ts#group_people_org` 改指
`setup.app.ts#group_people_org`,旧分组 id 仍在那里以 `renamedFrom`
声明),`docs/adr/**` 属受管面,所以是 Tier H;行数 1764,未超 3000。须与 #39055(⌘K
按旧名搜)同一版发布,否则改名后旧名暂时搜不到。
## What changes
- **`setup-nav.contributions.ts`**: every platform-owned entry names one
of the ten group ids directly (never a retired id, so
`nav_contribution_group_renamed` no longer fires for these), in the
epic's order. Company Information is the first entry of Users &
Organization (ruling D3). Priorities leave slots for the capability
plugins' entries (#39058): Apps & AI 100 / 300, Audit & Data 200,
Company Settings 200, Notifications 200 / 400, Integrations & Developer
100 / 500; the slot plan is in the file header.
- **Renames in all 11 locales** (en literal + bundle, 10 translated
bundles, recorded source hashes recomputed): Packages to Installed Apps,
Company to Company Information, Localization to Language & Region,
Standard Unit Settings to Standard Unit Decimals, Calendar Exceptions to
Holidays & Workday Swaps, Mail Delivery / SMS Delivery to Email Channel
/ SMS Channel, Authentication to Sign-in Methods, AI & Embedder to AI
Model Service, Data Lifecycle to Data Retention, Notification Events to
Delivery Log, Sessions to Active Sessions. Plugin-contributed entries
renamed in the 10 translated bundles: Position Holders, Permission Set
Assignment, Record Shares, Queues; their English label stays the
plugin's literal (plugin-security's own pin holds the en bundle to it)
and changes with #39058.
- **Aliases (`keywords`)**: each renamed platform entry carries its
former source-language name on the item; each translated locale carries
its former label on its bundle node (label pinned beside it). Under
either reading of replace-or-add (#39055) the data holds: the en list is
on the item, each locale's own list on its node. Business Units carries
Department / Organization Structure / Division, 部门 / 组织架构 / 事业部 in zh-CN
(ruling D4), in all 11 locales. The seven groups with `renamedFrom`
carry the retired groups' former names (source list on the
`setup.app.ts` group, per-locale on the bundle node). `group_overview`
left no group, so the pinned System Overview entry carries its former
name: its label contains it in nine locales, and its zh-CN / zh-Hant
bundle nodes list 总览 / 總覽 in `keywords`.
- **`nav_settings_hub` removed** from navigation and from every bundle,
added to the dead-id tombstone ledger; `/apps/setup/system/settings`
keeps opening the hub (console route untouched, pinned by
`AppContent.systemHubRoutes.test.tsx`).
- **Tests**: new `setup-platform-items-39057.test.ts` (groups, order,
priorities, zh-CN labels against the table, new label + former-label
alias per renamed entry in 11 locales, BU aliases, group aliases, hub
absence). Collateral pins updated where they read the old group ids or
labels: `setup-packages-door`, `setup-packaged-actions-nav`,
`setup-users-nav-view`, `sys-exchange-rate` / `sys-unit` /
`sys-standard-unit-setting` object tests, cli
`connect-agent-both-halves-wire` and `setup-diagnostics-audience` pins
(the three former Diagnostics entries are now tracked wherever they
sit), service-knowledge non-vacuity probe, service-settings hub parity
(reads every group now).
- **Settings page and hub titles (Q1 ruling A)**:
`@objectstack/service-settings` translations, all 11 locales, `title`
only, for company, localization, auth, mail, sms, ai and lifecycle, now
equal the new nav labels, so the hub card, the page heading and the
sidebar agree and `setup-nav-hub-parity` is green unchanged. en.ts gains
title-only `sms` and `lifecycle` blocks (their other strings still come
from the manifest literals); no manifest is touched.
- **ADR-0057 anchor**: its symbol anchor
`setup-nav.contributions.ts#group_people_org` now points at
`setup.app.ts#group_people_org`, where the retired id is still declared
(`renamedFrom`). One line; `docs/adr/**` makes this PR Tier H.
## Tests
Union on `af54fa3e` (local, targeted; CI runs the farm):
<details><summary>service-settings: 79 files, 1547 tests passed (hub
parity green, unchanged); typecheck clean</summary>
`pnpm --filter @objectstack/service-settings exec vitest run
--maxWorkers=2` : Test Files 79 passed, Tests 1547 passed. `pnpm
--filter @objectstack/service-settings typecheck` : exit 0.
knowledge-turso `settings-contribution.test.ts` (reads the real settings
bundles): 27 passed.
</details>
<details><summary>platform-objects: 132 files, 2313 tests
passed</summary>
`pnpm --filter @objectstack/platform-objects exec vitest run
--maxWorkers=2` : Test Files 132 passed, Tests 2313 passed.
</details>
<details><summary>composed pins (on e2ed19b, no platform-objects change
since): cli 23, service-knowledge 53, plugin-security 5, plugin-audit 3
passed; check-app-nav-i18n OK; check:i18n OK on af54fa3</summary>
- cli: connect-agent-both-halves-wire, console-page-nav-entries,
setup-diagnostics-audience, setup-integrations-order,
setup-landing-audience, format.server-ready-dev-admin-audience: 23
passed.
- `node packages/cli/scripts/check-app-nav-i18n.mjs`: OK (14
contributors, 11 locales; setup 63 merged nav ids, every id labelled in
every locale).
- `pnpm check:i18n`: OK (10 packages, all bundles in sync, no undeclared
authoring keys).
</details>
<details><summary>Ablation (each red, each restored, `git diff HEAD`
empty)</summary>
Title change, `-- vitest run src/setup-nav-hub-parity.test.ts`:
- restore zh-CN mail title 邮件投递: 1 failed (zh-CN parity, `{ ns: 'mail',
hub: '邮件投递' }`);
- delete en's title-only `sms` block: 1 failed (en parity, `ns: 'sms'`),
proving the en block is what overrides the manifest literal.
New nav pins, `-- vitest run
src/apps/setup-platform-items-39057.test.ts`:
- drop Users from Users & Organization: 1 failed (order);
- point Currency & Units' contribution at `group_configuration`: 2
failed (retired id, order);
- drop zh-CN Work Queues' alias: 1 failed;
- restore zh-CN 邮件投递 label: 2 failed (table, rename);
- reintroduce `nav_settings_hub` in place of Public Forms: 3 failed
incl. hub absence;
- cut Business Units' aliases to one: 1 failed.
</details>
## Acceptance notes
- The epic's table does not list 当前组织 (`nav_organization`); it stays in
Users & Organization, last (Q2 ruling A).
- The settings manifests' own `label` literals still carry the former
names (sms `SMS Delivery`, objectql lifecycle `Data Lifecycle`, and
company / localization / auth / mail / ai). They are no longer what any
locale shows, since en.ts now carries every title, but a reader of a
manifest sees the old name. Manifests were fenced off (#39044 holds
`mail.manifest.ts`); for the manifest owners.
- Table labels that differ from main and are not in the explicit rename
lists, left unchanged: 系统概览 vs 概览 (pinned item in `setup.app.ts`,
outside this card's fence), and plugin entries 浏览应用市场 vs 应用市场, 品牌 vs
品牌外观, 审批委派(外出)vs 审批委派. 权限集 in row 2 has no entry on main
(`nav_permission_sets` is tombstoned). For #39058 and the maintainer.
- When #39058 changes a plugin entry's English literal, the translated
locales' recorded hashes for that entry must be refreshed in the same
PR, or `withSourceFallback` serves English for it.
- en.ts section comments still say "Configuration" / "Diagnostics" above
moved entries; cosmetic.
- `AppContent.tsx`'s docblock still names `nav_settings_hub` as the
declared landing; the route is unchanged (fenced off).
## Verification
Two minutes: `pnpm --filter @objectstack/platform-objects exec vitest
run src/apps/setup-platform-items-39057.test.ts` should report 26
passed. Read first: `setup-nav.contributions.ts` (group ids and
priorities), `translations/zh-CN.ts` (setup block),
`service-settings/src/translations/en.ts` (the two title-only blocks).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzeZMKeDN64azVSgNLF
<!-- signed: repo:objectstack@os-support-ai · os-support-ai ·
session_01WGufzeZMKeDN64azVSgNLF -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5161056 commit afc64fc
48 files changed
Lines changed: 1140 additions & 652 deletions
File tree
- .changeset
- docs/adr
- packages
- cli/test
- platform-objects/src
- apps
- translations
- system
- services
- service-knowledge/src/__tests__
- service-settings/src
- translations
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | | - | |
22 | | - | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
157 | 169 | | |
158 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
159 | 173 | | |
160 | 174 | | |
161 | 175 | | |
162 | 176 | | |
163 | | - | |
164 | | - | |
| 177 | + | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | | - | |
168 | | - | |
| 181 | + | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
176 | | - | |
| 189 | + | |
| 190 | + | |
177 | 191 | | |
178 | 192 | | |
0 commit comments