Skip to content

Commit 7614f8f

Browse files
fix(plugin-chatbot): name the dataset and permission build groups (#27466)
<!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8TJHsLPCDr4wM4gWFK4ALdG)_ Fixes #27419 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:AI 搭建进度面板给「数据集」「权限」两组起了名字,十种语言都加了;以后再出现没起名的类型,一律显示「其他」,不再露出英文类型名。 - 为什么改:中文界面搭建时出现「dataset 项目」「permission …」,两个英文词夹在中文里,「permission」看着像报错,正落在首次搭建最显眼的那 15–30 秒。 - 风险与回滚:只是显示文字,不碰数据与搭建流程;回滚即 revert 本 PR。 - 先看:`ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx` 的 `useBuildGroupLabel`(新增两个分支,default 改为「其他」),`ui/packages/i18n/src/locales/zh.ts` 的 `chatbot.build.group`。 - 两分钟验证:`pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/buildGroupLabel-27419.test.tsx`,预期 4 个用例全绿。 - 需要你做的:无,席位落地。 ## What changes - `useBuildGroupLabel` (plugin-chatbot `ChatbotEnhanced.tsx`) gains two static cases, `dataset` and `permission`, and its `default` arm now answers `chatbot.build.group.other` ("Other") instead of the raw type id. The lookup stays a static switch, so `check-i18n-call-site-keys` still sees every key. - `@object-ui/i18n`: the `chatbot.build.group` block in all ten locales (ar, de, en, es, fr, ja, ko, pt, ru, zh) gains `dataset`, `permission` and `other`. zh reads 数据集 / 权限 / 其他, en `Datasets` / `Permissions` / `Other`; the other eight reuse each pack's existing word for dataset, permission and other, in the plural form the five existing headings use. - One patch changeset for `@object-ui/plugin-chatbot` and `@object-ui/i18n`. ## Why The seat ruling on the card picked "name them": the build really stages datasets and permission sets, so hiding them would make the progress list disagree with what lands in the app. ## Tests - New pin `buildGroupLabel-27419.test.tsx`: renders one build frame carrying an artifact of each of the seven staged types (object, view, dashboard, app, seed, dataset, permission) plus one unnamed type (`flow`), in zh and en, and asserts every heading is the pack's word, that no heading equals its raw type id, and that the unnamed type falls to "Other". The staged set is not a type union in this repository (`ChatBuildProgress.items` types `type` as a free string, and cloud's `apply_blueprint` produces it), so the seven are the types a real build was observed to stage. - `buildPanelI18n-7388.test.tsx`: its case "an unknown artifact type still renders its raw type" pinned exactly the behaviour this card retires. It now asserts 其他 and that `flow` does not render, keeping its no-raw-key half. The ui seat approved this file as a surface addition. - Ablation, run on the committed fix with `scripts/ablation-replace.mjs` (anchor hit 1 → 0, restore verified blob equals HEAD): restoring `default: return type` reds 3 cases (both locales of the pin's unnamed-type case and the 7388 case); restored, all 18 pass. ## Acceptance notes - Headings stay grouped by type. Two unnamed types in one build would show two "Other" rows; merging them would change the grouping the panel links artifacts by and is outside the ruling, so it is left as is. - de uses „Datensätze“ to match the pack's existing `dataset` word (Datensatz). ## Verification Run on head `058d9fc0` (the closure was built first with `pnpm --filter '@object-ui/plugin-chatbot^...' build`): <details><summary>Package suites and type-check</summary> - `pnpm --dir ui exec vitest run packages/plugin-chatbot/ packages/i18n/`: exit 0, Test Files 178 passed, Tests 2205 passed and 13 skipped. - `pnpm --filter @object-ui/plugin-chatbot --filter @object-ui/i18n run type-check`: exit 0 for both. - `pnpm --dir ui run check:i18n-keys`: exit 0. `pnpm --dir ui run check:new-line-citations`: exit 0, 0 new citations. - eslint on the changed files: exit 0, 0 errors; the 11 warnings sit on pre-existing lines of `ChatbotEnhanced.tsx` outside this diff. </details> <details><summary>Derived gates</summary> All 34 families `dispatch-gates --commands` derived from this diff ran, each exit captured before any pipe; `dispatch-gates --ran` reconciles 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN. - `node scripts/check-adr-0087-registration.mjs --base origin/main` :: exit 0 - `node scripts/check-adr-0087-registration.mjs --self-test` :: exit 0 - `node scripts/check-changeset-no-major.mjs --base origin/main` :: exit 0 - `node scripts/check-closing-keyword-parity.mjs` :: exit 0 - `node scripts/check-closing-keyword-parity.mjs --self-test` :: exit 0 - `node scripts/check-comment-mask-corpus.mjs` :: exit 0 - `node scripts/check-empty-changeset.mjs --base origin/main` :: exit 0 - `node scripts/check-empty-changeset.mjs --self-test` :: exit 0 - `node scripts/check-sdui-manifest.mjs` :: exit 0 - `node scripts/check-sdui-manifest.mjs --self-test` :: exit 0 - `node scripts/pm/release-rehearsal-clone.mjs --self-test` :: exit 0 - `node scripts/release-pending-publish.mjs --self-test` :: exit 0 - `pnpm --dir ui exec vitest run scripts/` :: exit 0 - `pnpm --filter @objectstack/spec run check:duration-unit-keys` :: exit 0 - `pnpm check:changeset-gate-self-tests` :: exit 0 - `pnpm check:closed-ceremony-text` :: exit 0 - `pnpm check:cross-package-test-inputs` :: exit 0 - `pnpm check:dispatcher-error-vocabulary` :: exit 0 - `pnpm check:driver-memory-census` :: exit 0 - `pnpm check:engine-double-contract` :: exit 0 - `pnpm check:gitlink-declared` :: exit 0 - `pnpm check:nul-bytes` :: exit 0 - `pnpm check:pm-changeset-deadline-census` :: exit 0 - `pnpm check:published-files` :: exit 0 - `pnpm check:query-options-erasure` :: exit 0 - `pnpm check:refd-timer-probe` :: exit 0 - `pnpm check:skill-identifier-liveness` :: exit 0 - `pnpm check:test-source-alias` :: exit 0 - `pnpm check:tier-file-adoption` :: exit 0 - `pnpm check:type-check-coverage` :: exit 0 - `pnpm check:type-check-debt` :: exit 0 - `pnpm check:undeclared-dep-imports` :: exit 0 - `pnpm check:watch-hint-literal` :: exit 0 - `pnpm check:where-matcher` :: exit 0 </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (changed files; the full run is CI's) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. --- _Generated by [Claude Code](https://claude.ai/code/session_01JQwxbWVHoU8bjSDpWtgkzZ)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 38bab22 commit 7614f8f

