Repository navigation
feat(spec): serve metadata list columns on /meta/types, hook first - #36881
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
Trim the list registry to hook for the first half of the card (the other 26 types, their bundle leaves and the nine console moves follow in the second half), keep the console declarations as they were, regenerate the spec baselines and add the changeset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
…slated headers Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf
📓 Docs Drift CheckThis PR changes 4 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 6 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 179 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 9564f2ffa652853cd99bf35c017614c887bfc09f && git checkout 9564f2ffa652853cd99bf35c017614c887bfc09f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 97e0f934e5e0613179a429ce9fcaa47e2d351768 597f70e74069d518950e6ea574de3ac32c71e2e1 && git checkout -B drift-repro 97e0f934e5e0613179a429ce9fcaa47e2d351768 && git merge --no-ff 597f70e74069d518950e6ea574de3ac32c71e2e1
node scripts/docs-audit/affected-docs.mjs --json 97e0f934e5e0613179a429ce9fcaa47e2d351768
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract-review-claim: session_01WGufzesUz1Y8VZuKJRhVL8 · head 597f70e · 2026-11-24T07:34Z |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract reviewServed-tier: Inputs: card #36860 body and all six comments (7122720706, 7122828117, 7122844515, 7122871023, 7123560039, 7124466797), the PR body, the 32-file net diff against merge-base No must-fix, no should-fix. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentEach
Check-runs on the head: 71 names, latest run each; all Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 席位核对 — ACCEPT · repo:objectstack#3 · head 597f70e · 2026-11-24T07:42ZL1 read of #36881, which is Face. Read and sound.
Changeset, read sentence by sentence. Every sentence matches the diff. No must-fix, no should-fix. For the seat (landing todo). The report names two
Notes (nit, no action required in (a)):
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W Landing · 2026-11-24T07:44Z · L1 ACCEPT 7125297029 (L1-a) at head 597f70e · #36860 part (a)
State: ready + auto-merge (Tier S). |
… chain (objectstack-ai#36916) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBP9pYn3ZkhGT2R2hstwEY6w)_ Fixes objectstack-ai#36809 Clause-②: yes (widening) Metadata-protocol: added Skills-docs: none — the new member is a response field the console reads, not something a metadata author writes; no skills/ page teaches `GET /i18n/locales` or how the console resolves flow labels > This PR adds a member to a published response (`GetLocalesResponseSchema`, non-test `packages/spec/src/**`) and so **owes a contract-tier L2 review** before it lands (seat route 7124316383, L1-b). ## 维护者速读 - 用户能看到什么变化:声明了回退语言的应用里,控制台的流程名称、流程步骤名和流程表单字段文字,在当前语言缺译时改显示回退语言的译文,和服务端一致;没声明回退语言的应用不变。 - 为什么做:控制台此前只认当前语言,同一个流程标签在服务端和控制台显示成两种文字,违背了翻译文档"按应用声明的回退链降级"的承诺。 - 出错会怎样:最坏是某个流程标签显示成回退语言或作者原文,不影响任何数据;回退本次合并即可恢复原样。 - 要你做什么:无。 ## What changes **Carrier: `GET /api/v1/i18n/locales` gains `fallbackChain`** (optional `string[]`), not discovery `locale`. Why this door: - It already carries the other half of the resolvers' options, `sourceLocale` (the `defaultLocale` the server hands the resolvers), so the console reads the whole `ResolveOptions` declaration from one answer. - It has one producer (the runtime's `/i18n` domain). Discovery has two (`HttpDispatcher` and `metadata-protocol`'s `getDiscovery`), and adding it to one would let two machine-readable answers about one boot disagree. - Its value comes from `II18nService.getFallbackLocale()`, read with the same feature-detected accessor and the same non-empty condition as `metaTranslateOptions` (`@objectstack/rest`) uses for every server-side metadata translation. A service with no accessor (the core in-memory provider) or an empty answer serves no member: the server threads a declaration and never invents one. **Console:** - `ui/apps/console/src/loadLanguage.ts` reads the locale list next to the active language's bundle (in parallel). If a chain is declared and the language is not `sourceLocale` (the resolvers skip the chain for it), it fetches each fallback locale's bundle and keeps its `flows` group. It lays them next to the app namespace through `withDeclaredFlowsFallback` (`@object-ui/i18n`). With no declared chain, the answer is exactly what it was before. A failure in either extra read gives that same answer. - `ui/packages/i18n/src/flowsBundle.ts`: `activeFlowsBundle` now also returns the fallback locales' rows. The new `flowsResolveOptions` returns `{ locale, fallbackChain, defaultLocale }`, the options the server passes. The new `flowsLocaleChain` gives the order the spec's private `localeChain` walks, for the keys that no spec resolver reads. The module doc now describes what the code does. - `flowLabels.ts` (`flowLabelTranslations` takes the declared options; `useFlowLabelTranslations` passes them), `FlowRunner.tsx` (flow name, field copy per key, option labels), `flow-label-translations.tsx` (Studio rail) and `stageChangeStarts.tsx` (stage confirm) pass the options to `translateFlow` / `resolveFlowApprovalStepLabel` / `resolveFlowScreenFieldOptions`. - Docs: `content/docs/ui/translations.mdx` now covers what the console does. `content/docs/references/api/protocol.mdx` is regenerated with the new member, and `packages/spec/authorable-surface/api.json` is regenerated (the `+1` key is the `Metadata-protocol: added`). ## Tests <details><summary>New pins (files named for this card) and runs</summary> - `packages/runtime/src/domains/i18n-locales-fallback-chain-36809.test.ts`: the member comes from `getFallbackLocale()` (spy called, value followed). It is absent with no accessor, an `undefined` answer, an empty answer, or the core memory provider. The body parses as `GetLocalesResponseSchema`. - `ui/packages/i18n/src/__tests__/flowLabels-fallback-chain-36809.test.ts`: with a declared fallback, the console answer equals the spec resolvers' answer with the server's options (flow label, approval step) and covers the plain node and untitled screen. No chain gives the old answer. An authored-language request walks no chain. The array survives the real i18next store. `flowsLocaleChain` visits the same locales as the resolvers in 5 cases. - `ui/apps/console/src/loadLanguage.fallbackChain-36809.test.tsx`: the real loader with URL-routed fetch. A declared chain reads the fallback text and matches the server. No chain means no extra bundle read. The authored language means no fallback read. A failed locale read degrades to the old answer. - `ui/packages/app-shell/src/views/__tests__/FlowRunner.fallbackChain-36809.test.tsx`: the runner's flow name and field label come from the fallback, and the placeholder comes from the active language. - Updated: `ui/apps/console/src/loadLanguage.test.tsx` (the session pin now expects the locale-list read next to the bundle read, both with the bearer). Runs (head `b276ff4e`): - runtime: 4 files / 74 tests passed (new pin, anonymous-deny, supported-locales, envelope conformance). - ui: i18n 3 files / 20 tests; console + FlowRunner + stage confirm + FlowCanvas 5 files / 47 tests; FlowRunner suite 19 files / 129 tests; new runner + loader pins 2 files / 6 tests. All passed. - typecheck: `@objectstack/runtime`, `@objectstack/spec`, `@object-ui/i18n`, `@object-ui/plugin-detail`, `@object-ui/console`, `@object-ui/app-shell`: exit 0. </details> <details><summary>Ablations (one-time, restored, `git diff HEAD` empty after each)</summary> - `flowsResolveOptions` forced to `{ locale }` (via `scripts/ablation-replace.mjs`, anchor 1 to 0, blob `39830597` to `fe1e4a35`): 4 of 12 tests in the i18n pin went red. Restored, blob equals HEAD. - The producer's `fallbackChain` spread deleted from `packages/runtime/src/domains/i18n.ts` (blob `ca4e8bdd` to `d1a26537`): 2 of 6 tests in the runtime pin went red. Restored, blob equals HEAD. - Both subjects resolve from `src` (relative imports), so no dist preflight was needed. </details> ## Acceptance notes - One extra round trip when a fallback is declared and the language is not the authored one: the fallback bundle is fetched after the locale list answers. App labels for the active language reach the screen together with it. With no declared chain, only the parallel locale-list read is added. - `flowsLocaleChain` mirrors the spec's private `localeChain`. A parity pin holds it equal to `resolveFlowApprovalStepLabel`'s walk. Exporting the spec's own helper would remove the copy, but that is a public spec export outside this claim (carrier: none, noted, not filed). - The file adapter collapses `fallbackLocale || defaultLocale || 'en'` at boot, so a file-backed stack with no `fallbackLocale` serves its `defaultLocale` as the chain. The console now follows that too, as the server does. ## Verification <details><summary>Local gates and two-minute check</summary> - `node scripts/pm/dispatch-gates.mjs --commands` derived 120 families. All 120 ran locally. 116 exited 0. 3 exited 3 (prerequisite not met, so NOT MEASURED locally; CI runs them): `check-plugin-teardown-shape --self-test` (shallow clone cannot reach the pinned fixture), `spec check:skill-examples` (needs a `client-react` build), `check:dual-build-cjs-loads` (needs a full build). `pnpm --dir ui exec vitest run scripts/` had one timeout under shared-box load (`js-comment-mask-returns-interpolation-9424`); the file passed on its own (8/8). `--ran` reconciliation: 120 derived, 117 run, 3 NOT-MEASURED, 0 UNRUN. - `pnpm --filter @objectstack/spec check:generated`: 14/14 up to date after `--fix` regenerated `check:docs`. - `overlap-check --branch`: VERDICT clean (merges cleanly with origin/main and with objectstack-ai#36881 / objectstack-ai#36857, which share files). - Read first, by risk: `ui/apps/console/src/loadLanguage.ts` (the new reads), `ui/packages/i18n/src/flowsBundle.ts` (the reserved tree entry and the chain walk), `packages/runtime/src/domains/i18n.ts` (the producer hunk). - Two-minute check: `pnpm --dir ui exec vitest run packages/i18n/src/__tests__/flowLabels-fallback-chain-36809.test.ts` should report 12 passed. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK ## Fix round 1 (L1 REWORK 7127286361 / contract review FAIL 7127267955 on b276ff4 → ee54ef8) - **M1: closed.** `ui/apps/console/src/loadLanguage.ts` negotiates the console language against the same `/i18n/locales` answer's `locales[].code` (`resolveLocaleAmong(lang, codes) ?? lang`, the matching `negotiatedTranslationLocale` runs) before the authored-language check, before the fallback filter and before the resolvers; the negotiated tag rides `DeclaredFlowsFallback.locale`, `flowsResolveOptions` passes it as `locale`, and `activeFlowsBundle` / `flowLabelTranslations` key by it. Pins with alias tags in `loadLanguage.fallbackChain-36809.test.tsx`: a `zh-Hans` and a `zh` console on a `zh-CN`-authored stack with fallback `en` read the authored Chinese (equal to the server's answer for the negotiated request) and fetch no `en` bundle; a `ja` console on a stack holding `ja-JP` negotiates to `ja-JP` and still reads the `en` fallback. Ablation (raw tag instead of the negotiated one): 3 of 7 loader tests red, restored. - **S1: closed.** Claim amendment 7127305468 names `ui/apps/console/src/loadLanguage.test.tsx` and `ui/packages/i18n/src/index.ts`. - **N2: closed.** The `fallbackChain` describe and jsdoc in `packages/spec/src/api/protocol.zod.ts` say the member is absent when the i18n service reports no fallback, and that the request tag is negotiated against `locales[].code` first; `content/docs/references/api/protocol.mdx` regenerated, `content/docs/ui/translations.mdx` explains the negotiation. - **N1: kept.** Sharing the `/i18n/locales` read with `loadLocales.ts` needs that file, outside the claimed surface; one extra request per language load, no correctness effect. Line budget: 18 files, +957/−77 = 1,034 changed lines (one PR for the card), under the 3,000-line line. <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzh1FMUQYf1PcEunaaK --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…es serves (objectstack-ai#36948) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBDErTg6aA1Xze24mDcUfseY)_ Fixes objectstack-ai#36887 The published wire schema of `GET /meta/types` now declares every member the route serves on an entry. It follows objectstack-ai#36881, which declared `list`, and is independent of objectstack-ai#36926 (objectstack-ai#36860 part b), which touches the listing's translation, not this schema. Clause-②: yes (widening: the published response schema declares four members the route already serves) Metadata-protocol: added Skills-docs: none — the declared members are Studio display data the spec registry and plugins produce, not something a metadata author writes; `skills/objectstack-ui/SKILL.md:34` names `entries[].schema` only and stays true ## 维护者速读 - 对外发布的类型列表响应格式现在写全了服务器一直在返回的字段(schema、form、actions、schemaId),按这份格式写客户端的人终于能看到它们;服务器返回的内容一点没变。 - 属于工作室元数据列表标准化的收尾(objectstack-ai#36860 的配套卡)。 - 影响按发布的协议类型写客户端或生成代码的开发者,最终用户看不到变化;合并后可直接撤回。 - 无需你决定。 ## What changes - **`GetMetaTypesResponseSchema` (`@objectstack/spec`, `api/protocol.zod.ts`).** Each entry now declares: - `schemaId`: a string, the same value as `type`. - `schema`: a JSON Schema record. It is optional, because a type with neither a spec schema nor a hand-crafted one serves none. - `form`: a `FormView` (`FormViewSchema`, strict). It is optional, because a type with no declared form serves none. - `actions`: `Action[]` (`ActionSchema`). It is optional, absent when the type has none. The card names `schema` and `form`. The same row also serves `schemaId` and `actions`, which were undeclared too. The card's Expected line ("declares every member the route serves") and its strict test cover them, so they are declared here as well (stated in the claim, 7127426588). - **A parsed shape.** `form` and `actions` carry defaults, so the response's input and output types now differ. Following ADR-0122, `GetMetaTypesResponseParsed` is declared next to the bare alias, and its isomorphism pin leaves `type-alias-convention.pin.test.ts` (888 → 887, with a receipt line). - **Generated artifacts.** The `api` shards of `api-surface` and `export-origins` and the protocol reference page are regenerated. `dropped-refinements.baseline.json` declares the 12 refinement sites the response now reaches through `FormViewSchema` and `ActionSchema`, which the build printed (275 schemas, 1,183 sites). Those refinements are correct runtime rules that the published JSON Schema cannot express, as for every other schema that embeds these two. - Nothing the server sends changes. ## Tests - `packages/metadata-protocol/src/protocol.meta-types-response-schema-36887.test.ts` (new). It takes a real `getMetaTypes()` answer through JSON, as the wire sends it, and covers every registry type plus `webhook` (the synthesised arm), with a plugin-registered `datasource` action. - The answer parses, and no served member is stripped, which is the strict reading, since `z.object` drops an undeclared key. - A second case checks that the members the card names are actually on the wire, so the parse read them. - Controls: a served key the schema does not declare is reported, and a malformed `form` is refused (so `form` is typed, not `unknown`). - 4 passed. On the spec dist from before this change, the strict case reported 82 stripped members (`agent.schemaId`, `agent.schema`, `agent.form`, …). - `packages/spec` `src/api` + the alias pin file: 65 files, 2,123 passed. ## Acceptance notes - `schema` and `form` are declared with their real shapes: `form` reuses `FormViewSchema`, and `schema` is a JSON Schema object, for which the spec has no narrower schema. - `@objectstack/metadata-protocol` changes only a test and the engine-double ledger, so the changeset names `@objectstack/spec` alone (`minor`, as `added` requires). - Overlap: `node scripts/pm/overlap-check.mjs` reads clean against `main` and open PRs. ## Verification Read first, by risk: 1. `packages/spec/src/api/protocol.zod.ts`: the four new members, and the `optional` on `schema` and `form` (both can be absent at runtime). 2. `packages/spec/dropped-refinements.baseline.json`: the 12 declared sites and the header counts. Two-minute check: `pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.meta-types-response-schema-36887.test.ts`. Expect 4 passed. <details><summary>Gates on ce27cea</summary> - `node scripts/pm/dispatch-gates.mjs --ran`: 121 derived, 121 run, 0 NOT-MEASURED, all exit 0. `check:engine-double-contract` first failed on the new test's engine doubles and passed after `--write` (the ledger commit). That commit's `scripts/` path derived 7 more families, all run and green. - `pnpm --filter @objectstack/spec check:generated --fix` regenerated the 3 stale artifacts and re-checked them green. The alias pin's type error was fixed the ADR-0122 way (a `Parsed` alias, with the pin removed). - `check-governed-merges --branch HEAD`: NOT governed, 183 changed lines (+175 / −8). - `tsc --noEmit` is clean for `@objectstack/metadata-protocol`. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzg7mFFG5b13DcQ93kf --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…both doors (objectstack-ai#36926) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBDErTg6aA1Xze24mDcUfseY)_ Fixes objectstack-ai#36860 > **Held for the maintainer's own review.** This is part (b) of the card's two-PR split. The whole card measured about 3,530 changed lines, over the 3,000-line human-review line, so the maintainer ruled that every part goes to their own review whatever its size: splitting must not route around it. This PR stays a draft and out of the merge queue until the maintainer has read it. Part (a), objectstack-ai#36881, merged on L1 + L2 before that ruling and is handed to the maintainer with this one. This part closes the card: the other 26 types, their header translations in all 11 bundles, the console's own declarations moved into the spec, and the runtime dispatcher translating the types listing, which folds in objectstack-ai#36886 (the dispatcher answered `/meta/types` in English). Clause-②: yes (widening: `/meta/types` serves `list` on 26 more entries, and the runtime dispatcher's listing is now translated) Metadata-protocol: none ## 维护者速读 - 工作室里 27 类元数据(对象、字段、视图、页面、流程、报表、智能体等)的列表列改由平台规范统一声明,列头按界面语言显示(11 种语言都有译文);经运行时分发器访问的主机,类型列表也不再一律显示英文。 - 属于工作室元数据列表标准化(objectstack-ai#36860 的第二部分,第一部分是 objectstack-ai#36881):控制台、命令行和 AI 客户端读同一份列定义。 - 影响打开这些列表的管理员;列名和顺序有变化(例如页面列表去掉了不存在的 route 列)。出错时页面退回默认列,合并后可直接撤回。 - 需要你亲自审阅后再决定合并:这一卡总量超过 3,000 行,按你的要求分拆后的每一部分都交你审,本 PR 不进合并队列。 ## What changes - **Registry (`@objectstack/spec`).** `METADATA_LIST_REGISTRY` declares 27 types: the first batch (`hook`, `flow`, `job`, `api`, `action`, `report`, `dataset`, `email_template`, `assignment_rule`, `sharing_rule`, `queue`, `agent`, `tool`, `skill`, `doc`, `seed`, `mapping`, `picklist`, `translation`) and the eight the console declared itself (`object`, `field`, `view`, `page`, `dashboard`, `permission`, `position`, `book`). Every column is a key the type's schema declares, checked by the reconciliation test, whose roster now asserts all 27. Keys the card proposed that no schema declares were dropped or corrected, as reported in the card's thread. - **Headers in every language (`@objectstack/platform-objects`).** The 52 headers no form field already labels get their own `metadataForms.<type>.fields.<path>.label` leaf, regenerated with `node scripts/check-i18n-bundles.mjs --write` and translated in all ten non-English locales. No zh-CN, ja-JP or es-ES leaf echoes the English. A column the form labels reads the form's words. - **Both doors translate the listing (`@objectstack/rest`, `@objectstack/runtime`), objectstack-ai#36886.** `translateMetaTypesListing` (`meta-item-read-gate.ts`) is the one translation of the types listing: type labels and descriptions, form labels, list headers and schema titles. `RestServer`'s `GET /meta` now delegates to it, and the runtime dispatcher's `GET /meta` and `GET /meta/types` call it with the request's locale and answer through `successWithHeaders` with `Vary: Accept-Language`, as `RestServer` and the rest of the meta domain do. Before, the dispatcher served `getMetaTypes()` untranslated, so a zh-CN reader of a dispatcher-served host got English for all of it. - **Console (`@object-ui/app-shell`).** `builtinComponents.tsx` and `anchors.ts` drop their `listColumns` and keep only what the schema cannot say: a field row's server-stamped `object` (`listExtraColumns`), a position's holder count and granted permission sets, a view's derived display type and a book's audience (`listCells`), and a sharing rule's `sharedWith` rendering plus its `_packageId`. `object` was registered twice with disagreeing columns (the later won); both declarations are gone, so the spec's is the only one. A page's former `route` column named no `PageSchema` key and is dropped. - **Changelog for what admins see (`@object-ui/app-shell`).** The changeset names the private console package, which `.changeset/config.json` versions (`privatePackages.version: true`), and says what changes on screen: no fixed column widths on the moved lists (except the view list's display type and the book list's audience), the Fields list reads name, type, label, then object, the sharing-rule header reads "Access Level", and the Pages list shows type and description in place of the dropped route column. - **Summary cells read an expression's source (`@object-ui/app-shell`).** The `summary` renderer joined only an object's scalar members, so a cron schedule, whose `expression` is served as the `{ dialect, source }` envelope, read `cron · UTC`. An expression envelope member now contributes its `source`, so a cron job reads `cron · <expression> · UTC` (the showcase job: `cron · 0 1 * * * · UTC`). Any other object member stays out, as before. - **Echo ledgers (`@objectstack/platform-objects` tests).** The bare-type ledger reads a type as bare when its catalog entry has no form `sections`, since a type with no form now carries `fields` for its column headers; the metadata-form catalog count grows by the 52 header rows (771 → 823). - **Docs.** `content/docs/protocol/kernel/i18n-standard.mdx` adds the list columns row (`resolveMetadataListLabels`), the slot paragraph, and says all three resolvers run in `GET /meta` on both doors. ## Tests - `packages/spec/src/system/metadata-list-zod-reconciliation.test.ts`: the roster assertion grows from `['hook']` to the 27 types (111 passed). - `packages/lint/src/i18n-walk.metadata-list-columns.test.ts` (new, the L2 N2 pin on objectstack-ai#36881): a column on a type with no form gets its own slot entry seeded with the header (`job.schedule` → `Schedule`), a dotted path the form leaves out gets one (`agent` `model.model` → `Model`), a column the form labels keeps exactly one entry, the form's (`hook.events`), and every registry column has exactly one entry (4 passed). - `packages/runtime/src/domains/meta-types-translation-parity-36886.test.ts` (new): both dispatcher doors answer zh-CN with the same label, form label and headers as `RestServer` (`{ label: '钩子', form: '事件', headers: ['名称', '事件'] }`), and both carry `Vary: Accept-Language`, as `RestServer` does. Controls: an en request, and a host with no i18n service, answer as declared. Ablations: putting back `deps.success(result)` reds the zh-CN case (1 failed, 2 passed); answering the translated body without the header reds the Vary case (1 failed, 3 passed). - `ui/.../ResourceListPage.servedListColumns-36860.test.tsx`: mounts each moved list under setup (`?scope=environment`) and checks the served headers, plus the view list keeping its derived display type through its console cell override. ## Screenshots (card acceptance, zh-CN) Taken on a booted `examples/app-showcase`: hooks and flows built from `9ce7a6d0` (the commits after it until `f2edd9de` change only the changeset and tests), the Jobs list re-taken on `f2edd9de`, console at `/apps/setup/metadata/<type>?scope=environment`, browser locale zh-CN. Stored in the project's shared files under `objectstack-seat3-ux/36860-shots/`: - `hook-list-zh.png`: 钩子 (8). Headers 名称 · 显示名称 · 对象 · 事件 · 优先级 · 异步 · 描述 · 来源. Events read as a list (`beforeInsert, beforeUpdate`), async as ✓ / ×. - `flow-list-zh.png`: 流程 (33). Headers 名称 · 显示名称 · 类型 · 描述 · 来源. Type reads as a badge (`autolaunched`, `record_change`, `schedule`, `screen`). - `job-list-zh.png`: 后台任务 (1). Headers 名称 · 显示名称 · 调度计划 · 已启用 · 描述 · 来源. The schedule reads `cron · 0 1 * * * · UTC` (it read `cron · UTC` before `f2edd9de`, L1 S4), enabled ✓. Every `GET /api/v1/meta` the console made answered 200 with `Vary: Accept-Language`. Item labels and descriptions stay in English: they are the example app's own text, which has no zh translation. ## Acceptance notes - L2 nits on objectstack-ai#36881 carried here: N1 (headers marked localized while the dispatcher served them untranslated) is closed by the objectstack-ai#36886 fold; N2 pin added (above); N3 (`listInclude` prose true only after the position move) is now true; the reconciliation roster grows. `@object-ui/app-shell` was first left out of the changeset on that review's advice, and is back in on this PR's L1 (S3), because `.changeset/config.json` versions private packages. N7 (the reconciliation test copies `humanizeFieldPath`) is unchanged. - objectstack-ai#36887 (`GetMetaTypesResponseSchema` declares neither `schema` nor `form`) is not in this PR; it follows as its own small PR. - objectstack-ai#36886 is folded in without a closing keyword; it is closed by hand when this lands. - `report`'s `dataset` header reads `Data Source`, the report form's label on current `main`. - Overlap: `node scripts/pm/overlap-check.mjs` against `main` and the two open PRs sharing files: objectstack-ai#36869 (`rest-server.ts`) merges cleanly; objectstack-ai#36802 conflicts in `object-lifecycle-panel-echo-decisions.test.ts`, where both PRs move the catalog count and add a receipt line. Whichever lands second resolves it to the sum of both receipts. ## Verification Read first, by risk: 1. `packages/runtime/src/domains/meta.ts`: the two `getMetaTypes` sites now translated, and the locale they read. 2. `packages/rest/src/meta-item-read-gate.ts` with `rest-server.ts`: `translateMetaTypesListing` must answer exactly what `translateMetaTypesResponse` answered before. 3. `ui/packages/app-shell/src/services/builtinComponents.tsx` and `anchors.ts`: what the console keeps after the move. 4. Spot-read a bundle, e.g. `zh-CN.metadata-forms.generated.ts`, for the 52 new leaves. Two-minute check: `pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-types-translation-parity-36886.test.ts`. Expect 4 passed. <details><summary>Gates on 2fe89a7 (first round; the rework commits 9ce7a6d, 137ae10, 06064a1 and f2edd9d re-ran the gates they touch, listed last)</summary> - `node scripts/pm/dispatch-gates.mjs --ran`: 125 derived, 125 run, 0 NOT-MEASURED, all exit 0. Fixed in this PR along the way: `check:test-source-alias` (module-top imports in the new tests), `check:spec-parsed-alias` (`MetadataListCellTypeParsed`) and `check:engine-double-contract` (ledger rewritten with `--write`). Three gates first exited 3 on prerequisites and were re-run green after fetching the plugin-teardown fixture commit and building the packages that had no dist. - `check-governed-merges --branch HEAD`: not governed, 2,834 changed lines (+2,591 / −243), 2,220 of them the 11 generated bundles. - `tsc --noEmit` is clean for `@objectstack/rest` and `@objectstack/runtime`. `@object-ui/app-shell` type-check was not measured locally (the ui workspace deps have no dist); CI's type-check lane is the verdict. - Tests: runtime `domains/meta` 2,756 passed; rest meta 2,263; app-shell `metadata-admin` 222; spec reconciliation 111; lint pin 4; rest list headers + schema titles 6. - Rework round 2: `servedListColumns.test.tsx` + `ResourceListPage.servedListColumns-36860.test.tsx` 17 passed, with a new case for a served cron envelope and a control for an object member with no `source`; ablation (back to scalar members only) reds it (1 failed, 10 passed). ESLint clean on both files. - Rework round: runtime parity test 4 passed; platform-objects `bare-type-display-echo-decisions` + `object-lifecycle-panel-echo-decisions` 73 passed (the two files CI's Test Core (6/10) failed on 99dc6d0); `check-changeset-fixed`, `check-empty-changeset` and `check-changeset-no-major` (with this body) exit 0. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzg7mFFG5b13DcQ93kf --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Yibo Wang · project thread
Part of #36860
This is part (a) of the card's two-PR split, which the seat chose when the whole change measured about 3,530 changed lines: the spec declaration, the serving, the header translation, the extractor support and the console precedence, proven end to end on
hook. Part (b) follows frommainonce this merges and closes the card: the other 26 types, their 52 new header leaves in the 11metadata-formsbundles, the 9 console declarations moved into spec and the duplicateobjectregistration resolved.Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — the served
listis Studio display data that only the spec registry declares; a metadata author cannot write it, and no skill underskills/**teaches Studio list columns (skills/objectstack-ui/SKILL.mdnamesentries[].schemaonly, unchanged)维护者速读
What changes
@objectstack/spec).MetadataListViewSchemais a list layout bound to the type's own schema (data: { provider: 'schema', schemaId }) withcolumns. EachMetadataListColumnSchemaisListColumnSchemanarrowed tofield/label/type.fieldis a schema key or a dotted path into it, andtypeis aMetadataListCellTypeSchemarenderer:text,badge,boolean,count,listorsummary.defineList({ schemaId, columns })builds one and refuses anything else.METADATA_LIST_REGISTRY(system) sits besideMETADATA_FORM_REGISTRYand declareshookhere.resolveMetadataListLabelstranslates a list's headers throughmetadataForms.<type>.fields.<field>.label.@objectstack/metadata-protocol,@objectstack/rest).getMetaTypes()serves the registry entry aslistbesideform, andGetMetaTypesResponseSchemadeclares it.translateMetaTypesResponselocalizes the headers with the bundle and locale it already uses forform. A type with no entry carries nolistkey.@objectstack/lint).walkMetadataFormsemits the form field slot for each column path the type's form does not already label, with the header as the English source.scripts/check-i18n-bundles.mjsnames the registry module as a bundle trigger. Everyhookheader reuses a form label, so no bundle changes.@object-ui/app-shell).ResourceListPagereads the served columns first (servedListColumns.tsx). If the type serves none, it uses the console'slistColumns, then the default name / label / description. A served header is shown as served. A key the stored row omits shows the schema default at that path.listCellsoverrides a served column's cell andlistExtraColumnsappends server-stamped values that are not schema keys.builtinComponents.tsxandanchors.tsare not touched here; their 9 declarations move in part (b).Tests
packages/spec/src/system/metadata-list-zod-reconciliation.test.ts: every column resolves to a declared, writable, non-retired, non-overlay key of its type's schema. No column is duplicated, and each header equals the form field label or the humanized path. Each refusal has a "gate can fail" pin: an undeclared key, an_overlay key, a retired key, an undeclared nested key, anddefineListrefusingcurrency, an empty column list andwidth.packages/metadata-protocol/src/protocol.meta-types-list-layout-36860.test.ts: every registry type is served with its own frozen layout. The control is a type with no entry, which carries nolistkey.packages/rest/src/meta-types-list-headers.test.ts: zh-CN headers are translated through the form field slot, dotted path included, and only the header is rewritten. The controls are the en headers, a type serving no list, and no in-place mutation across requests. Ablation: replacing the translate call withnext.list = entry.listreds the zh-CN case (1 failed, 2 passed), restored bytrap.ui/.../servedListColumns.test.tsxcovers the renderers, path and default readers and the precedence helpers.ui/.../ResourceListPage.servedListColumns-36860.test.tsxmounts the page and checks served headers in order, each renderer, schema defaults for absent keys, a dotted path, the default list as control, alistCellsoverride and alistExtraColumnscolumn.Acceptance notes
hookonly, by the seat's split. The keys of all 27 types were checked against their schemas, and the dropped or corrected keys are in the card's thread. They land with part (b).GetMetaTypesResponseSchemadeclareslistbut still notschema/form(pre-existing gap, not widened here)./metadata/typespath does not translateformtoday, andlistfollows it (pre-existing, unchanged).node scripts/pm/overlap-check.mjsreads clean againstmainand the three open PRs sharing files (docs(spec): the compactToolbar describe and the userActions liveness note say which toolbar draws Refresh #36872, fix(core, console): the offboarding hand-over's owner follows each object's Change Owner switch #36869, feat(kanban): a lane's sum, avg, min and max cover every record of the lane, computed in the query #36857).Verification
Read first, by risk:
ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx: the precedence expression andlocalizeColumnLabelskipping a served header.packages/lint/src/i18n-walk.ts: the column step inwalkMetadataForms. It decides which bundle leaves part (b) adds.packages/spec/src/ui/view.zod.ts: thepick/extendnarrowing behinddefineList.Two-minute check:
pnpm --filter @objectstack/rest exec vitest run src/meta-types-list-headers.test.ts. Expect 3 passed, with the zh-CN case reading['名称', '事件', '最大重试次数'].Gates on 597f70e
node scripts/pm/dispatch-gates.mjs --ran: 145 derived, 145 run, 0 NOT-MEASURED, 0 UNRUN. Two findings were fixed in this PR:check:test-source-alias(module-top@objectstack/objectqlimport in the new rest test) andcheck:engine-double-contract(ledger rewritten with--writefor the new metadata-protocol test). Three gates first exited 3 on prerequisites and were re-run green: the plugin-teardown self-test after fetching its pinned fixture commit, andcheck:skill-examplesandcheck:dual-build-cjs-loadsafter building the packages that had no dist.pnpm --filter @objectstack/spec check:generated: all 14 artifacts up to date.check:authorable-surface,check:llms-txt,check:spec-parsed-alias,check-i18n-bundles(no bundle changes),check:i18n,check:i18n-walk-parity,check-changeset-no-major,check-empty-changesetandcheck-changeset-fixedpass.check:i18n-coveragepasses after buildingservice-print.check-governed-merges --branch HEAD: not governed, 1,309 changed lines.tsc --noEmitis clean for@objectstack/metadata-protocol,@objectstack/restand@objectstack/lint.@object-ui/app-shelltype-check was not measured locally because the ui workspace deps have no dist; the only error in the changed files is the shared unresolved@object-ui/componentsimport. CI's type-check lane is the verdict.src/system+src/api/protocol2,941 passed; app-shellmetadata-adminlist and directory pages 221 passed (15 files);@objectstack/linti18n 27; metadata-protocol meta-types 67; rest list headers 3 + schema titles 3.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzg7mFFG5b13DcQ93kf