Repository navigation
feat(spec,lint,i18n): translation bundle key for an action answer table's column headers - #34915
Conversation
…column labels WIP: schema sibling columns map, resolver overlay, i18n-walk emission. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob
…sole overlay Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob
…sult column headers Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob
📓 Docs Drift CheckThis PR changes 3 package(s): 14 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 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 4e2ea755b58fda41b8bc883d5cf5dfeae839a702 && git checkout 4e2ea755b58fda41b8bc883d5cf5dfeae839a702
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d576509c80575197b3218aeb1f55884e5ed06ea6 dc341a62b6e4f53ba6c03eeab721267d0fd13846 && git checkout -B drift-repro d576509c80575197b3218aeb1f55884e5ed06ea6 && git merge --no-ff dc341a62b6e4f53ba6c03eeab721267d0fd13846
node scripts/docs-audit/affected-docs.mjs --json d576509c80575197b3218aeb1f55884e5ed06ea6
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d) · 2026-11-17T16:14ZL1: ACCEPT Read against claim 6951731843 and report 6953684073 on #34652. Merge base
Checklist
Must-fixNone. Should-fix
Notes
Landing: not governed. After the seat's schema-face L2 and full green CI on the final head, area o3-G lands it. A later push owes a delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d), same-head body re-read · 2026-11-17T16:15ZL1: ACCEPT S1 from 6953749524 is closed. The head is unchanged. The PR body's "Measured on the surface" paragraph now says what this head does:
Nothing else in 6953749524 changes. Before o3-G lands, two things are still owed: the seat's schema-face L2 and full green CI on the final head. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Inputs read: card #34652 (body, triage 6938958236, claim 6951731843, os-dev-report 6953684073), PR #34915 (body, 26-file list, net diff against ① Derived judgments
② Semver levelClause-②: yes (widening) — agrees with the diff: an optional key on two strict nodes, nothing removed, nothing re-typed.
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Implementing files, sentence by sentence against the contract:
Nits (no effect on correctness or the contract on any shipped data; none is to be fixed on this head, since a code fix would move it):
Implemented-by: VERDICT: PASS |
…-x624so Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d), delta read · 2026-11-17T17:07ZL1: ACCEPT The new head is a merge-only commit, as claimed.
CI on this head was still rerunning at review time: 1 success, 5 skipped, 19 in progress, 0 failed. Landing waits for full green on this exact head. Area o3-G lands it. A later push owes a delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Regen-provenance: 6954510515 · The hop is merge-only. dc341a6's parents are 6a8399c (the head the L2 PASS 6954510515 read) and main 189358f. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgNCAXyGfBQFZBwixH Landing · 2026-11-17T17:43Z
Ready + auto-merge into the queue. Area o3-G (repo:objectstack#3) watches it to MERGED and closes out #34652. |
Regenerated content/docs/references/system/translation.mdx from the merged tree (gen:migration-registry, gen:schema, gen:docs) after #34915 landed. The references differ from main by this branch's own five pages, as before. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
Fixes #34652
Requested by Yibo Wang · project thread
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #34917
维护者速读
resultDialog.columns.字段路径.列路径(预检同理),与fields并列;抽取、校验、服务端翻译和控制台叠加都按这个键走,平台包里「导入用户」结果表的 9 个列标题已译成全部 10 种语言。packages/spec/src/system/translation.zod.ts(新的columns形状)、packages/spec/src/system/i18n-resolver.ts(overlayAnswerColumnLabels)、ui/packages/i18n/src/useObjectLabel.ts(控制台叠加)。pnpm --filter @objectstack/spec exec vitest run src/system/i18n-resolver.test.ts -t "answer table column labels",预期 7 条全绿。What changes
The key, and why it is a sibling map.
ActionResultDialogTranslationSchemaand the module-localActionPreflightTranslationSchemaeach gain an optionalcolumns:Record<fieldPath, Record<columnPath, string>>, both keys the LITERAL paths from the action metadata (dots included, indexed directly, never split). The bundle readsThe card suggested nesting the column map under the field entry (
fields.PATH.columns.COL). I chose the sibling map instead: afields.PATHvalue stays the field's label string, so no existing bundle, generated file or resolver ever sees a field entry that is sometimes a string and sometimes an object; every bundle that parses today parses unchanged and reads the same, and nothing about a table field's own label key moves. The shared shape is one module-localActionAnswerColumnLabelsSchema(no new export, so the published skills' reference indexes do not move).Threaded through.
packages/spec/src/system/i18n-resolver.ts:resolveActionResultDialogandresolveActionPreflight(sotranslateActionand every served object) overlay each declared column'slabelfrom the bundle through the locale chain; a column with no key keeps its authored label, a field with nocolumnsis the same reference.ResultDialogLike/PreflightLikerows gain an optional typedcolumns.packages/lint/src/i18n-walk.ts:pushAnswerTableColumnsemits…resultDialog.columns.PATH.COLand…preflight.columns.PATH.COLfor every labelled column (an unlabelled column draws its path and gets no key, as an unlabelled field row gets none), soos i18n extractand the coverage gate list them.packages/lint/src/validate-translation-references.ts:checkActionAnswerTableColumnsrefuses (translation-target-unknown, error) acolumnskey naming a field that is not a declaredformat: 'table'field withcolumns, a column path itscolumnsdoes not list, or a block the action does not declare; the coverage pin classifies both new keys as reference-checked with a ghost leg at both addresses.rule-explanations.tsnames the two keys.ui/packages/i18n/src/useObjectLabel.ts:actionResultDialogandactionPreflightread thecolumnsnode whole (returnObjects) and overlay declared columns only.ActionResultDialog.tsx'sTableBlockalready drawsresolveInlineI18nLabel(column.label)from the overlaid rows, so it is unchanged.packages/platform-objects/src/apps/translations/*: regenerated withnode scripts/check-i18n-bundles.mjs --write;sys_user.import_sso_users's nine result-table headers are translated by hand in zh-CN, zh-Hant, ja-JP, ko, es-ES, pt-BR, fr, de, ru and ar (no source-hash echo rows remain).content/docs/references/system/translation.mdx(regenerated),content/docs/protocol/kernel/i18n-standard.mdx(the resolvable-key table),content/docs/ui/translations.mdx(the key table and the result-dialog callout).Measured on the surface.
packages/spec/authorable-surface/system.jsongains one row,system/ActionResultDialogTranslation:columns(regenerated in e839d61;check:authorable-surfacegreen on it). The preflight node has no row, becauseActionPreflightTranslationSchemais module-local and not on the walk.Metadata-protocol: addedfollows from that row and from the new key a bundle author can write; the spec changeset isminor.Tests
src/system/i18n-resolver.test.ts, newdescribe('answer table column labels …')(7 cases): a column header resolved in zh-CN (a dotted column path as one key, an unlabelled column gaining one), the en bundle read in en with authored headers kept where en has no key, a bundle without any column key answering exactly as before and still parsing, the fallback chain per column, the preflight block,translateActionon both blocks, and the schema refusing a flat string where the per-field map belongs.src/i18n-walk.test.ts, newdescribe('collectExpectedEntries — answer table column labels'): the walk lists one key per labelled column beside the field key, inline locale maps kept, forresultDialogandpreflight.src/validate-translation-references.test.ts, newdescribe('resultDialog.columns / preflight.columns')(3 cases) plus the two new rows in the action-shape coverage pin and the real-instance control.ui/packages/i18n/src/__tests__/useObjectLabel-actionResultDialog.test.tsx, new top-leveldescribe(2 cases): headers drawn from the zh-CN bundle and from the en bundle after a language switch, the preflight overlay, and a bundle with no column key keeping every authored header.Package suites, local, at
6a8399c1(each underscripts/pm/os-verify-lock.sh,VERDICT command-exit 0):Suite readings
pnpm --filter @objectstack/spec test: Test Files 848 passed (848), Tests 27189 passed, 1 todo.pnpm --filter @objectstack/lint test: Test Files 216 passed (216), Tests 9163 passed.pnpm --filter @objectstack/platform-objects test: Test Files 123 passed (123), Tests 2046 passed.pnpm --dir ui --filter @object-ui/i18n test: Test Files 102 passed (102), Tests 1896 passed, 13 skipped.pnpm --filter @objectstack/spec typecheck,pnpm --filter @objectstack/lint typecheck,@object-ui/i18n type-check: exit 0.Ablations (one per tested behaviour, through scripts/ablation-replace.mjs; each restore proved blob == HEAD and git diff HEAD empty)
i18n-resolver.tsoverlayAnswerColumnLabels, the lookup replaced byundefined:i18n-resolver.test.ts5 failed / 526 passed (the five column cases that read a translated header; the two that assert authored headers and parsing stay green, as they should).i18n-walk.tspushAnswerTableColumnsreturning at once:i18n-walk.test.ts2 failed / 8 passed.validate-translation-references.tscheckActionAnswerTableColumnsreturning at once: 3 failed / 247 passed (the two refusal cases and the coverage pin's ghost legs).useObjectLabel.tsoverlayColumnLabels, the lookup replaced byundefined:useObjectLabel-actionResultDialog.test.tsx1 failed / 4 passed.Acceptance notes
mainthe console's Import Users action answers400 INVALID_REQUEST"Unknown field(s): organizationId": the action door (packages/runtime/src/action-execution.ts, the identity-routeorganizationIdstamp) adds a key the import door (packages/plugins/plugin-auth/src/pending-sso-users.ts) refuses. Filed as console: Import Users (sys_user.import_sso_users) always fails 400 "Unknown field(s): organizationId": the identity-route action stamp meets the strict SSO-user door (add/remove likely too) #34912 by the seat; not touched here. For the reading, a Playwright route re-sent the dialog's own params to the import door itself (POST /api/v1/auth/admin/import-sso-users), so the answer the dialog drew is the door's real one; nothing else was stubbed.sourceoptionidp_pendingdraws "Pending SSO Sign-In" in zh-CN. Noted, outside this card.Skills-docs:skills/objectstack-i18n/SKILL.mdteaches every action bundle key and should gain the twocolumnskeys; filed as skills(i18n): the action key table names the new table column label keys (resultDialog.columns / preflight.columns) from #34652 #34917 (adomain:skillsfollow-up, governed surface).Account:and the seat hands over reviews.Verification
Live, zh-CN, the real console (Vite from this branch over
@objectstack/example-showcasebooted--freshwithOS_CLOUD_MANAGED=1so the managed action is offered; Playwright, localezh-CN): Setup → 用户 → overflow → 导入用户, CSV with one good and one bad row, 确认. The result dialog titled 导入完成 drew therowstable with headers["行","邮箱","成功","已在待激活中,已再次通知","已通知托管组织","未通知的原因","未添加的原因","未应用(请在记录上设置)","上级"]and the same run in
endrew["Row","Email","Succeeded","Already pending, told again","Hosting organization told","Why not told","Not added because","Not applied (set these on the record)","Manager"]. Not run live onmain: there the bundles carry nocolumnskey and the overlay reads none, so the table draws the authored English headers in every locale (the card's premise, read in source).Server half:
GET /api/v1/meta/object/sys_userwithAccept-Language: zh-CNservesimport_sso_users.resultDialog.fields[rows].columns[].labelas the nine Chinese headers above; withen, the authored English.Derived gates (dispatch-gates --commands at 6a8399c: 120 families, all run locally)
check:i18n,check:i18n-walk-parity,check:i18n-stale-fill, speccheck:generated(all 14 current),check:authorable-surface,check:liveness,check:docs,check:nul-bytes,check:test-source-alias.spec check:api-surfaceandspec check:skill-examplesrefused with exit 3 (dist older than a source file an ablation restore had rewritten); after the rebuild both exit 0 ("public API surface + factory signatures unchanged", "347 prose examples type-check").check:watch-hint-literalexited 1 on a temp file another gate run deleted under it (ENOENT on ani18n-extract.config.bundled_*.mjs); rerun alone: exit 0.node scripts/check-plugin-teardown-shape.mjs --self-test: exit 3, the shallow clone cannot reach its pinned positive-control commit. NOT MEASURED locally; CI's checkout runs it.pnpm check:i18n-coverageexit 0 ("14 config(s), 423 baselined untranslated string(s), none new").dispatch-gates --ran: 120 of 120 accounted.main; no governed path.mainmoved 11 commits since the branch point, none in a file this diff touches and none inpackages/spec.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzfRcWkapqoXk7QZVob