You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48c5484
Browse filesBrowse the repository at this point in the historyBrowse files
fix(spec): the report panel's English rows read in business terms (#36814)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9Gqqp1VYZwEqbXEm1YsTjU)_Fixes#36447
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB
## 维护者速读
-
报表设计器右侧属性面板在英文界面下,所有说明文字和栏目名改成业务用语(数据来源、分组、指标、排序),时间段与导出下面的六个子项也各有自己的名称和说明,与中文面板说法一致;日文、西班牙文同步补上了新增的六项。
- 属于"报表与仪表盘面板说业务话"这项体验工作的英文收尾,替用英文界面搭报表的业务管理员解决看不懂开发术语的问题。
- 只改了说明文字和表单排布,不改任何可保存的设置;出错最多是某句提示读起来别扭,直接撤回即可。
- 无
## What changes
The report authoring form (`packages/spec/src/ui/report.form.ts`)
produces the English rows the console's report panel draws below its
curated controls. Per the seat route (producer-first, no `en` overlay,
no rename of a section title whose key is slugged from its label), every
such row now reads in business terms carrying the zh-CN meaning: data
source, grouping, metric, sort.
- **Round 1**: reworded the section descriptions and hints that no pin
held.
- **Round 2**, on the seat's widened surface (claim amendment
7119493070):
- Rewords the six ledger-pinned hints and moves the two platform-objects
echo-decision ledgers' `en` sources with them. ⚠️ Each moved row records
that its zh-CN / ja-JP / es-ES verdicts and values were taken against
the OLD English and were not re-judged.
- Declares the `dateRange` and `exportOptions` children and a
Description hint as form rows, with a completeness pin
(`report-form-composite-children.test.ts`, the #30267 view-form shape).
- Renames the joined-block and sort row titles in the form and in the
item schema `.meta({ title })` together, which the repeater-item-titles
pin requires.
- **Translations**: the 13 new catalog leaves are regenerated in every
platform `*.metadata-forms.generated.ts`, with zh-CN, ja-JP and es-ES
values authored. The other locales carry the English fill and its
provenance entry.
- The console's zh overlay (`metadata-form-zh-cn.ts`) carries the six
new children: that file's rule is that every `report` field string the
curated inspector renders lives there, copied from the platform zh-CN
bundle.
- **Measured premise correction**: the dashboard **widget** panel
(`DashboardWidgetInspector.tsx`) draws **zero** rows from spec text. Its
rows are console strings (`engine.inspector.widget.*`) that already read
"Data source", "Group by", "Metrics" in English.
**Row table — every English row the report panel draws from spec text**
(lines on base 4c93f88; enumerated by rendering
`ReportDefaultInspector` in English for summary, matrix and joined
reports with every section open, then re-rendered at the final head)
| Row | Source | Before | After |
|:---|:---|:---|:---|
| Section "Basics", description | report.form.ts:24 | Identity and
report type. | unchanged (same meaning as zh-CN 标识与报表类型) |
| Description, hint | i18n.zod.ts:275 (shared `I18nLabel` describe; no
form hint) | Display label — the default-language string, or an inline
locale map ({ en, "zh-CN" }) resolved at render time | One sentence on
what this report shows, displayed under its name. (form row hint; the
shared describe is untouched) |
| Section "Dataset binding", label | report.form.ts:34 | Dataset binding
| **left over** (slugged section key) |
| Section "Dataset binding", description | report.form.ts:35 | The
semantic-layer dataset this report renders. Values are the dataset’s
measures; rows are its dimensions. | Where the report’s numbers come
from, how they are grouped and sorted, and which records open when you
click a row. |
| Order, label | prettified | Order | Sort Order |
| Order, hint | report.form.ts:51 | Sort keys, most significant first (a
rows/columns dimension or a values measure). Time dimensions are
chronological by default. | What to sort by, most important first (a
grouping or a metric). Time groupings sort in date order by default. |
| Order rows, label | report.form.ts:57 = report.zod.ts:107 title |
Order By | Sort By |
| Drilldown, hint | report.form.ts:61 | Click an aggregated row/cell to
open the underlying records | Click a summarized row or cell to open the
records behind it. |
| Section "Joined blocks", label | report.form.ts:65 | Joined blocks |
**left over** (slugged section key) |
| Section "Joined blocks", description | report.form.ts:66 | Additional
dataset-bound blocks stacked into a single report (joined reports only).
| Other blocks stacked into the same report, each with its own data
source (joined reports only). |
| Blocks, hint | report.form.ts:72 | Dataset-bound sub-reports (joined
report only) | Sub-reports, each with its own data source (joined
reports only). |
| Blocks rows | report.form.ts:89-94 = `JoinedReportBlockSchema` titles
| Dataset / Rows / Columns / Values / Order | Data Source / Group By /
Group Columns By / Metrics / Sort Order |
| Section "Filter & chart", description | report.form.ts:101 |
Render-time scope filter and chart presentation. | Filter conditions and
how the chart is shown. |
| Runtime Filter, hint | report.form.ts:105 | Render-time scope filter,
ANDed at query time | A filter applied whenever the report is shown, on
top of the data source’s own conditions. |
| Date Range, hint | report.form.ts:122 | Default period and
custom-range switch. The dimension must be a date dimension of the
dataset; leave it empty when the dataset has exactly one. | The period
the report opens with, and whether people may choose their own range. |
| Date Range children | report.zod.ts:702-705 describes (no form rows) |
Dimension: Dataset dimension (declared `type: 'date'`) the window
applies to; omitted = the dataset's one date dimension · Default Range:
Default date range preset · Allow Custom Range: Allow users to pick a
custom date range | Date Field: The date grouping of the data source the
period applies to. Leave it empty when the data source has only one. ·
Default Period: The period the report opens with. · Allow Custom Range:
Let people pick their own start and end dates. |
| Export Options, hint | report.form.ts:123 | Download formats (csv,
xlsx) and file name. Who may download is the export permission on the
dataset object. | Download formats (csv, xlsx) and file name. Who may
download is set by the export permission on the data source’s object. |
| Export Options children | list-view-export-options.ts:195-198
describes (no form rows) | Formats: Formats the report's export control
offers (default: ['csv', 'xlsx']); an empty list turns the control off ·
Include Headers: Include column headers in the exported file (default
true) · File Name Prefix: Download file name prefix — replaces the
report label in the generated file name | Formats: The download formats
offered. Left unset, both csv and xlsx are offered; an empty list turns
downloads off. · Include Headers: Put the column names in the first row
of the downloaded file. · File Name: The start of the downloaded file’s
name, used instead of the report name. |
Rows the panel does not draw, because its curated controls replace them
(the server-served form still renders them):
| Row | Source | Before | After |
|:---|:---|:---|:---|
| Type, hint | report.form.ts:30 | Report type:
tabular/summary/matrix/joined | Report type: tabular, summary, matrix or
joined. |
| Dataset, hint | report.form.ts:39 | Dataset to bind
(measures/dimensions come from its semantic layer) | The report reads
its numbers from here; everyone sees only the records they have access
to. |
| Values, hint | report.form.ts:40 | Measure names (from the dataset) to
display | The metrics to total or count (from the data source). |
| Rows, hint | report.form.ts:41 | Dimension names (from the dataset) to
group rows by | The fields to group by (from the data source). |
| Columns, hint | report.form.ts:43 | Dimension names across (matrix
only) | Groups spread across the columns (matrix reports only). |
| Chart, hint | report.form.ts:108 | Chart config (type, legend, colors)
| Chart type and settings. |
**Left over — section titles whose key is slugged from the label** (not
renamed, per the seat route: renaming moves the `dataset_binding` /
`joined_blocks` keys of the zh overlay and of every `metadataForms`
catalog):
- "Dataset binding" (report.form.ts:34)
- "Joined blocks" (report.form.ts:65)
Unchanged on purpose: the "Runtime Filter" and "Drilldown" labels (zh-CN
reads the same words; the ledger records both as correct English). The
top-level Dataset / Values / Rows / Columns labels are not drawn by the
panel. The shared `I18nLabel` and list-view export describes are
untouched, per the seat route.
## Tests
<details><summary>Spec, platform translations, console tests — green at
60b7741; the last commit f2cbae0 touches two test files only, re-run
green</summary>
- spec: `pnpm --filter @objectstack/spec exec vitest run src/ui/` plus
repeater-item-titles, metadata-form-declared-rows.pin, i18n-resolver and
schema-index: Test Files 192 passed (192), Tests 7209 passed (7209).
`pnpm --filter @objectstack/spec typecheck` exit 0.
- New pin `src/ui/report-form-composite-children.test.ts`: 6 tests.
Ablation through `scripts/ablation-replace.mjs`, deleting the
`includeHeaders` row: "Tests 1 failed / 5 passed", restored blob ==
HEAD.
- platform-objects: `pnpm --filter @objectstack/platform-objects test`:
Test Files 125 passed (125), Tests 2126 passed (2126). This includes
both report echo-decision ledgers and the object-lifecycle positive
control (763, then 765 after the merge of main, then 771).
- ui, from `ui/`, over every report-form reader (all
`ReportDefaultInspector*`, `panelBusinessWording-36373`,
`report-schema`, `metadata-form-i18n`, `InterfacesPillar.report*`,
`metadataError.report*`, `ReportConfigPanel*`, `ReportView*` and more,
35 files): first run 17 failed in 5 files, all pinning the old labels.
After those pins moved: 5 passed (5), 37 tests; the other 30 files
passed.
- At merged head 60b7741: platform-objects 125/125 files, 2126/2126
tests; spec 192/192, 7209/7209; ui 35/35, 273/273. Every run exited 0
under the verify lock.
- f2cbae0: `check:test-source-alias` red on CI (lane `lint-ci-engine`,
rolled up as Lint & Repo Gates). Cause: the two edited pins reach the
console's dynamic `@objectstack/lint` / `@objectstack/formula` imports
inside a case's clock. Fix: module-top side-effect imports. Local
result: `check-test-source-alias OK`, EXIT=0, and the two files pass 2/2
files, 6/6 tests.
</details>
## Acceptance notes
- The ja-JP and es-ES values of the six reworded ledger rows still
render the old developer meaning (the zh-CN values already matched the
business meaning). Re-judging them belongs to a translator pass, not
this card.
- The Default Period select shows the stored preset (`this_month`) as
its option text, in both locales: the enum has no option labels in this
form. Out of scope here.
- Open draft PR #36802 regenerates the same bundles; the generated files
are `merge=os-regen`, so whichever lands second regenerates.
## Verification
First read, by risk: `packages/spec/src/ui/report.form.ts` (the declared
children and every reworded row);
`packages/platform-objects/src/apps/translations/report-form-echo-decisions.test.ts`
(moved `en` sources, counts and their reason);
`packages/spec/src/ui/report.zod.ts` (six `.meta({ title })` strings,
prose only).
Two-minute check: open a summary report in the Studio with the console
in English and expand "Period & export". It should show Date Field,
Default Period and Allow Custom Range, then Formats, Include Headers and
File Name, each with a plain-language hint. Switch to Chinese and the
same rows read 日期字段 / 默认时间段 / 允许自定义范围 / 格式 / 包含表头 / 文件名.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB)_
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufziH9MVhWYLVCiw5eXB -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
The report authoring form now reads in business terms: data source, grouping, metric. It no longer uses the schema's own vocabulary (dataset, dimension, measure, "render-time", "ANDed"), and its English matches what the Chinese report panel says. Every section description and field hint the report panel draws was reworded. The `dateRange` and `exportOptions` composites now declare their children as form rows (Date Field, Default Period, Allow Custom Range; Formats, Include Headers, File Name), each with its own hint, so the panel no longer shows the schema descriptions for them. The Description row gained its own hint. The joined-block and sort row titles now read Data Source, Group By, Group Columns By, Metrics, Sort Order and Sort By, in the form and in the item schema `title` together.
11
+
12
+
Only prose and form layout moved. No key, accepted value or section title changed, and nothing an author can write or validate is different. The platform metadata-form bundles are regenerated, with zh-CN, ja-JP and es-ES translations for the 13 new rows, and the console's zh-CN overlay carries the new rows too.
helpText: "الفترة الافتراضية ومفتاح النطاق المخصّص. يجب أن يكون البُعد بُعدًا تاريخيًا من مجموعة البيانات؛ اتركه فارغًا حين لا تحتوي مجموعة البيانات إلا على بُعد واحد منه."
2282
2283
},
2284
+
"dateRange.dimension": {
2285
+
label: "Date Field",
2286
+
helpText: "The date grouping of the data source the period applies to. Leave it empty when the data source has only one."
2287
+
},
2288
+
"dateRange.defaultRange": {
2289
+
label: "Default Period",
2290
+
helpText: "The period the report opens with."
2291
+
},
2292
+
"dateRange.allowCustomRange": {
2293
+
label: "Allow Custom Range",
2294
+
helpText: "Let people pick their own start and end dates."
2295
+
},
2283
2296
exportOptions: {
2284
2297
label: "خيارات التصدير",
2285
2298
helpText: "صيغ التنزيل (csv، xlsx) واسم الملف. من يحق له التنزيل يحدده إذن التصدير على كائن مجموعة البيانات."
2299
+
},
2300
+
"exportOptions.formats": {
2301
+
label: "Formats",
2302
+
helpText: "The download formats offered. Left unset, both csv and xlsx are offered; an empty list turns downloads off."
2303
+
},
2304
+
"exportOptions.includeHeaders": {
2305
+
label: "Include Headers",
2306
+
helpText: "Put the column names in the first row of the downloaded file."
2307
+
},
2308
+
"exportOptions.fileNamePrefix": {
2309
+
label: "File Name",
2310
+
helpText: "The start of the downloaded file’s name, used instead of the report name."
helpText: "Standardzeitraum und Umschalter für einen benutzerdefinierten Bereich. Die Dimension muss eine Datumsdimension des Datasets sein; leer lassen, wenn das Dataset genau eine hat."
2282
2283
},
2284
+
"dateRange.dimension": {
2285
+
label: "Date Field",
2286
+
helpText: "The date grouping of the data source the period applies to. Leave it empty when the data source has only one."
2287
+
},
2288
+
"dateRange.defaultRange": {
2289
+
label: "Default Period",
2290
+
helpText: "The period the report opens with."
2291
+
},
2292
+
"dateRange.allowCustomRange": {
2293
+
label: "Allow Custom Range",
2294
+
helpText: "Let people pick their own start and end dates."
2295
+
},
2283
2296
exportOptions: {
2284
2297
label: "Exportoptionen",
2285
2298
helpText: "Download-Formate (csv, xlsx) und Dateiname. Wer herunterladen darf, regelt die Exportberechtigung für das Dataset-Objekt."
2299
+
},
2300
+
"exportOptions.formats": {
2301
+
label: "Formats",
2302
+
helpText: "The download formats offered. Left unset, both csv and xlsx are offered; an empty list turns downloads off."
2303
+
},
2304
+
"exportOptions.includeHeaders": {
2305
+
label: "Include Headers",
2306
+
helpText: "Put the column names in the first row of the downloaded file."
2307
+
},
2308
+
"exportOptions.fileNamePrefix": {
2309
+
label: "File Name",
2310
+
helpText: "The start of the downloaded file’s name, used instead of the report name."
helpText: "Render-time scope filter, ANDed at query time"
2274
+
helpText: "A filter applied whenever the report is shown, on top of the data source’s own conditions."
2274
2275
},
2275
2276
chart: {
2276
2277
label: "Chart",
2277
-
helpText: "Chart config (type, legend, colors)"
2278
+
helpText: "Chart type and settings."
2278
2279
},
2279
2280
dateRange: {
2280
2281
label: "Date Range",
2281
-
helpText: "Default period and custom-range switch. The dimension must be a date dimension of the dataset; leave it empty when the dataset has exactly one."
2282
+
helpText: "The period the report opens with, and whether people may choose their own range."
2283
+
},
2284
+
"dateRange.dimension": {
2285
+
label: "Date Field",
2286
+
helpText: "The date grouping of the data source the period applies to. Leave it empty when the data source has only one."
2287
+
},
2288
+
"dateRange.defaultRange": {
2289
+
label: "Default Period",
2290
+
helpText: "The period the report opens with."
2291
+
},
2292
+
"dateRange.allowCustomRange": {
2293
+
label: "Allow Custom Range",
2294
+
helpText: "Let people pick their own start and end dates."
2282
2295
},
2283
2296
exportOptions: {
2284
2297
label: "Export Options",
2285
-
helpText: "Download formats (csv, xlsx) and file name. Who may download is the export permission on the dataset object."
2298
+
helpText: "Download formats (csv, xlsx) and file name. Who may download is set by the export permission on the data source’s object."
2299
+
},
2300
+
"exportOptions.formats": {
2301
+
label: "Formats",
2302
+
helpText: "The download formats offered. Left unset, both csv and xlsx are offered; an empty list turns downloads off."
2303
+
},
2304
+
"exportOptions.includeHeaders": {
2305
+
label: "Include Headers",
2306
+
helpText: "Put the column names in the first row of the downloaded file."
2307
+
},
2308
+
"exportOptions.fileNamePrefix": {
2309
+
label: "File Name",
2310
+
helpText: "The start of the downloaded file’s name, used instead of the report name."
helpText: "Periodo predeterminado e interruptor de rango personalizado. La dimensión debe ser una dimensión de fecha del conjunto de datos; déjela vacía cuando el conjunto de datos tenga exactamente una."
2282
2283
},
2284
+
"dateRange.dimension": {
2285
+
label: "Campo de fecha",
2286
+
helpText: "La agrupación de fecha de la fuente de datos a la que se aplica el período. Déjelo vacío si la fuente de datos solo tiene una."
2287
+
},
2288
+
"dateRange.defaultRange": {
2289
+
label: "Período predeterminado",
2290
+
helpText: "El período con el que se abre el informe."
2291
+
},
2292
+
"dateRange.allowCustomRange": {
2293
+
label: "Permitir rango personalizado",
2294
+
helpText: "Permite que cada persona elija sus propias fechas de inicio y fin."
2295
+
},
2283
2296
exportOptions: {
2284
2297
label: "Opciones de exportación",
2285
2298
helpText: "Formatos de descarga (csv, xlsx) y nombre de archivo. Quién puede descargar lo determina el permiso de exportación del objeto del conjunto de datos."
2299
+
},
2300
+
"exportOptions.formats": {
2301
+
label: "Formatos",
2302
+
helpText: "Los formatos de descarga ofrecidos. Sin definir, se ofrecen csv y xlsx; una lista vacía desactiva las descargas."
2303
+
},
2304
+
"exportOptions.includeHeaders": {
2305
+
label: "Incluir encabezados",
2306
+
helpText: "Pone los nombres de columna en la primera fila del archivo descargado."
2307
+
},
2308
+
"exportOptions.fileNamePrefix": {
2309
+
label: "Nombre de archivo",
2310
+
helpText: "El inicio del nombre del archivo descargado, en lugar del nombre del informe."
helpText: "Période par défaut et sélecteur de plage personnalisée. La dimension doit être une dimension de date du jeu de données ; laissez vide lorsque le jeu de données en a exactement une."
2282
2283
},
2284
+
"dateRange.dimension": {
2285
+
label: "Date Field",
2286
+
helpText: "The date grouping of the data source the period applies to. Leave it empty when the data source has only one."
2287
+
},
2288
+
"dateRange.defaultRange": {
2289
+
label: "Default Period",
2290
+
helpText: "The period the report opens with."
2291
+
},
2292
+
"dateRange.allowCustomRange": {
2293
+
label: "Allow Custom Range",
2294
+
helpText: "Let people pick their own start and end dates."
2295
+
},
2283
2296
exportOptions: {
2284
2297
label: "Options d’export",
2285
2298
helpText: "Formats de téléchargement (csv, xlsx) et nom de fichier. Qui peut télécharger dépend de l’autorisation d’export sur l’objet du jeu de données."
2299
+
},
2300
+
"exportOptions.formats": {
2301
+
label: "Formats",
2302
+
helpText: "The download formats offered. Left unset, both csv and xlsx are offered; an empty list turns downloads off."
2303
+
},
2304
+
"exportOptions.includeHeaders": {
2305
+
label: "Include Headers",
2306
+
helpText: "Put the column names in the first row of the downloaded file."
2307
+
},
2308
+
"exportOptions.fileNamePrefix": {
2309
+
label: "File Name",
2310
+
helpText: "The start of the downloaded file’s name, used instead of the report name."
0 commit comments