Skip to content

fix(app-shell): zh-CN Studio first screens stop mixing English in the package form, flow rail groups and column picker - #29773

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-ldzdax
Nov 3, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-ldzdax

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #29706

Clause-②: no
Metadata-protocol: none

The two lines are the amended claim's (comment on the card, 2026-11-03T02:55Z).

维护者速读

  • 改了什么:中文 Studio 的三处首屏不再夹英文。新建软件包表单在中文词表加载后重建,标签和说明都是中文;自动化侧栏里尚未发布的对象,其流程分组显示对象标签(如「维修工单」),不再显示大写的机器名;列表视图的「添加字段」先列搭建者自己的字段,再列系统字段(创建时间、创建人、所有人等)。
  • 为什么改:这些是中文用户最先看到的界面,中英混杂让人分不清哪些字可以忽略。卡上的第一行(「新建类似」复制流程后的提示句)要服务端先给出代码,已移到服务端车道的卡 runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727,本 PR 不动它。
  • 风险与回滚:只改 app-shell 的三处读取与排序,不加不删 i18n 键,不动 spec 与 runtime。草稿对象多读一次草稿列表,失败时照旧只用已发布对象。回滚即撤销本 PR。
  • 先看:StudioDesignSurface.tsx 的 readObjectLabels(合并草稿对象的标签);PackageFormDialog.tsx 的表单 memo 依赖;ViewColumnPanes.tsx 的 AddFieldPopover 排序。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PackageFormDialog.lazyCatalogue-29706.test.tsx packages/app-shell/src/views/studio-design/StudioDesignSurface.draftObjectFlowGroup-29706.test.tsx packages/app-shell/src/views/metadata-admin/previews/FieldsListEditor.addFieldOrder-29706.test.tsx,预期 3 个文件 6 个用例全过(任一修复撤回时对应用例转红)。
  • 需要你做的:无,席位落地。

What changes

The card's four rows were re-measured on main 7b55ea9 in zh-CN, and all four reproduced. Rows 2 to 4 are fixed here. Row 1 moved to its own card (below).

  • Row 1, the New similar clone notice: moved to runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727, not changed here. The flow clone answer is {flow, packageId, notice} with no code, and the console prints notice as sent. The repo's pattern for a server sentence a person reads is code-keyed: the console maps a code it knows to an i18n key and keeps the wire text for any other code (translateFailureCode in CloudConnectionPanel.tsx; the publish refusal's BATCH_ABORTED_CODE line in StudioDesignSurface.tsx). The notice has no code yet, so the first step is server-side (packages/runtime), which is out of this card's surface. runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727 covers the flow and permission-set clone notices and the console mapping that follows the code.
  • Row 2, the New package form (PackageFormDialog.tsx). Studio's landing mounts the dialog closed, before the lazily fetched zh studio catalogue is resident. The form spec (labels and help lines, getPackageForm) was memoised on [locale, mode], so the en answer of the first render survived the catalogue's arrival, while the title, read on every render, turned Chinese: 新建软件包 over "Display name" and "Human-readable package name". The memo now also keys on isStudioCatalogueLoaded(locale), so the form is rebuilt once the catalogue lands. Once rebuilt, zh no longer falls through to the spec's .describe() text; en still does, by design (add10d8f9).
  • Row 3, the Automations rail (StudioDesignSurface.tsx, readObjectLabels only). The rail's object index read the published objects only, so a flow started on an object not published yet was grouped under the object's name, which the header's uppercase style showed as REPAIRS_REPAIR_TICKET. The index now merges the package's object drafts (listDrafts({ packageId, type: 'object' }), unscoped in the package-less scope) with the label each _drafts row carries, resolved in the designer locale. A published object keeps its published label. A failed draft read adds nothing and leaves the published index as it was.
  • Row 4, the column picker (ViewColumnPanes.tsx, AddFieldPopover). The served object puts the columns applySystemFields injects ahead of the author's field map. Measured on @objectstack/objectql's applySystemFields for an object declaring title and priority: organization_id, created_at, created_by, updated_at, updated_by, owner_id, owning_business_unit_id, queue, title, priority. The list-view inspector already drops the hidden ones, but the audit four and owner_id stayed on top. The picker now lists the builder's fields first and the system ones after, each in served order. The same popover serves the report inspector's columns.
  • No i18n key is added or removed, and nothing under packages/spec or packages/runtime changes.

