Repository navigation
Commit 4485536
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8PeP4DzppH3b1kDPCjihHVx)_
Part of #25922
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:Studio 设计器表里 `engine.inspector` 下页面区块、动作、数据集、流程节点、应用导航、仪表盘组件六组共
520 个键(en 与 zh 各一份)从 app-shell 的私有表搬进 `@object-ui/i18n` 的 `studio`
命名空间,文案一字未改,调用点不动。
- 为什么改:执行 #25922 裁决 6431032267(Q2 = A,6431234244 维持),这是 (M) 的第 2
片(S2),沿用第 1 片 #26593 建好的懒加载命名空间。
- 风险与回滚:与第 1 片相同,zh 用户首次打开这些检查器时标签会先显示英文、zh 分片到达后同一挂载重渲染为中文;回滚即 revert 本
PR,行原样回到 app-shell。
- 先看:`ui/packages/i18n/src/namespaces/studio/en.ts` 末尾新加的 S2 段,再看
`previews/__tests__/block-config-i18n.test.ts` 改为同时读两处的抽取器。
- 两分钟验证:`cd ui && pnpm run check:i18n-designer-parity && pnpm exec
vitest run
packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts`,应全绿。
- 需要你做的:无,席位落地。
## What changes
- **Slice S2 of the (M) item.** Every `engine.inspector.pageBlock.*`,
`.action.*`, `.dataset.*`, `.flowNode.*`, `.appNav.*` and `.widget.*`
row (520 keys per language, same set and order in `en` and `zh`) leaves
`ENGINE_STRINGS_EN` / `ENGINE_STRINGS_ZH` in
`ui/packages/app-shell/src/views/metadata-admin/i18n.ts` and is appended
to `STUDIO_EN` / `STUDIO_ZH` in
`ui/packages/i18n/src/namespaces/studio/{en,zh}.ts`, text byte-for-byte
unchanged. The move was done by an AST pass (each property with its
leading comment block, multi-line values kept whole); a heading comment
marks the S2 section in each catalogue. Three comment blocks sat at the
head of a mixed run: two move with the rows they head ("Action default
(home) inspector", "Dashboard filter bindings"), one stays (the
audit-failure note); the `option.location.global_nav` retirement note
follows the pageBlock rows it describes.
- **No runtime change.** `lookupString` already asks the table first and
the namespace second (slice 1), so `t` / `tFormat` / `tOptional` and
every call site are untouched. No new file, so the console's
`i18n-ns-studio-en` / `i18n-ns-studio-zh` chunk groups need no change;
the namespace's only non-test importer is still app-shell's `i18n.ts`.
- **Changeset:** `.changeset/25922-studio-i18n-inspectors.md`,
`@object-ui/i18n` patch.
- ⛔ Untouched: `ui/packages/i18n/src/locales/*.ts`, `ui/.github/**`,
root `ci.yml` (its `check:i18n-designer-parity` step stays until S7).
## Why
Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table
becomes one lazy `@object-ui/i18n` namespace, moved in slices; S2 is the
second row of #26593's slice table.
## Tests
New:
-
`ui/packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts`:
per family (six named floors, so one family draining cannot hide behind
another), the namespace carries the family in `en` and `zh`, and `t()`
answers every key with the namespace's value in `en-US`, `zh-CN` and
`de-DE` (a language with no catalogue reads `en`). The oracle is the
catalogues read through `loadStudioCatalogue`.
Forced edits (the zh rows these suites assert synchronously now arrive
in the lazily fetched chunk, so each makes `zh` resident with a
top-level `await loadStudioCatalogue('zh')`; no assertion changed):
- `inspectors/DashboardWidgetInspector.test.tsx`,
`inspectors/DatasetDefaultInspector.firstPickKeepsCount-12848.test.tsx`,
`inspectors/FlowNodeInspector.renameNode-11827.test.tsx`,
`inspectors/PageBlockInspector.colorLabelling.test.tsx`,
`inspectors/PageBlockInspector.i18n.test.tsx`,
`inspectors/PageBlockInspector.pageHeaderBreadcrumb-11173.test.tsx`,
`inspectors/PageBlockInspector.visibleWhen.test.tsx`,
`previews/__tests__/block-config.test.ts` (all under
`ui/packages/app-shell/src/views/metadata-admin/`).
- `previews/__tests__/block-config-i18n.test.ts`: the pageBlock
retirement gate (objectui#8368) read its key sets from the app-shell
table by line range; it now reads each locale from BOTH homes (table +
`STUDIO_EN` / `STUDIO_ZH`, same extractor), skips the namespace
catalogues as definition sites in the literal-reader scan, and adds a
guard that the homes are non-empty and no key is counted twice. Plus the
zh preload.
`zh-base-term.i18n-13131.test.ts` already reads the namespace's whole
`zh` catalogue (slice 1), so it covers the moved rows with no edit.
## Acceptance notes
- **Every moved key resolves identically before and after.** One-off
measurement (not committed): the 520 + 520 values were read by AST from
the base table at `dc9d1ff8`, then compared with `t()` and `tOptional()`
on this branch after `zh` is resident, in `en-US`, `en`, `de-DE`, `fr`
(against the base `en` value) and `zh-CN`, `zh`, `zh-TW` (against the
base `zh` value): 3,640 lookups, 0 differing.
- **Ablations** (`scripts/ablation-replace.mjs`, mutation landed by
anchor count and blob, restored byte-identical to `HEAD`):
- `lookupString` without its `?? studioString(key, locale)` arm: the new
pin goes red in all six families and the equivalence check reports 3,640
of 3,640 lookups differing.
- one moved zh row altered (`engine.inspector.widget.kind`): the
equivalence check reports exactly 3 differing lookups (`zh-CN`, `zh`,
`zh-TW`); the pin stays green, as designed, since its oracle is the
catalogue itself.
- **Eager bundle: not re-measured locally.** The namespace's only
non-test importer is app-shell's `i18n.ts`, statically, so the moved
`en` rows sit behind the same import edge before and after; the `zh`
rows stay in the lazy `i18n-ns-studio-zh` chunk. CI's `Build & E2E UI`
runs the eager-closure budget on the built console.
- `check:i18n-drift` reads both homes over the range and reports 0 `en`
values changed, 0 keys added or removed.
## Verification
All at `18f4d0f6` unless noted.
<details><summary>Affected tests</summary>
- 294 test files (every app-shell test naming a zh locale, every file
naming one of the six families, the i18n namespace tests, the ui i18n
script tests), under `os-verify-lock`, before the forced edits: 287
passed, 7 failed (the seven suites above, all zh-synchronous). After the
edits the 11 touched or new files: `Test Files 11 passed (11)`, `Tests
163 passed (163)`, VERDICT command-exit 0.
- `pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run
type-check` (both tsconfigs each): VERDICT command-exit 0.
</details>
<details><summary>Gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 34 commands, each exit 0, including `pnpm
--dir ui exec vitest run scripts/` (`Test Files 178 passed | 2 skipped
(180)`). `--ran`: 34 derived, 34 run, 0 NOT-MEASURED.
- ui: `check:i18n-designer-parity`, `check:i18n-dead-keys`,
`check:i18n-drift`, `check:i18n-keys`, `check:new-line-citations` (0 new
citations): all exit 0. `node scripts/check-nul-bytes.mjs`: exit 0.
- Changed lines: 2,469 (+1,309 / −1,160) over 14 files, under the 3,000
threshold.
</details>
## Human Minimum
- [x] 1. No `packages/spec` change.
- [x] 2. No new names beyond one test file.
- [x] 3. No formatter ran; `pnpm lint` is CI's.
- [x] 4. One card slice, one branch off `main`, one pull request.
- [x] 5. Patch changeset with both declaration lines.
- [x] 6. n/a.
- [x] 7. No hand edits to generated or release-owned files.
- [x] 8. English.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 13e85be commit 4485536
14 files changed
Lines changed: 1309 additions & 1160 deletions
File tree
- .changeset
- ui/packages
- app-shell/src/views/metadata-admin
- inspectors
- previews/__tests__
- i18n/src/namespaces/studio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
| 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 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments