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 }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Dataset KPI / table / pivot / report captions still print the server's built-in Count: buildDatasetFieldHelpers.headerLabel ignores builtinAggregate (sibling of #7258) #7534
The same defect class as #7258, one seam over: a dataset result field the analytics service minted as a BUILT-IN default measure (label: 'Count', hard-coded English, objectstack#14492 background) still prints Count on a zh console on every surface that resolves its title through buildDatasetFieldHelpers().headerLabel instead of through buildChartSeries:
packages/plugin-dashboard/src/DatasetWidget.tsx — the metric / KPI widget's measure caption (the isMetric branch reads measureField + headerLabel), and the table / pivot column headers (values.map(... headerLabel(m)), around line 942)
packages/plugin-report/src/DatasetReportRenderer.tsx — the summary table header (headerLabel(c), around line 576), the single-value metric caption and the report chart's measureLabel (authoredSeriesLabel(...) ?? headerLabel(yAxis), around line 965), and the third buildDatasetFieldHelpers site around line 1240
packages/app-shell/src/views/metadata-admin/previews/DatasetPreview.tsx:135 — the dataset preview's headers
headerLabel is measureField(name)?.label ?? name, then the object-field i18n convention; it never looks at the optional builtinAggregate discriminator objectstack#14492 puts on the wire, so a report chart whose legend now reads 计数 (via buildChartSeries, #7258) still captions the same measure Count in the table beneath it.
The maintainer ruling on #7258 (2026-09-02, option B) scoped the consumer half to buildChartSeries() / labelOf(), and this sibling family spans a fifth package (app-shell) and five call sites. The resolver it needs already lands with #7258: resolveMeasureLabel(field, builtinAggregateLabels) in @object-ui/core and builtinAggregateLabels(tt) in @object-ui/i18n.
Mechanical fix
buildDatasetFieldHelpers(fields, object, fieldLabel, builtinAggregateLabels?) in packages/core/src/utils/dataset-format.ts: headerLabel takes the field through resolveMeasureLabel first (locale label for a recognised discriminator), then the existing fieldLabel convention, then the name — so the resolution order is one order on every surface.
Pass builtinAggregateLabels(tt) at the five call sites above.
Pin: a zh table header / KPI caption for a builtinAggregate: 'count' field reads 计数; an author-labelled measure stays verbatim (objectui#4106).
Blocked-by: objectstack-ai/objectstack#14492 (the wire field; #7258's consumer PR reads it structurally and compiles against spec 17.2.0, so this one can too).
Found while implementing #7258 (branch fix/chart-builtin-aggregate-label-7258); filed rather than folded in per the claim's file surface.
packages/core/src/utils/chart-series.ts:157 export function resolveMeasureLabel(field: ChartMeasureField, labels?: BuiltinAggregateLabels): string {
packages/core/src/utils/chart-series.ts:132 * `builtinAggregateLabels(tt)`). Partial on purpose: an aggregate the caller
packages/core/src/utils/chart-series.ts:61 * (objectui#4106). {@link resolveMeasureLabel} is the one reader.
⇒ #7258 的消费者半已合并,resolveMeasureLabel + builtinAggregateLabels 都可用。卡片自己也说 "#7258's consumer PR reads it structurally and compiles against spec 17.2.0, so this one can too"。进队列,不是 blocked。
Addressed in draft PR #7710 (batched with cloud#1984 and the other v1 UI fragments); the os-dev report for the batch is on cloud#1984. Note: cloud needs a .objectui-sha bump before this reaches the cloud product.
Activity
os-zhuang commentedon Sep 5, 2026
分诊 —
domain:ui/priority:p2/pm:queue/finding/i18n锚定 (anchoring):解析器落在
packages/core/src/utils/dataset-format.ts,五个调用点分布在plugin-dashboard/plugin-report/app-shell⇒ 全在 ui lane,一个 lane。⭐
Blocked-by实质上已解除 —— 所需解析器已在树上卡片写
Blocked-by: objectstack-ai/objectstack#14492(wire 字段)。objectui 侧要用的那个解析器已经落地:⇒ #7258 的消费者半已合并,
resolveMeasureLabel+builtinAggregateLabels都可用。卡片自己也说 "#7258's consumer PR reads it structurally and compiles against spec 17.2.0, so this one can too"。进队列,不是 blocked。在⚠️ 行号全部漂了
origin/maina472b07上复核 —— 五个调用点全在,⭐ 五个调用点,卡片数对了。 注意
DatasetWidget只有一处buildDatasetFieldHelpers调用(:750),KPI caption 与 table/pivot 表头共用同一次解构 —— 这对修法是好消息:DatasetWidget侧只需改一个调用点,就同时修好卡片列的两个表面。定级理由 ——
priority:p2buildChartSeries,仪表盘聚合图表轴标题 "Count" 未本地化(类别标签已本地化) #7258 修好的那一半),而它下方表格里同一个 measure 仍写Count。同一屏、同一个量、两种语言。measureLabel、元数据管理的数据集预览 —— 五个调用点、三个包。定型:Bug/i18n 接线,不踩 manual floor
给⚠️ 但它改的是
buildDatasetFieldHelpers加一个可选参数并在五处传入 ⇒ 不新增作者可写的键、不改协议、不改门禁。@object-ui/core的已发布函数签名(新增可选参数)⇒ 带 changeset。⛔ 给执行席的边界 —— 卡片给的三步方案是对的,照做
headerLabel先过resolveMeasureLabel(认得的 discriminator 走本地化标签),再走既有的fieldLabel约定,最后回落到 name。⛔ 不要在某个调用点上就地判断 —— 那正是本卡要消除的分叉。builtinAggregateLabels(tt),⛔ 漏一个就会留下一个说英文的表面,而它与旁边说中文的表面在同一屏。builtinAggregate: 'count'的字段在 zh 下读作「计数」;而作者自己标注的 measure 保持原样(objectui#4106)。⛔ 只钉第一条会让下一次"改进"把作者的标签也覆盖掉。resolveMeasureLabel是 partial on purpose(chart-series.ts:132明写)—— 调用方没给标签的 aggregate 会原样返回。⛔ 不要把它改成抛错或兜底成某个默认词,那会影响 仪表盘聚合图表轴标题 "Count" 未本地化(类别标签已本地化) #7258 已经落地的那条路径。⛔ 分诊席不认领、不派单、不写码。
Generated by Claude Code
hotlong commentedon Sep 5, 2026
Addressed in draft PR #7710 (batched with cloud#1984 and the other v1 UI fragments); the os-dev report for the batch is on cloud#1984. Note: cloud needs a
.objectui-shabump before this reaches the cloud product.