Tests

Three new files, one per kept row, each over the real component, each with a CONTROL case.

  • PackageFormDialog.lazyCatalogue-29706.test.tsx. Mounts the real PackageFormDialog closed under an I18nProvider in zh with the studio catalogue NOT resident (asserted first; the dom project isolates each file), lands the catalogue, then opens it, as Studio's landing does. The labels and help read 显示名称 / 软件包的可读名称。 and neither "Display name" nor the spec's .describe() text appears (read from the installed ManifestSchema). CONTROL: an en console mounted the same way keeps the spec's own English help.
  • StudioDesignSurface.draftObjectFlowGroup-29706.test.tsx. The whole surface at /studio/PKG/automations (harness of automationsRailOrder-12612): one published object, one draft-only object whose _drafts header carries 维修工单, one flow on each. The draft object's group reads 维修工单 and not its machine name. CONTROL: the published object's group reads its published label.
  • FieldsListEditor.addFieldOrder-29706.test.tsx. The real FieldsListEditor and its Add field popover over a catalog in the measured served order (audit four and owner_id first). The picker lists title, priority, then the system columns in served order. CONTROL: a catalog with no system column keeps its served order.
  • Ablations, one per row (scripts/ablation-replace.mjs, fix committed first, each mutation counted on disk and restored to the HEAD blob with git diff HEAD empty): memo deps back to [locale, mode]; the draft read replaced by an empty answer; the picker order back to [...fields]. Each turns exactly its row's case red and leaves the CONTROL green.

