Repository navigation
Commit 4d8095b
refactor(i18n, plugin-designer)!: retire the unread designer.versionHistory key (#29616)
domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbNE8dPMmLJuNbseKNWAA5ER)_
Part of #25921. This batch retires the `designer.versionHistory` i18n
key that #29529 (`389de4aa`) left with no reader when it deleted the
`VersionHistory` module from `@object-ui/plugin-designer`. It runs under
claim 6587895888. The umbrella stays open; nothing else it lists is
touched.
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:从十个语言包(ar、de、en、es、fr、ja、ko、pt、ru、zh)和设计器导出的英文兜底表
`DESIGNER_DEFAULT_TRANSLATIONS` 里删除 `designer.versionHistory` 这一条文案,共 11
行。
- 为什么改:#29529 已删除设计器的“版本历史”面板,这条文案从此没有任何界面读取,留着只会让翻译人员继续维护它,也让死键检查一直报它。
- 风险与回滚:界面不变,因为没有页面显示这条文案。对外只影响 TypeScript:导出的 `TranslationKeys`
类型少了这个键,外部若引用会编译报错;导出的兜底表读这一行会得到 undefined。changeset 为两个包写明了删掉引用即可。回滚即
revert 本 PR。
-
先看:`ui/packages/i18n/src/locales/en.ts`(类型来源)、`ui/packages/plugin-designer/src/hooks/useDesignerTranslation.ts`、`.changeset/25921-designer-version-history-key.md`。
- 两分钟验证:`git grep -n "designer.versionHistory" -- ui
':!**/CHANGELOG.md'`,预期无输出(退出码 1)。
- 需要你做的:无,席位落地(入队前欠一次契约复审档复审,由席位转总监)。
## What changes
- `ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt,ru,zh}.ts`: the
`versionHistory` entry under `designer` is deleted (one line each).
`designer.undo`, `designer.redo` and `designer.canvasMinimap` stay.
- `ui/packages/plugin-designer/src/hooks/useDesignerTranslation.ts`: the
`'designer.versionHistory'` row leaves `DESIGNER_DEFAULT_TRANSLATIONS`.
The map is exported from the package entry (`src/index.tsx`) and
app-shell's mirror gate imports it, so a read of that row now yields
`undefined`; the map's type is unchanged.
- `.changeset/25921-designer-version-history-key.md`: `@object-ui/i18n`
and `@object-ui/plugin-designer` patch, BREAKING (TypeScript only for
i18n; the plugin-designer sentence names the exported map's lost row and
#29529 as the predecessor), with the ADR-0087 marker `not-required
(runtime-interface-only
ui/packages/i18n/src/locales/en.ts#TranslationKeys)` beside a `| Removed
key | Replacement |` table whose replacement is "none".
## Tests
No test file changes. Neither i18n pin moves:
`dead-key-batch-retired-4730.test.ts` does not list the key in its
SURVIVING list, and the de value "Versionsverlauf" carries no quote
pair, so the `de-quote-pairing-3876.test.ts` census is unchanged.
## Acceptance notes
- **No reader remains.** On `origin/main` `50e35a28`, `git grep -n
versionHistory -- ui ':!**/CHANGELOG.md'` found the 11 definitions above
plus `ui/packages/types/src/designer.ts:1416`
(`CollaborationConfig.versionHistory?: boolean`, a different symbol, not
an i18n key). There is no `t('designer.versionHistory')`, no `designer.`
template composition that could produce it (the only `designer.`
template is `designer.object.reqPerms.op.OP` in
`ObjectDefaultInspector.tsx`), and no test pin. After this PR the same
grep returns only the `types` line.
- **`CollaborationConfig.versionHistory`**
(`ui/packages/types/src/designer.ts:1416`) has no reader either. It is a
dead declared field, out of scope here and not filed (zero-pull,
carrier: none).
- **Seat 3's pending changeset**
`.changeset/25921-plugin-designer-dead-collaboration-version-history.md`
(from #29529, not yet released) says the key "stays in the locale packs
for now, with no reader". Once this lands, that sentence is outdated. It
is outside this PR's declared file surface, so it is left as is for the
seat to decide.
## Verification
Diff readings on head `1a4bf460`, tree `objectstack-ai/objectstack`.
<details><summary>Dead-key report, suites, type-check, reverse
check</summary>
- `node scripts/check-i18n-dead-keys.mjs` (from `ui/`): `origin/main`
4120 pack keys, 318 candidates, `designer.versionHistory` listed as
needs-review; this head 4119 pack keys, 317 candidates, key absent. Exit
0 both.
- Prereq: `pnpm turbo run build --filter=@object-ui/app-shell^...` :
64/64 tasks, exit 0.
- `pnpm --filter @object-ui/i18n test`: 95 files, 1443 passed, 13
skipped, exit 0.
- `pnpm --filter @object-ui/plugin-designer test`: 49 files, 456 passed,
exit 0.
- `vitest run
packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx`:
15 passed, exit 0.
- `type-check`: `@object-ui/i18n` exit 0, `@object-ui/plugin-designer`
exit 0, `@object-ui/app-shell` exit 0, `turbo run type-check
--filter=@object-ui/console` 71/71 tasks, exit 0.
- Reverse check: a temporary `app-shell/src/__probe.ts` reading
`TranslationKeys['designer']['versionHistory']` gives `TS2339: Property
'versionHistory' does not exist on type '{ readonly undo: "Undo";
readonly redo: "Redo"; readonly canvasMinimap: "Canvas minimap"; }'`;
the control line reading `canvasMinimap` compiles. Probe deleted.
</details>
<details><summary>Derived gates and dogfood battery</summary>
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `1a4bf460`: 28 commands, every one exit 0
(incl. `check-adr-0087-registration`, `check-changeset-no-major`,
`check-empty-changeset`, `check-closing-keyword-parity`,
`check-sdui-manifest` and their `--self-test`s, `check:published-files`,
`check:nul-bytes`, `vitest run scripts/` in `ui/` 170 passed, 2 skipped
files). `--ran`: 28 derived, 28 run, 0 NOT-MEASURED.
`check-partof-closing-keyword` on this body: exit 0.
- Dogfood battery on `8ad4e199` (closure `@objectstack/dogfood^...`
built, 68/68 tasks): VERDICT command-exit 0, Test Files 398 passed, 3
skipped (401), Tests 3280 passed, 28 skipped (3308), no failures.
- Head `9502086d` (contract-review fix: plugin-designer added to the
changeset) touches only the changeset; `check-adr-0087-registration`,
`check-changeset-no-major` and `check-empty-changeset` re-ran there, all
exit 0.
- Head `d3c179cd` only merges four `origin/main` commits outside this
diff (lint, runtime, spec permission). The derived list is unchanged;
the changeset, ADR-0087, closing-keyword, sdui-manifest and nul-byte
gates re-ran there, all exit 0.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jRTYHhqj3r6SiMnrkT)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 45b4922 commit 4d8095b
12 files changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | | - | |
1260 | 1259 | | |
1261 | 1260 | | |
1262 | 1261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | 1138 | | |
1140 | 1139 | | |
1141 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1861 | 1861 | | |
1862 | 1862 | | |
1863 | 1863 | | |
1864 | | - | |
1865 | 1864 | | |
1866 | 1865 | | |
1867 | 1866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | | - | |
1172 | 1171 | | |
1173 | 1172 | | |
1174 | 1173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
1167 | 1166 | | |
1168 | 1167 | | |
1169 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | 1138 | | |
1140 | 1139 | | |
1141 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | 1138 | | |
1140 | 1139 | | |
1141 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
1167 | 1166 | | |
1168 | 1167 | | |
1169 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
1201 | 1200 | | |
1202 | 1201 | | |
1203 | 1202 | | |
| |||
0 commit comments