Skip to content

feat(ui): the flow designer and the rest of the Studio chrome move into the studio i18n namespace (#25922 slice S6) - #27023

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

objectstack-fleet[bot] merged 5 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

维护者速读

  • 改了什么:app-shell 设计器私有表里除 engine.translationPreview.* 之外的全部剩余行(流程设计器各族、页面区块画布、文档与书预览、engine.studio.inspector 及其余 Studio 界面文案,共 44 族,en 538 键、zh 583 键),搬进 @object-ui/i18n 的 studio 命名空间,文案一字未改,调用点不动;engine.flowNode.*、engine.enum.* 两族照旧仅 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) 的第 6 片(S6),派单 6457069488;之后表里只剩 22 行 translationPreview,S7 再删表。
  • 风险与回滚:与前几片相同,zh 用户首次打开这些页面时标签先显示英文、zh 分片到达后同一挂载重渲染为中文;回滚即 revert 本 PR。
  • 先看:ui/packages/i18n/src/namespaces/studio/zh.ts 末尾的 S6 段(含仅 zh 两族的说明),再看钉测试新增的 44 个家族下限与三个仅 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

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 a floor for each of the 44 S6 families (86 families in all). Every key in each family must resolve through t() to the namespace value in en-US, zh-CN and de-DE. The zh-only case now covers three families (engine.packages.form.help., engine.flowNode., engine.enum.). For each, the rows are absent from en, tOptional in zh-CN returns the zh value, and tOptional in en-US stays undefined.
  • zh preloads (forced edits). Each suite below reads a moved S6 zh row synchronously, so it now loads the zh catalogue first with a top-level await loadStudioCatalogue('zh'). No assertion changed.
    • 9 dom suites:
      • in metadata-admin/: CelPredicateField.i18n-10862-s2
      • in metadata-admin/inspectors/: FlowNodeInspector.nodeTypeOptions-11778
      • in metadata-admin/previews/: AppNavCanvas.labelMaps-11128, AppNavCanvas.untitledCard-11862, DocPreview, FlowPreview.headerPills-11779, NodePalette, flowNodeLabels-13200
      • in studio-design/: ObjectListViewInspector.displayTitle-13151
    • 3 unit suites: metadata-admin/flowNodePaletteI18n.test.ts, previews/FlowRunsPanel.test.ts and previews/flow-problems.repeatedEdge-11772.test.ts. All three 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.

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 or a moved key, plus the i18n namespace and script tests (458 files). Then I ran each of the 50 unit-project files alone.

  • Before the fixes: 11 files failed in the full run and 3 failed when run alone.
    • i18n/src/__tests__/studio-namespace-lazy.test.tsx fails by construction under the delay, because its findByText waits 1 s against a 4 s delay.
    • scripts/__tests__/check-i18n-designer-table-parity.test.ts failed because of the moved citation anchor described above, not because of the delay.
    • The other 12 are the suites listed above.
  • All 12 come from S6 itself. I checked out main's three homes and main's versions of the 12 test files and ran them under the same delay. All 12 pass on main, so this sweep found no leftover from S1–S5.
  • After the fixes: the 12 suites, the pin, the parity test and the equivalence check pass at normal speed (Tests 305 passed (305)). The dom suites and those three pass under the delay too (Tests 271 passed (271)). The three unit suites pass alone, both delayed and at normal speed.
  • After the merge: after each of the two main merges, I ran under the delay every test file those merges added or changed in ui (6 after the first merge, 21 after the second), together with the pin, the parity test, both block-config-i18n tests and the equivalence check. Last run: Tests 501 passed (501). The equivalence check still reports 4,235 lookups, 0 differing.

Acceptance notes

  • With the table nearly empty, every lookup resolves as before. This was a one-off measurement and is not committed. I read all 560 en and 605 zh rows of the base table at 49b50591 by AST, which includes the 22 + 22 engine.translationPreview.* rows that stay. I compared each with t() and tOptional() on this branch, with zh resident:

    • the base en value in en-US, en, de-DE and fr;
    • the base zh value in zh-CN, zh and zh-TW;
    • for the 45 zh-only rows, in en-US and de-DE, t() must echo the key and tOptional() must return undefined;
    • translateNodeLabel / translateNodeHint for every engine.flowNode.* row (the zh value in zh-CN, the caller's fallback in en-US), and translateEnumOption for every engine.enum.* row (the zh value in zh-CN, the raw value in en-US).

    Result: 4,235 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 90 tests red: the pin's t() case for all 86 families, its three zh-only cases, and the equivalence check. The equivalence check reports 3,946 of 4,235 lookups differing. The 289 that hold are the 154 engine.translationPreview.* lookups the table still serves, plus the 135 en-side zh-only lookups, whose expected answer is "not found" or the fallback either way.
    • Altering one moved zh row (engine.flowNode.start.label) makes the equivalence check report exactly 4 differing lookups (zh-CN, zh, zh-TW and translateNodeLabel in zh-CN). The pin stays green, as designed.
  • Eager bundle: not re-measured locally, as in S2–S5. CI's Build & E2E UI measures it.

Verification

At b94ef650 (the second main merge).

Tests and gates
  • 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 176 passed | 2 skipped (178)). --ran: 34 derived, 34 run, 0 NOT-MEASURED. I also ran the same 34 after the first merge, all exit 0, and re-derived after the second merge: the same 34 commands.
  • 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 each merge. check:new-line-citations: exit 0 (0 new citations). node scripts/check-nul-bytes.mjs: exit 0.
  • Changed lines: 2,816 (+1,473 / −1,343) over 17 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