14 files changed

Lines changed: 111 additions & 8 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(plugin-chatbot): the AI build progress panel names its dataset and permission groups
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
During an AI build the progress panel heads each group of staged artifacts with a translated name. Two groups, datasets and permissions, had no name in the language packs, so the panel printed their raw type ids (`dataset`, `permission`) in the middle of an otherwise translated list. They now read 「数据集」/「权限」 in Chinese and `Datasets` / `Permissions` in English, with the matching word in every other shipped locale. An artifact type the panel has no name for is now headed by a neutral `Other` (「其他」) instead of its type id. `@object-ui/i18n` gains the three `chatbot.build.group` keys (`dataset`, `permission`, `other`) in all ten locales.

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4064,6 +4064,9 @@ const ar = {
40644064
dashboard: "لوحات المعلومات",
40654065
app: "التطبيق",
40664066
seed: "بيانات تجريبية",
4067+
dataset: "مجموعات البيانات",
4068+
permission: "الأذونات",
4069+
other: "أخرى",
40674070
},
40684071
moreArtifacts: "+{{n}} أخرى",
40694072
verifying: "جارٍ التحقق من التغيير…",

‎ui/packages/i18n/src/locales/de.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3763,6 +3763,9 @@ const de = {
37633763
dashboard: "Dashboards",
37643764
app: "App",
37653765
seed: "Beispieldaten",
3766+
dataset: "Datensätze",
3767+
permission: "Berechtigungen",
3768+
other: "Sonstiges",
37663769
},
37673770
moreArtifacts: "+{{n}} weitere",
37683771
verifying: "Änderung wird geprüft…",

‎ui/packages/i18n/src/locales/en.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4524,6 +4524,9 @@ const en = {
45244524
dashboard: 'Dashboards',
45254525
app: 'App',
45264526
seed: 'Sample data',
4527+
dataset: 'Datasets',
4528+
permission: 'Permissions',
4529+
other: 'Other',
45274530
},
45284531
moreArtifacts: '+{{n}} more',
45294532
verifying: 'Checking the change…',

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,6 +3839,9 @@ const es = {
38393839
dashboard: "Paneles",
38403840
app: "Aplicación",
38413841
seed: "Datos de ejemplo",
3842+
dataset: "Conjuntos de datos",
3843+
permission: "Permisos",
3844+
other: "Otros",
38423845
},
38433846
moreArtifacts: "+{{n}} más",
38443847
verifying: "Comprobando el cambio…",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3835,6 +3835,9 @@ const fr = {
38353835
dashboard: "Tableaux de bord",
38363836
app: "Application",
38373837
seed: "Données d’exemple",
3838+
dataset: "Jeux de données",
3839+
permission: "Autorisations",
3840+
other: "Autres",
38383841
},
38393842
moreArtifacts: "+{{n}} autres",
38403843
verifying: "Vérification de la modification…",

‎ui/packages/i18n/src/locales/ja.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,6 +3765,9 @@ const ja = {
37653765
dashboard: "ダッシュボード",
37663766
app: "アプリ",
37673767
seed: "サンプルデータ",
3768+
dataset: "データセット",
3769+
permission: "権限",
3770+
other: "その他",
37683771
},
37693772
moreArtifacts: "他 {{n}} 件",
37703773
verifying: "変更を確認しています…",

‎ui/packages/i18n/src/locales/ko.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,6 +3762,9 @@ const ko = {
37623762
dashboard: "대시보드",
37633763
app: "앱",
37643764
seed: "샘플 데이터",
3765+
dataset: "데이터 세트",
3766+
permission: "권한",
3767+
other: "기타",
37653768
},
37663769
moreArtifacts: "외 {{n}}개",
37673770
verifying: "변경 사항 확인 중…",

‎ui/packages/i18n/src/locales/pt.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3834,6 +3834,9 @@ const pt = {
38343834
dashboard: "Painéis",
38353835
app: "Aplicativo",
38363836
seed: "Dados de exemplo",
3837+
dataset: "Conjuntos de dados",
3838+
permission: "Permissões",
3839+
other: "Outros",
38373840
},
38383841
moreArtifacts: "+{{n}} mais",
38393842
verifying: "Verificando a alteração…",

‎ui/packages/i18n/src/locales/ru.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3924,6 +3924,9 @@ const ru = {
39243924
dashboard: "Дашборды",
39253925
app: "Приложение",
39263926
seed: "Демоданные",
3927+
dataset: "Наборы данных",
3928+
permission: "Разрешения",
3929+
other: "Другое",
39273930
},
39283931
moreArtifacts: "ещё {{n}}",
39293932
verifying: "Проверка изменения…",

0 commit comments

Comments
 (0)