Skip to content

fix(spec): localise the column heads of the view Columns, Sort and Tabs tables - #19968

Merged
hotlong merged 4 commits into
mainfrom
claude/issue-19955-view-repeater-row-i18n
Sep 24, 2026
Merged

hotlong merged 4 commits into
mainfrom
claude/issue-19955-view-repeater-row-i18n

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #19955
Clause-②: no

This is the localisation follow-up the maintainer asked for, in the shape #17508 ruling A settled. PR #19917 gave the row items of the view columns, sort and tabs repeaters English titles. view.form.ts enumerated no row children for them, so Studio showed those titles untranslated in zh-CN / ja-JP / es-ES.

  • packages/spec/src/ui/view.form.ts: the three repeaters enumerate their row children. Each label equals the item schema's own .meta({ title }); the dev compared them on the built dist.
  • The four metadata-forms catalogs: the generator emitted the en leaves; zh-CN, ja-JP and es-ES are AI-authored, reusing the catalog's existing renderings where one exists. The dev report 5813748776 lists every reused and invented rendering.
  • repeater-row-properties.test.ts: view moves inside the derived population, so its no-en-echo case covers the new leaves. The dev ablated it red.
  • object-lifecycle-panel-echo-decisions.test.ts: the translated-label positive control moves by exactly the rows that landed, as its comment prescribes. The seat extended the claim to this file (5813775189).
  • Changeset: @objectstack/spec and @objectstack/platform-objects at patch.

The view.columns union renderer question is carried as objectstack-ai/objectui#10239.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1

… row children

Each child's label is the item schema's own `.meta({ title })`, so the
i18n extractor emits a catalog key per column.

Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1
Co-authored-by: Claude <noreply@anthropic.com>
…erties in all four catalogs

The extractor emits the new keys for en; the zh-CN, ja-JP and es-ES
leaves are hand-authored, reusing each catalog's existing rendering where
one exists. The repeater-row-properties pin now counts `view` inside its
population, so its en-echo case covers these leaves.

Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:ui tests tooling labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/platform-objects, @objectstack/spec, touching 26 documentable anchor(s).

9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/flows.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/permissions/authorization.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/permissions/permission-metadata.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/permissions/permission-sets.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/permissions/positions.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/permissions/profiles.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/protocol/objectui/layout-dsl.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/ui/apps.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/ui/pages.mdx (via isDefault (literal, a string literal in sections))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/releases/v13.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/releases/v15.mdx (via isDefault (literal, a string literal in sections))
  • content/docs/releases/v17/17-0.mdx (via isDefault (literal, a string literal in sections))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see

Coarse fallback — 136 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 3b5607019f6b1f84b14716c9c5e3359a986de08e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from dfcbd1dbb8b674bb82689f2f8600f1e2e26f1d91 — the merge of head b05a88136d1e1d0e0d34b7da5c0c45be220cc910 into base 3b5607019f6b1f84b14716c9c5e3359a986de08e, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dfcbd1dbb8b674bb82689f2f8600f1e2e26f1d91 && git checkout dfcbd1dbb8b674bb82689f2f8600f1e2e26f1d91
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3b5607019f6b1f84b14716c9c5e3359a986de08e b05a88136d1e1d0e0d34b7da5c0c45be220cc910 && git checkout -B drift-repro 3b5607019f6b1f84b14716c9c5e3359a986de08e && git merge --no-ff b05a88136d1e1d0e0d34b7da5c0c45be220cc910

node scripts/docs-audit/affected-docs.mjs --json 3b5607019f6b1f84b14716c9c5e3359a986de08e

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 3b5607019f6b1f84b14716c9c5e3359a986de08e → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…the 25 view repeater row labels

Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b05a88136d1e1d0e0d34b7da5c0c45be220cc910