Acceptance notes

  • Row 1 went to runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727 (filed by the seat for the server lane). This PR leaves the clone notice as it is.
  • Measured live, before and after, in zh-CN (app-crm --fresh backend plus the Vite console on source; before = the three origin/main source files swapped in, restored to HEAD after): the rail header read REPAIRS_REPAIR_TICKET before and 维修工单 after; the New package form's first labels read "Display name", "Description", 软件包 ID, "Object namespace" before and 显示名称, 描述, 软件包 ID, 对象命名空间 after; the column picker read 创建时间, 创建人, 更新时间, 更新人, 负责人, 标题, 优先级 before and 标题, 优先级, then the five system columns after. Screenshots are in the project's issue-29706/ folder (before-row*.png, after-row*.png). The harness was temporary and nothing of it is committed.
  • Seen on the same screens, not changed here (outside this card's surface): the filter builder's "+ Add filter…" in the Interfaces list-view panel renders in English in zh-CN; the package form's Type select shows the raw value app; the dialog's screen-reader "Close" label is English. Noted for triage.
  • After merging main (the pinyin create-door card landed in PackageFormDialog.tsx and StudioDesignSurface.tsx), the touched suites, the app-shell type-check and the three new files were re-run on the merged head.

Verification

Final head f9fd4b39 (merge of origin/main 3eeb81d); code head a346e17.

Tests
  • The 3 new files: 3 files, 6 tests passed (merged head).
  • Every app-shell test naming PackageFormDialog, ViewColumnPanes, FieldsListEditor, AddFieldPopover, BuilderLanding or the Automations rail (125 files, code head a346e17's tree, --maxWorkers=2, three batches): 125 files, 1080 tests passed. On the merged head, the 36 that name the touched components plus the two rail suites: 38 files, 304 tests passed.
  • pnpm exec turbo run type-check --filter=@object-ui/app-shell: 65 of 65 tasks successful (merged head).
  • pnpm exec eslint over the six touched ui files: 0 errors (existing warnings only).
  • pnpm --dir ui exec vitest run scripts/: 170 files passed, 2 skipped; 4977 tests passed.
  • pnpm --dir ui check:new-line-citations: 0 new citations.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 35 derived families (unchanged by the merge). The 34 non-vitest ones ran in one loop on a346e17 and all exited 0, including check-sdui-manifest.mjs and its --self-test, check-changeset-no-major, check-adr-0087-registration, check-empty-changeset, check:published-files, check:type-check-debt (locked) and check:cross-package-test-inputs; the 35th, pnpm --dir ui exec vitest run scripts/, is the run above. The body-reading gates were re-run on this body before opening.
  • scripts/pm/clause2-line.mjs reads the changeset as Clause-②: no and Metadata-protocol: none, matching the amended claim. No i18n key and no export changes.
  • Dogfood battery: n/a, because there is no ! in the title and no (narrowing) arm.

Generated by Claude Code

…roups and column picker in the builder's terms

The New package form rebuilds once the lazy studio catalogue lands, the
Automations rail labels a draft object's flow group with its label, and the
column picker lists the builder's own fields before the system ones.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRdVLGVEbfCX4asHX1
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB

席位核对 — ACCEPT · domain:ui#5 · head f9fd4b39 · 2026-11-03T04:19Z

  • 形态: draft PR on main. The body has Fixes #29706 and no other card number next to a closing keyword. 7 files, +357/−5, Tier S: check-governed-merges --pr 29773 finds no governed path and 362 lines. The body carries 维护者速读 and both declaration lines (Clause-②: no, Metadata-protocol: none), which match the claim amendment and the changeset .changeset/29706-zh-studio-first-screens.md.
  • 前提实测: the dev reproduced all four rows at 7b55ea95 in zh-CN, with before and after screenshots per row in issue-29706/. Row 1, the clone notice, needs a runtime code. The seat's amendment moved it to runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727 (server lane), and the body names that card. Rows 2 to 4 are fixed here.
  • diff read:
    • PackageFormDialog.tsx: the form memo now also keys on isStudioCatalogueLoaded(locale), so a dialog mounted closed before the lazy zh catalogue lands rebuilds its labels once the catalogue arrives.
    • StudioDesignSurface.tsx readObjectLabels: the package's object drafts are read with the published list, through listDrafts with type: 'object'. A published object keeps its label, a draft adds only a name the published list lacks, and a failed draft read adds nothing and leaves the published index whole.
    • ViewColumnPanes.tsx AddFieldPopover: the builder's fields come first, then the system ones, each in served order. The query filter runs over the same order.
    • The dev reported a stray replace-all in usePackageNavTargets, reverted in a346e17d; the net diff there is zero (the file is not in the PR's list).
  • 门禁 check-runs (pinned to head f9fd4b390ac3ad1a0d2dacaec03b53b6b8cd7c6b): 44 success, 11 skipped, 0 failed, 0 pending (latest run per check); mergeable_state clean. Dev local: dispatch-gates 34/34 exit 0, sweep 125 files / 1080 tests, vitest run scripts/ 170 files, and post-merge 38 files / 304 tests. App-shell type-check is green. Three ablations, one per row, each red against its CONTROL.
  • Contract review: none owed. The diff touches none of the four contract faces: Clause-② is no with no narrowing, there is no packages/spec/src/** file and no governed rule text. Per contract-review.md 〈复核归属与资格〉, that means CI plus this seat's read. The changeset prose was checked sentence by sentence against the diff: "rebuilt once the catalogue lands", "draft objects … group reads the object's label", "builder's fields now come first … each in the order the object serves them".
  • 接受的偏差: none beyond the reverted replace-all.
  • 范围外去向: row 1 is runtime: the flow and permission-set "New similar" clone notices carry a code, so the Console can translate them (zh-CN shows English today) #29727 (domain:server, graded p1). The permission-set clone notice rides on it too.
  • 落地条款: no contract face, Tier S. Land by pr_ready + automerge_enable.

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/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio: zh-CN first screens stop mixing English: the clone notice, the new package form, the flow rail group

1 participant