Repository navigation
Commit 7614f8f
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
- .changeset
- ui/packages
- i18n/src/locales
- plugin-chatbot/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4064 | 4064 | | |
4065 | 4065 | | |
4066 | 4066 | | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
4067 | 4070 | | |
4068 | 4071 | | |
4069 | 4072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3763 | 3763 | | |
3764 | 3764 | | |
3765 | 3765 | | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
3766 | 3769 | | |
3767 | 3770 | | |
3768 | 3771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4524 | 4524 | | |
4525 | 4525 | | |
4526 | 4526 | | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
4527 | 4530 | | |
4528 | 4531 | | |
4529 | 4532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3839 | 3839 | | |
3840 | 3840 | | |
3841 | 3841 | | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
3842 | 3845 | | |
3843 | 3846 | | |
3844 | 3847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3835 | 3835 | | |
3836 | 3836 | | |
3837 | 3837 | | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
3838 | 3841 | | |
3839 | 3842 | | |
3840 | 3843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3765 | 3765 | | |
3766 | 3766 | | |
3767 | 3767 | | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
3768 | 3771 | | |
3769 | 3772 | | |
3770 | 3773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3762 | 3762 | | |
3763 | 3763 | | |
3764 | 3764 | | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
3765 | 3768 | | |
3766 | 3769 | | |
3767 | 3770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3834 | 3834 | | |
3835 | 3835 | | |
3836 | 3836 | | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
3837 | 3840 | | |
3838 | 3841 | | |
3839 | 3842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3924 | 3924 | | |
3925 | 3925 | | |
3926 | 3926 | | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
3927 | 3930 | | |
3928 | 3931 | | |
3929 | 3932 | | |
| |||
0 commit comments