Skip to content

feat(ui): Studio inspector strings (page block, action, dataset, flow node, app nav, widget) move into the studio i18n namespace (#25922 slice S2) - #26780

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

维护者速读

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.

Affected tests
  • 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.
Gates
  • 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.

Human Minimum

  • 1. No packages/spec change.
  • 2. No new names beyond one test file.
  • 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

…p nav and widget strings move into the studio namespace (#25922 slice S2)

520 keys per language leave app-shell's designer table for
@object-ui/i18n/namespaces/studio, text unchanged; app-shell's lookup
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>
…preloads, both-homes extractor

The page block, action, dataset, flow node, app nav and widget suites that
assert zh synchronously make the zh catalogue resident first; the pageBlock
retirement gate reads its keys from both homes; a per-family pin holds t()
to the namespace value in en, zh and a fallback language. 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

Test UI (12/16) is red on 18f4d0f (job 122283922479, run 40530879800) in ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.pendingCountPulse-26471.test.tsx: the publish button read 「发布」 where 「发布 (2)」 was expected. That file is the queue-flake anchor tracked on #26647; it is not this PR's:

  • this diff touches nothing under ui/packages/plugin-chatbot;
  • the missing part is the (2) suffix, which comes from the asynchronously fetched pending-draft count (livePendingCount), not from a translation; the button's label is not one of the 520 moved engine.inspector.* keys;
  • the same file passes on this head locally (Tests 2 passed (2), VERDICT command-exit 0).

The failed job is re-run once. If it fails again, it comes back to this PR.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

  • 改了什么:Studio 检查器的 520 个文案 key(engine.inspector.{pageBlock,action,dataset,flowNode,appNav,widget},中英各一份)从 app-shell 的私有表搬进 @object-ui/i18n 的懒加载 studio 命名空间,原文不变,调用处不变。
  • 为什么改:执行裁决 6431032267 Q2 A(维护者「同意」,6431234244 维持);这是 S2,私有表再少约 1.1k 行。
  • 风险与回滚:中文首次打开 Studio 检查器时多一次懒加载;查找结果前后一致(3640 次查找 0 差异)。revert 即可。
  • 先看:ui/packages/i18n/src/namespaces/studio/zh.ts 与 inspectorStrings.studioNamespace-25922.test.ts。
  • 两分钟验证:新 pin 按家族逐 key 比对中英两份,消融即红。
  • 需要你做的:无,席位落地。
  • 席位意见:席位独立复算:私有表删掉的每一行 key 文本都原样出现在命名空间里,差异只有说明注释。

席位核对

ACCEPT · seat domain:ui#1 · session_01JQwxbZeBv2y91towxasSUT · head 18f4d0f6 · 2026-10-27T15:52Z

  1. Shape: slice S2 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); 14 files, +1309/−1160 (under the 3000-line threshold): rows out of metadata-admin/i18n.ts, into namespaces/studio/{en,zh}.ts; eight test files gain the zh preload or read both homes; one new pin; a patch changeset.
  2. Premise measured: the seat recomputed the move on the merge base: of the 1146 non-blank lines removed from i18n.ts, every key line is present verbatim in the namespace files' 1150 added lines; the only differences are section and cross-reference comments. Dev's equivalence run: 3,640 lookups, 0 differ; two ablations red, restored byte-identical.
  3. Gates / check-runs: on head 18f4d0f6, 43 success · 9 skipped · 0 failed (latest runs); mergeable_state: clean. Test UI (12/16) was red once in ChatbotEnhanced.pendingCountPulse-26471.test.tsx, the queue-flake anchor of Queue-flake anchor: packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.pendingCountPulse-26471.test.tsx #26647, outside this diff (the dev's comment 6446410989); the one re-run is green. Dev's local run: 34/34 derived gates exit 0, --ran 0 NOT-MEASURED.
  4. Accepted deviations: the console eager-closure budget was not measured locally; CI's Build & E2E UI measured it green on this head.
  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. S3 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 15:54
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 15:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 4485536 Oct 27, 2026
82 of 84 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-n6i8le branch October 27, 2026 16:22
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