Repository navigation
fix(app-shell): the publish sheet names a batch of hooks or translations in words, not the raw type code (#29902) - #30361
Merged
Conversation
…ons in words, not the raw type code Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZ2YeJynYaMx8rfBzM
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG Known red, not this PR's · Lint UI (job 127123295877). The failing step is |
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG 维护者速读
席位核对 — ACCEPT · head 65f9e1b
|
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG
Fixes #29902
Clause-②: yes (widening) — two new count families in the public
@object-ui/i18npacks:preview.changes.typeCount.hook,preview.changes.typeCount.translation.Metadata-protocol: none
维护者速读
ui/packages/app-shell/src/preview/DraftChangesPanel.tsx(TYPE_COUNT末尾两行)、ui/packages/i18n/src/locales/zh.ts(typeCount.hook/typeCount.translation)。cd ui && pnpm exec vitest run packages/app-shell/src/preview/__tests__/DraftChangesPanel.groupHeading-13221.test.tsx,预期全绿,其中含「3 hooks」「钩子 3」「翻译 2」三条新断言。What changes
TYPE_COUNTinDraftChangesPanel.tsxgains ahookand atranslationrow, so the summary line and the per-type group heading read the pack's count family instead of the raw{{n}} {{type}}fallback. The fallback stays for types with no row (objectui#13147 note above the table).ui/packages/i18n/src/locales/gains both families, with each CLDR slot its language selects (es/fr/pt_many,ru_few/_many,ar_zero/_two/_few/_many), mirroring thedatasetrows. zh-CN reads 「钩子 N」 (the platform nav's own word for hooks,nav_hooks) and 「翻译 N」.@object-ui/app-shelland@object-ui/i18n, patch.Which types get a row: the enumeration
The publish door batches every draft the package holds, whatever its type (
publishPackageDraftsinpackages/metadata-protocol/src/protocol.tsreadsrepo.listDrafts({ packageId }), no type filter). A draft can exist only for a type the registry lets a runtime create or overlay:allowRuntimeCreateorsupportsOverlaytrue inDEFAULT_METADATA_TYPE_REGISTRY(packages/spec/src/kernel/metadata-plugin.zod.ts). Those types, and who in Studio authors them:studio-design/ObjectHooksPanel.tsxsaveshookdraftsstudio-design/StudioBundleItemEditor.tsx, listed inAREA_FORM_EDITOR_TYPES(metadataArea.ts)picklist, named on the card, has both flags false: no draft of it can exist, so the publish door never batches one and no row is added. (agentkeeps its existing row.)Acceptance notes
ui/packages/i18n/src/__tests__/all-locales-key-parity.test.tsrequires every pack to define everyenkey (and the per-language plural slots). Thedatasetrow set the same precedent.Verification
Head
cf373b6e(after mergingorigin/mainonce; the merge touched none of the changed files).Targeted tests (6 files, 79 tests)
cd ui && pnpm exec vitest runonDraftChangesPanel.summaryPlural-13147.test.tsx,DraftChangesPanel.groupHeading-13221.test.tsx, and the i18nall-locales-key-parity,en-zh-key-parity,count-families-11445,plural-categories-11432tests:Test Files 6 passed (6),Tests 79 passed (79).Ablation (one, on the tested behaviour)
node scripts/ablation-replace.mjsdeleted thehook:row (anchor 1 → 0, blob 4b7c507f → 9cc8f165):Tests 3 failed | 11 passed (14), the three hook assertions red. Restored: blob back to 4b7c507f,git diff HEADempty.Type-check
pnpm exec turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18n --concurrency=2under the verify lock:Tasks: 69 successful, 69 total(app-shell runstsc --noEmitandtsc -p tsconfig.test.json).Derived gates (35)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 35 families; all 35 ran and exited 0, includingnode scripts/check-sdui-manifest.mjs,pnpm check:type-check-debtandpnpm --dir ui exec vitest run scripts/(170 files passed).--ranreconciliation: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN. Repo-wide families are CI's.Generated by Claude Code