① Derived judgments

  • packages/spec/src/ui/view.form.ts (shipped via @objectstack/spec/ui, packages/spec/src/ui/index.ts:37) — right. The three repeaters gain fields arrays only; no type/widget on any child, so widgets stay schema-derived (objectui SchemaForm.tsx:1795-1800 uses fieldSpec.fields for the row list and face.itemSchema for sub-schemas). The view schema (view.zod.ts) is untouched: nothing is accepted or refused differently. Every child label equals the item schema's .meta({ title }): columns 14/14 (view.zod.ts:1018-1046), sort 2/2 (view.zod.ts:2717-2718), tabs 9/9 (view.zod.ts:1673-1681); property order also matches the schemas. defineForm parses at import (view.zod.ts:6301), and the derived-population test imports viewForm green, so the child shape is accepted by FormViewSchema.
  • Generated catalogs (4 locales) — right. Key set per locale is byte-identical (md5 of the added key lines equal across en/zh-CN/ja-JP/es-ES); 25 keys each = 14+2+9. Placement (children immediately after their repeater's own entry, quoted dotted keys, label only, no helpText) matches the extractor's walk (packages/cli/src/utils/i18n-extract.ts:1837-1847) and the existing header.actions.* precedent (en.metadata-forms.generated.ts:1173-1179); the en leaves equal the form labels verbatim, so the en file is consistent with generator output, not a structural hand-edit. Translated catalogs: zero leaves echo the en source (comm against en additions: 0/0/0), and every concept the catalog already names reuses its existing rendering — Label→显示名称/表示名/Etiqueta, Direction→排序方向/並び方向/Dirección, Pinned→固定/固定/Fijada, Hidden→隐藏/非表示/Oculta, Icon→图标/アイコン/Icono, Name→名称/名前/Nombre, Filter→筛选/フィルター/Filtro, Sortable→可排序/並び替え可能/Ordenable, Field→字段/フィールド/Campo, Visible→可见/表示/Visibilidad (all pre-existing in the same files at the same line offsets). The invented ones (Renderer Type, Click Action, Primary Link, Default Tab, List View, Ajustar texto) read natively. Ruling A's "four locales together" is met.
  • Counting pin 584→609 (object-lifecycle-panel-echo-decisions.test.ts:1116) — right. The pin counts en .label keys present in the locale and different from en (:1103); per-locale label: delta measured against the base is exactly +25 in en, zh-CN, ja-JP and es-ES, and no new leaf echoes en, so 584+25=609 in every locale.
  • repeater-row-properties.test.ts — right. view moves into the carrying set (:139), the three carriers are asserted lit (:145-147), the stale "view outside" dark pin is removed, and the population is still derived from the forms (:98-120), so the no-en-echo case now covers the 25 leaves.
  • Changeset prose — true: schema unchanged, no type on children, catalogs carry the keys, reused renderings named correctly.

② Semver level

@objectstack/spec: patch, @objectstack/platform-objects: patch (.changeset/19955-view-repeater-row-i18n.md:1-4) — correct for a bug card. The spec diff adds presentation metadata to an exported form value (no new exported symbol, no accept-set change), and platform-objects adds catalog leaves; neither is minor/major. Clause-②: no is right for the same reason.

③ Boundary flags

  1. Extend claim surface to object-lifecycle-panel-echo-decisions.test.ts, 584→609 (A vs B) — accept A. The pin's own comment (:1109-1113) prescribes that it moves by exactly the rows a landing adds; the move is +25 in every locale (verified above), the added comment names view.columns / view.sort / view.tabs repeater row properties show English column heads in every locale — the #17508 ruling-A landing for the three view repeaters #19955, and B would leave the ruled one-coherent-landing unlandable. Not a design fork.
  2. view.columns union with string-array arm first (A/B/C) — accept A with C, already done (objectui#10239 filed per PR body). Verified on the pinned objectui 62597c58807: repeaterItemSchema (SchemaForm.tsx:316-331) resolves by value, so a legacy string-array value picks the string arm and the declared children now render with {} sub-schemas; a strict ListColumnSchema refuses a string spread into an object at save (loud). The designer's ViewVariantInspector excludes columns (ViewVariantInspector.tsx:94,349), so only the generic fallback is affected, and it is a renderer concern outside packages/spec. B would depart from ruling A's landing shape; no maintainer escalation needed.
  3. Out-of-scope note (repeater-item-titles.test.ts header drift vs unconditional setSchemaTitleAtPath) — accept as noted-not-filed; comment drift, affects no verdict here.

Implemented-by: claude/issue-19955-view-repeater-row-i18n
Reviewed-by: session_01EcrTi7s5oDYPHS4Pi7h31d

VERDICT: PASS

Isolated at-tier reviewer adopted by the director seat, summon #29, on the maintainer's instruction 「执行契约复审」 · fed only the card(s), the governing rulings, the PR body, the dev's flags and the code


Generated by Claude Code

@hotlong
hotlong marked this pull request as ready for review September 24, 2026 17:01
@hotlong
hotlong added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 4ac9319 Sep 24, 2026
51 checks passed
@hotlong
hotlong deleted the claude/issue-19955-view-repeater-row-i18n branch September 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:ui size/m tests tooling

Projects

None yet

2 participants