…space

Every remaining ENGINE_STRINGS_EN / ENGINE_STRINGS_ZH row except
engine.translationPreview.* (538 en, 583 zh; the engine.flowNode.* and
engine.enum.* rows stay zh-only) moves to @object-ui/i18n's studio
namespace, text unchanged. lookupString already asks the table first and
the namespace second, so no call site changes.

Claude-Session: https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi
Co-authored-by: Claude <noreply@anthropic.com>
…re suites read it

The namespace pin gains a floor per moved family and asserts the
engine.flowNode.* and engine.enum.* rows stay zh-only. Twelve suites that
read a moved zh row synchronously load the zh catalogue first. The
translateNodeLabel doc keeps the anchor the designer-parity gate cites
for the zh-only flowNode family, now that the rows' own comment moved.

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 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · seat domain:ui#1 · session_01JQwxbZeBv2y91towxasSUT · head b94ef650 · 2026-10-28T02:18Z

席位意见:第六片把设计器私有表里除 engine.translationPreview.* 外的全部行原样搬进 studio 命名空间。席位用自己的搬移校验逐键核对:增删相等、值不变、无重复归属。

  1. Shape: Part of #25922 (S6); 17 files, +1473/−1343 (2,816 changed lines, under the 3000-line threshold). Source: metadata-admin/i18n.ts (rows out, one doc sentence carried onto translateNodeLabel), namespaces/studio/en.ts +682 and zh.ts +649. 13 test files gain a loadStudioCatalogue('zh') preload (+5 or +7 lines each), and inspectorStrings.studioNamespace-25922 is extended (+65/−13). A patch changeset for @object-ui/i18n (Clause-②: no).
  2. Premise measured: the seat ran its own move proof (moveproof.mjs: brace-matched parse of ENGINE_STRINGS_EN/ZH and STUDIO_EN/ZH at merge base 7eb613c3 and the head). en: 538 removed, 538 added, 0 in both homes, 0 values differing. zh: 583 removed, 583 added, 0 / 0. The table at the head holds only the 22 + 22 engine.translationPreview.* rows, which stay out while feat(spec): a hook declares its refusal catalogue, and its body refuses by code, answered in the caller's language #26831 is open, as ordered. engine.flowNode.* and engine.enum.* stay zh-only, as before. The only non-row hunk in i18n.ts moves the ZH_ONLY_FAMILIES citation sentence onto translateNodeLabel's doc, and the parity gate is untouched. The test edits are preload-only. Dev: 4,235 lookups equivalent over all base rows plus the dynamic node/enum helpers, 0 differing; both ablations as expected; a delayed sweep found 12 S6-exposed racers, all preloaded.
  3. Gates / check-runs: PR check-runs on b94ef650: 43 success, 10 skipped, 0 failure; mergeable_state clean. Dev's local run: type-check and 34 derived gates exit 0 after the second origin/main merge.
  4. Accepted deviations: none. The slice took every remaining family, so nothing is deferred to S7, and S7 is now the Tier H ci.yml item alone.
  5. Out of scope: PR fix(metadata-protocol,runtime,app-shell)!: refuse a save or draft publish naming a package that is not installed #26920 (another lane) adds engine.studio.notFound.* rows to the table, so whichever of the two lands second resolves a conflict. If fix(metadata-protocol,runtime,app-shell)!: refuse a save or draft publish naming a package that is not installed #26920 lands second, its rows belong in studio/en.ts and zh.ts. Skills-docs: none — string moves only.
  6. Landing: not Tier H; the seat readies and arms auto-merge.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 28, 2026 02:19
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 28, 2026 02:19
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit f708cf2 Oct 28, 2026
54 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-n6i8le branch October 28, 2026 03:46
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