Skip to content

feat(ui): the remaining Studio inspector strings and the package, form and editor strings move into the studio i18n namespace (#25922 slice S3) - #26815

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-n6i8le
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-n6i8le

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Part of #25922

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Studio 设计器表里剩余的 engine.inspector.*(223 键)以及全部 engine.packages.*、engine.form.*、engine.edit.* 从 app-shell 私有表搬进 @object-ui/i18n 的 studio 命名空间,共 en 551 键、zh 560 键(多出的 9 个 engine.packages.form.help.* 按原样保持仅 zh),文案一字未改,调用点不动。
  • 为什么改:执行 app-shell: a published library that is 66% Console product surface — retire the 67 zero-reference exports now, decide the split, and fold the second i18n table into @object-ui/i18n #25922 裁决 6431032267(Q2 = A,6431234244 维持),这是 (M) 的第 3 片(S3),派单 6447417545。
  • 风险与回滚:与前两片相同,zh 用户首次打开这些编辑器时标签先显示英文、zh 分片到达后同一挂载重渲染为中文;回滚即 revert 本 PR,行原样回到 app-shell。
  • 先看:ui/packages/i18n/src/namespaces/studio/zh.ts 末尾新加的 S3 段(含仅 zh 行的说明),再看 inspectors/inspectorStrings.studioNamespace-25922.test.ts 的四个新家族下限与仅 zh 断言。
  • 两分钟验证: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 S3 of the (M) item. Every remaining engine.inspector.* row and every engine.packages.*, engine.form.* and engine.edit.* row 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:

    family en zh
    engine.inspector.* (the rest after S2) 223 223
    engine.packages.* 133 142
    engine.form.* 98 98
    engine.edit.* 97 97
    total 551 560

    Same AST pass as S2 (each property with its leading comment block; a mixed group's comment moves only when the group's first row moves); a heading comment marks the S3 section in each catalogue. After this slice no engine.inspector.* row is left in the app-shell table.

  • zh-only rows stay zh-only. The nine engine.packages.form.help.* rows have no en entry, before and after: their English is the package schema's own .describe() sentence, read through tOptional. check:i18n-designer-parity already lists the family in ZH_ONLY_FAMILIES; the zh heading comment says why the rows have no en twin.

  • 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.

  • Readers. Every reader of the moved keys is in app-shell. All but one are Studio surfaces (metadata-admin, inspectors, previews, studio-design). The exception is views/RuntimeDraftBar.tsx (engine.edit.*). It sits outside Studio, but it reads its locale through useMetadataLocale(), which re-renders when the zh catalogue lands, the same path the Studio surfaces take. So it needs no await. Dynamic keys (engine.inspector.appNav.type.${…}, engine.packages.source.${…}, engine.inspector.view.type.${…}) all go through t().

  • Changeset: .changeset/25922-studio-i18n-editor-chrome.md, @object-ui/i18n patch.

  • ⛔ Untouched: ui/packages/i18n/src/locales/*.ts, ui/.github/**, root ci.yml, and every file PR test(app-shell): flowCanvasChip-11665 awaits the lazy studio zh catalogue before reading the tooltip #26800 owns (inspectorStrings.i18n-10804, the three FlowNodeInspector tests, datasetPickers.authorText-11161, FlowPreview.removeNode-11772, flow-problems.removalRefusal-11838, previewStrings.i18n-10848, metadataError.heldWidget-11910). None of them needed a preload for this slice.

Why

Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table becomes one lazy @object-ui/i18n namespace, moved in slices; S3 is the third row of #26593's slice table.

Tests

Widened:

  • ui/packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts: four new per-family floors (engine.inspector. 700, engine.packages. 120, engine.form. 90, engine.edit. 90, beside S2's six), so one family draining cannot hide behind another. Per family, the namespace carries every key in en and zh, and t() answers every key with the namespace's value in en-US, zh-CN and de-DE. New case: the engine.packages.form.help.* rows (at least 9) are absent from en, tOptional(k, 'zh-CN') returns the zh value, and tOptional(k, 'en-US') stays undefined.

Forced edits: the zh rows these suites assert synchronously now arrive in the lazily fetched chunk. Each suite makes zh resident with a top-level await loadStudioCatalogue('zh'); no assertion changed. All files are under ui/packages/app-shell/src/views/metadata-admin/:

  • 19 dom suites: AuditPanel.loadFailure, IconPickerWidget.unknownName-12531, PackageFormDialog (+ .helpTextI18n, .idDerive-11792), PackagesPage.installedApps-13356, ResourceEditPage.pickerLoadFailure / .referencesColumns-25916 / .referencesErrorState, SchemaForm.deDeveloperize-8218, datasource/DatasourceResourcePage.selectPlaceholderLocale-11252, inspectors/DashboardDefaultInspector, inspectors/FlowReferenceField.flag.i18n-10448, inspectors/HookDefaultInspector.flag.i18n-10448, inspectors/ReportDefaultInspector (+ .i18nTitle), inspectors/unknownValueFlag.i18n-9652, previews/previewStrings.i18n-10835, selector-placeholder.i18n.
  • 1 unit suite: artifact-locked-banner.i18n.test.ts. The unit project runs with isolate: false, so in the full run this suite passed only because an earlier file in the same worker had already loaded zh. Run alone, it failed. I found it by running each of the 34 unit-project tests that name a zh locale on its own; the other 33 pass alone.

Acceptance notes

  • Every moved key resolves identically before and after. This was a one-off measurement and is not committed. I read the 551 + 560 values by AST from the base table at f7c95cd1. I then compared them with t() and tOptional() on this branch after zh is resident. The en value was checked in en-US, en, de-DE and fr. The zh value was checked in zh-CN, zh and zh-TW. Each lookup checked both t() and tOptional(). The nine zh-only rows were also checked in en-US and de-DE, where t() must echo the key and tOptional() must return undefined, as before. That is 3,902 lookups, 0 differing.
  • Ablations (scripts/ablation-replace.mjs, mutation landed by anchor count and blob, restored byte-identical to HEAD):
    • With the ?? studioString(key, locale) arm removed from lookupString, 12 tests go red (11 in the pin across all ten families plus the zh-only case, and the equivalence check). The equivalence check reports 3,884 of 3,902 lookups differing. The 18 that hold are the zh-only rows in en-US and de-DE, whose expected answer is "not found" either way.
    • With one moved zh row altered (engine.edit.publish), the equivalence check reports exactly 3 differing lookups (zh-CN, zh, zh-TW). The pin stays green, as designed, because 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, which imports it statically. So the moved en rows sit behind the same import edge before and after, and 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.

Verification

All at 61332921.

Affected tests
  • Before the forced edits, under os-verify-lock, I ran 341 test files: every app-shell test naming a zh locale, every file naming one of the four families, the i18n namespace tests and the ui i18n script tests. 322 passed and 19 failed, all of them the zh-synchronous suites above.
  • After the edits, I reran the 21 touched or new files: Test Files 21 passed (21), Tests 205 passed (205), VERDICT command-exit 0.
  • Unit-project isolation loop: each of the 34 unit tests that name a zh locale, run alone, exits 0 after the artifact-locked-banner preload.
  • pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: VERDICT command-exit 0 (both tsconfigs in each package).
Gates
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 34 commands. Each exited 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 all exit 0, and check:i18n-drift reports 0 en values changed in the locale packs and in the designer table. check:new-line-citations: exit 0 (0 new citations). node scripts/check-nul-bytes.mjs: exit 0.
  • Changed lines: 2,770 (+1,454 / −1,316) over 25 files, under the 3,000 threshold.

Human Minimum

  • 1. No packages/spec change.
  • 2. No new names; the only new file is the changeset.
  • 3. No formatter ran; pnpm lint is CI's.
  • 4. One card slice, one branch off main, one pull request.
  • 5. Patch changeset with both declaration lines.
  • 6. n/a.
  • 7. No hand edits to generated or release-owned files.
  • 8. English.

Generated by Claude Code

…gine.form, engine.edit move into the studio namespace (#25922 slice S3)

551 en and 560 zh keys leave app-shell's designer table for
@object-ui/i18n/namespaces/studio, text unchanged; the nine zh-only
engine.packages.form.help rows move as zh-only and stay tOptional reads.
No call site changes.

Claude-Session: https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi
Co-authored-by: Claude <noreply@anthropic.com>
…ed, zh preloads

Twenty suites that assert the moved zh rows synchronously make the zh
catalogue resident first (one of them in the shared-graph unit project,
where it passed only when another file had loaded zh). The namespace pin
now covers the S3 families and the zh-only package help rows. Patch
changeset for @object-ui/i18n.

Claude-Session: https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

  • 改了什么:Studio 检查器余下的文案 key,以及 engine.packages / engine.form / engine.edit 三族(英文 551 个、中文 560 个),从 app-shell 私有表搬进 @object-ui/i18n 的懒加载 studio 命名空间;原文不变,调用处不变;9 个仅中文的 packages.form.help 仍只有中文、仍走可选查找。
  • 为什么改:执行裁决 6431032267 Q2 A(维护者「同意」,6431234244 维持);这是 S3,私有表再少约 1.3k 行。
  • 风险与回滚:中文首次打开相关页面时多一次懒加载;查找结果前后一致(3902 次查找 0 差异)。唯一在 Studio 外读这些 key 的 RuntimeDraftBar 经 useMetadataLocale 拉取命名空间并在加载后重渲染。revert 即可。
  • 先看:ui/packages/i18n/src/namespaces/studio/zh.ts 与 inspectorStrings.studioNamespace-25922.test.ts。
  • 两分钟验证:pin 按家族逐 key 比对中英两份,消融即红。
  • 需要你做的:无,席位落地。
  • 席位意见:席位独立复算:私有表删掉的 1275 条非空行全部原样出现在命名空间新增行里,0 条缺失。

席位核对

ACCEPT · seat domain:ui#1 · session_01JQwxbZeBv2y91towxasSUT · head 61332921 · 2026-10-27T17:42Z

  1. Shape: slice S3 of app-shell: a published library that is 66% Console product surface — retire the 67 zero-reference exports now, decide the split, and fold the second i18n table into @object-ui/i18n #25922 (Part of #25922); 25 files, +1454/−1316 (under the 3000-line threshold): rows out of metadata-admin/i18n.ts, into namespaces/studio/{en,zh}.ts; 20 test files gain the zh preload (19 DOM suites plus artifact-locked-banner.i18n, which had passed only by test order); the S2 pin widened to the S3 families; a patch changeset.
  2. Premise measured: the seat recomputed the move on the merge base f7c95cd1: every one of the 1275 distinct non-blank lines removed from i18n.ts is present verbatim in the namespace files' added lines (0 missing). The one reader outside the Studio views, RuntimeDraftBar.tsx, takes its locale from useMetadataLocale(), which calls useStudioCatalogue(locale) and re-renders when the catalogue lands (read on the head). Dev's equivalence run: 3,902 lookups, 0 differ; two ablations red, restored.
  3. Gates / check-runs: On head 61332921, 43 success · 9 skipped · 0 failed · 0 pending; mergeable_state: clean. Dev's local run: 34/34 derived gates exit 0, --ran 0 NOT-MEASURED.
  4. Accepted deviations: none. No file owned by test(app-shell): flowCanvasChip-11665 awaits the lazy studio zh catalogue before reading the tooltip #26800 (the S2 preload sweep) is touched.
  5. Out of scope: none filed. Skills-docs: none — strings move between homes, no metadata-protocol change.
  6. Landing: not Tier H; the seat readies and arms auto-merge. S4 (engine.studio.{access,if,data,rules,auto,settings} + ~450 lines of other engine.*) is dispatched after this merges; S7 (the ci.yml step) stays Tier H.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 17:44
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 17:44
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 4b59358 Oct 27, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-n6i8le branch October 27, 2026 18:32
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 40557448260 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (9/16) — 失败步骤: Run the ui tests (shard 9/16)

    × lists every key the spec ActionSchema declares 14ms
    FAIL   unit  packages/core/src/actions/__tests__/actionKeys.pin.test.ts > action key inventory (objectstack#4075 step 1) > lists every key the spec ActionSchema declares
      ↳ 失败原因: AssertionError: expected { missing: [ 'disabledReason' ], …(1) } to deeply equal { missing: [], stale: [] }
    
  • Test UI (2/16) — 失败步骤: Run the ui tests (shard 2/16)

    × zh-CN: the confirm and the toast name the label, not doc/NAME 538ms
    FAIL   dom  packages/app-shell/src/views/metadata-admin/ResourceEditPage.discardDraftLabel-12690.test.tsx > MetadataResourceEditPage — "Discard draft" names the item by its label (objectui#12690) > zh
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 7 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants