Repository navigation
Commit 49b5059
<!-- 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.studio.inspector` 之外的全部
`engine.studio.*`(309 键,含上一片顺延的 rules),加上 19
个元数据预览面板家族(`engine.*Preview`、`engine.previewShell`,287 键),共 en、zh 各 596
键,从 app-shell 私有表搬进 `@object-ui/i18n` 的 `studio` 命名空间,文案一字未改,调用点不动。
- 为什么改:执行 #25922 裁决 6431032267(Q2 = A,6431234244 维持),这是 (M) 的第 5
片(S5),派单 6453707890。
- 风险与回滚:与前几片相同,zh 用户首次打开这些页面时标签先显示英文、zh 分片到达后同一挂载重渲染为中文;回滚即 revert 本 PR。
- 先看:`ui/packages/i18n/src/namespaces/studio/en.ts` 末尾的 S5
段,再看钉测试新增的家族下限与 `AddFieldPopover.studioNamespace-25922` 的改写。
- 两分钟验证:`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 S5 of the (M) item.** These rows leave `ENGINE_STRINGS_EN` /
`ENGINE_STRINGS_ZH` in
`ui/packages/app-shell/src/views/metadata-admin/i18n.ts` and are
appended to `STUDIO_EN` / `STUDIO_ZH` in
`ui/packages/i18n/src/namespaces/studio/{en,zh}.ts`, text byte-for-byte
unchanged. Each family has the same keys in `en` and `zh`, and none is
zh-only:
| group | families (keys per language) | keys |
|---|---|---|
| the rest of `engine.studio.*` | `rules` 63, `interfaces` 33,
`designer` 25, `landing` 17, `actions` 15, `owd` 15, `pkg` 13, `app` 12,
`refusal` 12, `held` 11, `nav` 10, `draftMark` 10, `api` 10, `slot` 7,
`formDnd` 7, `hooks` 6, `org` 5, `pillar` 4, `createItem` 2,
`newAutoTrigger` 1, and 31 single keys (`engine.studio.publish`,
`engine.studio.cancel`, …) | 309 |
| the metadata preview panes | `actionPreview` 57, `permissionPreview`
37, `validationPreview` 36, `jobPreview` 20, `agentPreview` 19,
`skillPreview` 16, `datasetPreview` 15, `toolPreview` 14,
`picklistPreview` 13, `dashboardPreview` 9, `appPreview` 9,
`emailTemplatePreview` 9, `pagePreview` 8, `screenPreview` 7,
`positionPreview` 6, `reportPreview` 6, `viewPreview` 4, `objectPreview`
1, `previewShell` 1 | 287 |
| **total** | | **596** |
The `engine.studio.*` rows are the order's scope. Only
`engine.studio.inspector.*` stays, because open PR #26804 adds rows to
it. For the other families I took the preview panes: 574 key lines
against the order's "about 650". I left out `docPreview`, `bookPreview`,
`flowPreview` and the page-block and translation previews:
- `engine.pageBlockCanvas.*` and `engine.translationPreview.*` are
excluded by the order (#26915 and #26831).
- `flowPreview` belongs with the other flow families in S6.
- Dropping `docPreview` and `bookPreview` keeps the PR at 2,922 changed
lines, under the 3,000 threshold. The full preview set would have
crossed it.
I checked the patches of every open PR that touches either home (#26804,
#26831, #26916): none touches a moved family.
- The S2–S4 AST pass, with a heading comment marking the S5 section in
each catalogue.
- **No runtime change.** `lookupString` already asks the table first and
the namespace second, so `t` / `tFormat` / `tOptional` and every call
site are untouched. No new source file, so the console chunk groups need
no change.
- **Readers.** Every non-test reader of a moved family is under
app-shell's `views/metadata-admin/` or `views/studio-design/`. None
calls `t()` at module scope. Every dynamic key
(`engine.studio.rules.event.${…}`, `engine.studio.pillar.${…}`,
`engine.studio.if.kind.${…}`, `engine.studio.access.explain.*.${…}`)
goes through `t()`. There is nothing to stop and report.
- **Main merged once** to pick up #26915, which added
`engine.pageBlockCanvas` rows to the namespace files. The merge was
clean, and the i18n gates and the namespace tests were re-run after it.
- **Changeset:** `.changeset/25922-studio-i18n-studio-previews.md`,
`@object-ui/i18n` patch.
- ⛔ Untouched: `ui/packages/i18n/src/locales/*.ts`, `ui/.github/**`,
root `ci.yml`, `engine.studio.inspector.*`, `engine.pageBlockCanvas.*`,
`engine.translationPreview.*`.
## Why
Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table
becomes one lazy `@object-ui/i18n` namespace, moved in slices.
## Tests
- **Pin widened:**
`inspectors/inspectorStrings.studioNamespace-25922.test.ts` gains floors
for `engine.studio.` as a whole (600), for `rules`, `interfaces` and
`designer`, and for each of the 19 preview families. Every key in each
family must resolve through `t()` to the namespace value in `en-US`,
`zh-CN` and `de-DE`.
- **zh preloads (forced edits).** Each suite below reads a moved S5 zh
row synchronously, so it now loads the `zh` catalogue first with a
top-level `await loadStudioCatalogue('zh')`. No assertion changed.
- 10 dom suites:
- in `metadata-admin/previews/`: `AppPreview.areas-11027`,
`DashboardPreview.i18nTitle-10847`,
`ScreenPreview.fieldProjection-11190`, `automationPreviews.i18n-10862`,
`previewStrings.i18n-10848`
- in `metadata-admin/`: `studio-locale.i18n`
- in `studio-design/`: `CreateItemDialog.notDerived-13389`,
`ObjectFormDesigner.dndAnnouncements-11802`,
`ObjectFormDesigner.roleDescription-11872`,
`StudioDesignSurface.interfacePolish`
- 2 unit suites: `studio-design/StudioDraftMark.test.ts` and
`studio-design/metadataError.authorRefusal-11785.test.ts`. Both are in
the `unit` project (`isolate: false`). Each passed in the full run only
because an earlier file had already loaded `zh`, and failed when run
alone.
- **AddFieldPopover rewritten (forced edit).**
`studio-design/AddFieldPopover.studioNamespace-25922.test.tsx` from
slice 1 contrasted the namespace with "a key still in the app-shell
table". No `engine.studio.*` key that this popover renders is left in
the table. The test now checks the same zh flow (English first, then
Chinese on the same mount) for the field labels, read from the namespace
directly, and for the chrome key `engine.studio.cancel`, read through
`t()`.
### The sweep
I delayed the `zh` loader in `namespaces/studio/index.ts` by 4000 ms
(`scripts/ablation-replace.mjs --hold`, restored byte-identical). Under
that delay I ran every app-shell test that names zh (437 files), then
each of the 54 unit-project files alone.
- **Before the fixes:** 12 files failed in the full run and 2 failed
when run alone.
- One of the 12 is `i18n/src/__tests__/studio-namespace-lazy.test.tsx`.
It fails by construction under the delay, because its `findByText` waits
1 s against a 4 s delay.
- The other 13 are the suites listed above.
- **All 13 come from S5 itself.** I checked out main's two homes, kept
main's versions of the 13 test files, and ran them under the same delay.
All 13 pass on main, so this sweep found no leftover from S1–S4.
- **After the fixes:**
- The 13 fixed files, the pin and the equivalence check pass with the
delay and at normal speed (`Tests 211 passed (211)` both times).
- The two unit suites pass alone, delayed and normal.
- After the merge, the new main test
`PageBlockCanvas.addListView-26794`, the pin and both `block-config`
tests pass under the delay.
## Acceptance notes
- **Every moved key resolves identically before and after.** This was a
one-off measurement and is not committed. I read the 596 + 596 base
values by AST from the table at `57820085`. I compared them with `t()`
and `tOptional()` on this branch, with `zh` resident: the base `en`
value in `en-US`, `en`, `de-DE` and `fr`, and the base `zh` value in
`zh-CN`, `zh` and `zh-TW`. Result: 4,172 lookups, 0 differing.
- **Ablations** (mutation landed by anchor count and blob, restored
byte-identical to `HEAD`):
- Removing the `?? studioString(key, locale)` arm from `lookupString`
turns 46 tests red: the pin's `t()` case for all 44 families, its
zh-only case, and the equivalence check. The equivalence check reports
4,172 of 4,172 lookups differing.
- Altering one moved zh row (`engine.actionPreview.empty`) makes the
equivalence check report exactly 3 differing lookups (`zh-CN`, `zh`,
`zh-TW`). The pin stays green, as designed.
- **Eager bundle:** not re-measured locally, as in S2–S4. CI's `Build &
E2E UI` measures it.
## Verification
At `1e3fed1d (the merge of main into the two slice commits)`.
<details><summary>Tests and gates</summary>
- `pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run
type-check`: VERDICT command-exit 0.
- `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` (0 `en` values changed) and `check:i18n-keys` all
exit 0, before and after the main merge. `check:new-line-citations`:
exit 0 (0 new citations). `node scripts/check-nul-bytes.mjs`: exit 0.
- Changed lines: 2,922 (+1,520 / −1,402) over 18 files, under the 3,000
threshold.
</details>
## Human Minimum
- [x] 1. No `packages/spec` change.
- [x] 2. No new names; the only new file is the changeset.
- [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 3217fc5 commit 49b5059
18 files changed
Lines changed: 1520 additions & 1402 deletions
File tree
- .changeset
- ui/packages
- app-shell/src/views
- metadata-admin
- inspectors
- previews
- studio-design
- 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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
57 | 81 | | |
58 | 82 | | |
59 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | | - | |
21 | | - | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
43 | | - | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
81 | | - | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
0 commit comments