From 1d010601f3f5fc53df58d7935af822922546ce8b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 05:37:45 +0000 Subject: [PATCH 1/4] fix(spec): the report form's top-level rows use the blocks grid's terms Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB --- packages/spec/src/ui/report.form.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/spec/src/ui/report.form.ts b/packages/spec/src/ui/report.form.ts index c9b1a99a6c1..e4edd40590a 100644 --- a/packages/spec/src/ui/report.form.ts +++ b/packages/spec/src/ui/report.form.ts @@ -38,11 +38,16 @@ export const reportForm = defineForm({ // A `joined` report carries its data on `blocks` instead. visibleWhen: "data.type != 'joined'", fields: [ - { field: 'dataset', widget: 'ref:dataset', helpText: 'The report reads its numbers from here; everyone sees only the records they have access to.' }, - { field: 'values', widget: 'string-tags', helpText: 'The metrics to total or count (from the data source).' }, - { field: 'rows', widget: 'string-tags', helpText: 'The fields to group by (from the data source).' }, + // #36838 — the four row titles are the blocks grid's terms below (and + // `JoinedReportBlockSchema`'s `.meta({ title })`), so one form never + // names the same key in two vocabularies. Without a `label` these rows + // read the prettified keys Dataset / Values / Rows / Columns. + { field: 'dataset', label: 'Data Source', widget: 'ref:dataset', helpText: 'The report reads its numbers from here; everyone sees only the records they have access to.' }, + // A measure may be any dataset measure (sum, count, average, ratio, derived). + { field: 'values', label: 'Metrics', widget: 'string-tags', helpText: 'The metrics to show, such as totals, counts, averages or ratios (from the data source).' }, + { field: 'rows', label: 'Group By', widget: 'string-tags', helpText: 'The fields to group by (from the data source).' }, // CEL visibility — only Matrix reports pivot across a second dimension. - { field: 'columns', widget: 'string-tags', visibleWhen: "data.type == 'matrix'", helpText: 'Groups spread across the columns (matrix reports only).' }, + { field: 'columns', label: 'Group Columns By', widget: 'string-tags', visibleWhen: "data.type == 'matrix'", helpText: 'Groups spread across the columns (matrix reports only).' }, // #3916 — ordering is authorable here or it is not authorable at all: // `DatasetSelection.order` has always existed on the wire, but a report // author had no channel to reach it. Optional — a selected time @@ -145,7 +150,10 @@ export const reportForm = defineForm({ fields: [ { field: 'formats', label: 'Formats', helpText: 'The download formats offered. Left unset, both csv and xlsx are offered; an empty list turns downloads off.' }, { field: 'includeHeaders', label: 'Include Headers', helpText: 'Put the column names in the first row of the downloaded file.' }, - { field: 'fileNamePrefix', label: 'File Name', helpText: 'The start of the downloaded file’s name, used instead of the report name.' }, + // The prefix replaces the report's label, which falls back to its + // name (`buildExportFileName` in @object-ui/core, called by the + // report export control); the date and time follow it. + { field: 'fileNamePrefix', label: 'File Name', helpText: 'The start of the downloaded file’s name. Left empty, the file is named after the report’s label, or its name when it has no label.' }, ], }, ], From 82110ada914081c1bc52446f986d5e5e7c48c99e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 05:48:03 +0000 Subject: [PATCH 2/4] fix(i18n): regenerate the report form bundles and move the ledger sources Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB --- .../translations/en.metadata-forms.generated.ts | 12 ++++++------ .../es-ES.metadata-forms.generated.ts | 2 +- .../ja-JP.metadata-forms.generated.ts | 2 +- .../report-dataset-panel-echo-decisions.test.ts | 16 ++++++++-------- .../zh-CN.metadata-forms.generated.ts | 2 +- .../views/metadata-admin/metadata-form-zh-cn.ts | 9 ++++++--- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts index 83b6e56ba3e..e3b5ae26e55 100644 --- a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts @@ -2206,19 +2206,19 @@ export const enMetadataForms: NonNullable = { helpText: "Report type: tabular, summary, matrix or joined." }, dataset: { - label: "Dataset", + label: "Data Source", helpText: "The report reads its numbers from here; everyone sees only the records they have access to." }, values: { - label: "Values", - helpText: "The metrics to total or count (from the data source)." + label: "Metrics", + helpText: "The metrics to show, such as totals, counts, averages or ratios (from the data source)." }, rows: { - label: "Rows", + label: "Group By", helpText: "The fields to group by (from the data source)." }, columns: { - label: "Columns", + label: "Group Columns By", helpText: "Groups spread across the columns (matrix reports only)." }, order: { @@ -2307,7 +2307,7 @@ export const enMetadataForms: NonNullable = { }, "exportOptions.fileNamePrefix": { label: "File Name", - helpText: "The start of the downloaded file’s name, used instead of the report name." + helpText: "The start of the downloaded file’s name. Left empty, the file is named after the report’s label, or its name when it has no label." } } }, diff --git a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts index 0e55ea3744c..ecd06c12f2b 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts @@ -2307,7 +2307,7 @@ export const esESMetadataForms: NonNullable = }, "exportOptions.fileNamePrefix": { label: "Nombre de archivo", - helpText: "El inicio del nombre del archivo descargado, en lugar del nombre del informe." + helpText: "El inicio del nombre del archivo descargado. Si se deja vacío, el archivo toma la etiqueta del informe, o su nombre si no tiene etiqueta." } } }, diff --git a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts index f3d8abd24f3..e4b7872ff84 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts @@ -2307,7 +2307,7 @@ export const jaJPMetadataForms: NonNullable = }, "exportOptions.fileNamePrefix": { label: "ファイル名", - helpText: "ダウンロードするファイル名の先頭部分。レポート名の代わりに使われます。" + helpText: "ダウンロードするファイル名の先頭部分。空欄の場合はレポートの表示名が使われ、表示名がない場合は名前が使われます。" } } }, diff --git a/packages/platform-objects/src/apps/translations/report-dataset-panel-echo-decisions.test.ts b/packages/platform-objects/src/apps/translations/report-dataset-panel-echo-decisions.test.ts index b0ee04d35d4..61e61e80f62 100644 --- a/packages/platform-objects/src/apps/translations/report-dataset-panel-echo-decisions.test.ts +++ b/packages/platform-objects/src/apps/translations/report-dataset-panel-echo-decisions.test.ts @@ -83,9 +83,9 @@ const DECISIONS: readonly Decision[] = [ type: 'report', key: 'dataset', prop: 'label', - en: 'Dataset', + en: 'Data Source', verdict: ALL_TRANSLATE, - reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.dataset'].`, + reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.dataset']. ⚠️ #36838 renamed this \`en\` label from "Dataset" to "Data Source", the title the blocks grid already gives the same key, so one form names it once. Re-read against the new English: each translated value is still byte-identical to its blocks twin, whose \`en\` is now the same string, so top level and blocks keep reading one word per locale. Those words carry the older dataset vocabulary at both positions; moving them to the business wording is a translator pass over both positions together, not this rename.`, }, { type: 'report', @@ -100,26 +100,26 @@ const DECISIONS: readonly Decision[] = [ type: 'report', key: 'values', prop: 'label', - en: 'Values', + en: 'Metrics', verdict: ALL_TRANSLATE, - reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.values'].`, + reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.values']. ⚠️ #36838 renamed this \`en\` label from "Values" to "Metrics", the title the blocks grid already gives the same key, so one form names it once. Re-read against the new English: each translated value is still byte-identical to its blocks twin, whose \`en\` is now the same string, so top level and blocks keep reading one word per locale. Those words carry the older dataset vocabulary at both positions; moving them to the business wording is a translator pass over both positions together, not this rename.`, }, { type: 'report', key: 'values', prop: 'helpText', - en: 'The metrics to total or count (from the data source).', + en: 'The metrics to show, such as totals, counts, averages or ratios (from the data source).', verdict: ALL_TRANSLATE, reason: - 'Prose. Its own sibling order.helpText names the same two vocabularies (rows/columns dimensions, values measures) in authored text in every locale, so the vocabulary existed and this leaf simply never got it. ⚠️ #36447 reworded this `en` source into business terms (from "Measure names (from the dataset) to display"); the zh-CN / ja-JP / es-ES verdicts and values above were taken against the OLD English and were not re-judged.', + 'Prose. Its own sibling order.helpText names the same two vocabularies (rows/columns dimensions, values measures) in authored text in every locale, so the vocabulary existed and this leaf simply never got it. ⚠️ #36447 reworded this `en` source into business terms (from "Measure names (from the dataset) to display"); the zh-CN / ja-JP / es-ES verdicts and values above were taken against the OLD English and were not re-judged. ⚠️ #36838 reworded it again (from "The metrics to total or count (from the data source)."), because a measure may be any dataset measure, not only a total or a count. Re-read against that English: the three values say "the measure names to show" and promise no narrower set, so they stay true; their dataset vocabulary is left to a translator pass (ja-JP and es-ES: #36836).', }, { type: 'report', key: 'rows', prop: 'label', - en: 'Rows', + en: 'Group By', verdict: ALL_TRANSLATE, - reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.rows'], and the adjacent top-level columns is authored on the same panel.`, + reason: `${SIBLING_PRECEDENT} Precedent: report.fields['blocks.rows'], and the adjacent top-level columns is authored on the same panel. ⚠️ #36838 renamed this \`en\` label from "Rows" to "Group By", the title the blocks grid already gives the same key, so one form names it once. Re-read against the new English: each translated value is still byte-identical to its blocks twin, whose \`en\` is now the same string, so top level and blocks keep reading one word per locale. Those words carry the older axis vocabulary at both positions; moving them to the business wording is a translator pass over both positions together, not this rename.`, }, { type: 'report', diff --git a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts index 7db1e59f6fe..eed2607f37d 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts @@ -2307,7 +2307,7 @@ export const zhCNMetadataForms: NonNullable = }, "exportOptions.fileNamePrefix": { label: "文件名", - helpText: "下载文件名的开头,用来代替报表名称" + helpText: "下载文件名的开头。留空时以报表的显示名称命名,没有显示名称时用名称" } } }, diff --git a/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts b/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts index 16fced4d737..60bede55bc6 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts +++ b/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts @@ -343,10 +343,13 @@ export const ZH_CN_SPEC_FORMS: NonNullable = { 'blocks.values': { label: '指标' }, 'blocks.runtimeFilter': { label: '运行时筛选' }, 'blocks.order': { label: '排序' }, - runtimeFilter: { label: '运行时筛选', helpText: '渲染时的范围筛选,在查询时以 AND 方式并入' }, + // ⟨36373⟩ follows the English (objectstack#36838); the platform's zh-CN row is + // the ledger-pinned rendering of the older render-time / AND sentence. + runtimeFilter: { label: '运行时筛选', helpText: '每次显示报表时都会应用的筛选,叠加在数据来源自身的条件之上' }, chart: { label: '图表', helpText: '图表类型与配置' }, // ⟨36373⟩ dateRange · exportOptions - dateRange: { label: '日期范围', helpText: '默认时间段与自定义范围开关。按数据来源里的一个日期分组筛选;只有一个日期分组时可留空' }, + // The date-grouping sentence lives on the `dateRange.dimension` child below (objectstack#36838). + dateRange: { label: '日期范围', helpText: '打开报表时显示的时间段,以及使用者能否自己选择范围' }, exportOptions: { label: '导出选项', helpText: '下载格式(csv、xlsx)与文件名。谁可以下载由数据来源对象上的导出权限决定' }, // The children `report.form.ts` declares for both composites (objectstack#36447), // copied from the platform zh-CN bundle like every unmarked row here. @@ -355,7 +358,7 @@ export const ZH_CN_SPEC_FORMS: NonNullable = { 'dateRange.allowCustomRange': { label: '允许自定义范围', helpText: '允许使用者自己选择开始和结束日期' }, 'exportOptions.formats': { label: '格式', helpText: '可下载的格式。不设置时提供 csv 与 xlsx;空列表则关闭下载' }, 'exportOptions.includeHeaders': { label: '包含表头', helpText: '在下载文件的第一行写入列名' }, - 'exportOptions.fileNamePrefix': { label: '文件名', helpText: '下载文件名的开头,用来代替报表名称' }, + 'exportOptions.fileNamePrefix': { label: '文件名', helpText: '下载文件名的开头。留空时以报表的显示名称命名,没有显示名称时用名称' }, }, }, From 8b0e79082988ba26755ccaeef51bf641fe02dc24 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 05:49:29 +0000 Subject: [PATCH 3/4] test(platform-objects): the Dataset twin points at the dataset type label Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB --- .../report-form-echo-decisions.test.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/platform-objects/src/apps/translations/report-form-echo-decisions.test.ts b/packages/platform-objects/src/apps/translations/report-form-echo-decisions.test.ts index 73959fc2718..bd56cd51695 100644 --- a/packages/platform-objects/src/apps/translations/report-form-echo-decisions.test.ts +++ b/packages/platform-objects/src/apps/translations/report-form-echo-decisions.test.ts @@ -96,6 +96,13 @@ // `dataset_binding` description, the `drilldown` hint and the `runtimeFilter` // hint — and each row says its verdicts were taken against the old English.) // +// (#36838 gave the top-level `dataset` / `values` / `rows` / `columns` rows the +// blocks grid's titles — Data Source / Metrics / Group By / Group Columns By — +// where they read the humanized keys. Each label leaf already existed, so the +// population, the field leaves and the inward negatives did not move, and none +// of the six decided rows moved. The "Dataset" twin below now points at the +// English the heading was rendered from on the dataset type's own label.) +// // ## ⚠️⚠️ The phantom-translation trap — and why this family is the SHARP case // // `reportForm` declares NO label on `drilldown` and NO label on `runtimeFilter` @@ -788,7 +795,13 @@ describe('#19403 round 9 — one schema key, one rendering', () => { // Round 5's discipline, from the other side: a row that names a twin has to // be able to point at it. const en = enMetadataForms as Record; - expect(en.report?.fields?.dataset?.label).toBe('Dataset'); + // #36838 renamed the report row's English to "Data Source", the blocks + // grid's term; its translated values (asserted below) did not move. The + // English word "Dataset" this heading was rendered from still has an + // authored home with the SAME three renderings: the metadata type's own + // label, asserted below as well. + expect(en.report?.fields?.dataset?.label).toBe('Data Source'); + expect(en.dataset?.label).toBe('Dataset'); expect(en.dataset?.sections?.measures?.label).toBe('Measures'); expect(en.dataset?.sections?.dimensions?.label).toBe('Dimensions'); expect(String(en.dataset?.fields?.filter?.helpText)).toContain('ANDed into every query'); @@ -817,6 +830,7 @@ describe('#19403 round 9 — one schema key, one rendering', () => { for (const [locale, forms] of TRANSLATED_LOCALES) { const want = expected[locale]; expect(String(forms.report?.fields?.dataset?.label), `${locale} the Dataset twin moved`).toBe(want.dataset); + expect(String(forms.dataset?.label), `${locale} the dataset type label no longer reads the Dataset twin`).toBe(want.dataset); expect(String(forms.dataset?.sections?.measures?.label), `${locale} the Measures twin moved`).toBe(want.measures); expect(String(forms.dataset?.sections?.dimensions?.label), `${locale} the Dimensions twin moved`).toBe( want.dimensions, From cf23885ef91081bbd511897baf7b74c561cec8b6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 05:54:29 +0000 Subject: [PATCH 4/4] chore(changeset): the report form speaks one vocabulary Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB --- .changeset/36838-report-form-one-vocabulary.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changeset/36838-report-form-one-vocabulary.md diff --git a/.changeset/36838-report-form-one-vocabulary.md b/.changeset/36838-report-form-one-vocabulary.md new file mode 100644 index 00000000000..a25da17e1b7 --- /dev/null +++ b/.changeset/36838-report-form-one-vocabulary.md @@ -0,0 +1,12 @@ +--- +'@objectstack/spec': patch +'@objectstack/platform-objects': patch +'@object-ui/app-shell': patch +--- + +Clause-②: no +Metadata-protocol: none + +The report authoring form now names its top-level data rows with the same words as its joined-blocks grid: Data Source, Metrics, Group By and Group Columns By, where they read Dataset, Values, Rows and Columns. One form no longer calls the same setting by two names. The Metrics hint no longer says a metric is only a total or a count; it can be any measure of the data source, such as an average or a ratio. The File Name hint now says what the download does: the prefix takes the place of the report's label, and an empty prefix names the file after the label, or after the report's name when it has no label. + +Only prose moved. No key, accepted value, default or section title changed. The platform metadata-form bundles are regenerated, the File Name hint is re-translated in zh-CN, ja-JP and es-ES, and the console's zh-CN overlay now follows the current English for the Date Range and Runtime Filter hints.