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). |
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