QA-source: objectstack-ai/objectstack#21782 · dashboards.chart-type-matrix · outside the item's clauses
A defect found while running dashboards.chart-type-matrix (outside the item's clauses) surfaced in the ObjectStack 17.7 pre-release checklist run objectstack-ai/objectstack#21782 (framework subject 316be321e, console pin 2e818d0b51ec). An independent verifier (VF3, RUNNER rule 7; code only) confirmed it: P3 (label only; the comparison values are right). It predates the 17.6.0 console pin 31971ff1e; no open duplicate was found. Owner: objectui.
Reproduction
- As admin,
PUT /api/v1/meta/dashboard/qa_compareto_probe?mode=draft with:
dateRange:{field:'created_at', defaultRange:'last_30_days'};
- a metric widget on dataset
showcase_task_metrics, values:['task_count'], compareTo:{kind:'previousPeriod'}.
POST /api/v1/meta/dashboard/qa_compareto_probe/publish.
- Server truth: the dataset query's
timeDimensions dateRange is [2026-09-04, 2026-10-04], and task_count__compare is 1, so the previous 30 days.
- Browser:
/_console/apps/showcase_app/dashboard/qa_compareto_probe.
- Expected: "vs previous period".
- Actual: the metric reads "9 ↑800%" "vs yesterday", and the line legend reads "Tasks · vs yesterday".
Mechanism
packages/core/src/utils/compare-to.ts:124-136 compareToTrendLabelKey regex-sniffs the raw filter for macro tokens (\btoday\b → vsYesterday).
plugin-dashboard/src/DatasetWidget.tsx:1097 reuses it on the ADR-0021 dataset path, where the framework executor shifts the dimension window to the equal-length window before it (packages/services/service-analytics/src/dataset-executor.ts:810-819 shiftRange).
- The heuristic is faithful only on the inline path (
compare-to.ts ~100-118). The same code is at 31971ff1e (DatasetWidget.tsx:995).
Done when
On the dataset path the label comes from the compareTo kind and the resolved window, not from filter-token sniffing (pinned).
Generated by Claude Code
QA-source: objectstack-ai/objectstack#21782 · dashboards.chart-type-matrix · outside the item's clauses
A defect found while running
dashboards.chart-type-matrix(outside the item's clauses) surfaced in the ObjectStack 17.7 pre-release checklist run objectstack-ai/objectstack#21782 (framework subject316be321e, console pin2e818d0b51ec). An independent verifier (VF3, RUNNER rule 7; code only) confirmed it: P3 (label only; the comparison values are right). It predates the 17.6.0 console pin31971ff1e; no open duplicate was found. Owner: objectui.Reproduction
PUT /api/v1/meta/dashboard/qa_compareto_probe?mode=draftwith:dateRange:{field:'created_at', defaultRange:'last_30_days'};showcase_task_metrics,values:['task_count'],compareTo:{kind:'previousPeriod'}.POST /api/v1/meta/dashboard/qa_compareto_probe/publish.timeDimensionsdateRange is[2026-09-04, 2026-10-04], andtask_count__compareis 1, so the previous 30 days./_console/apps/showcase_app/dashboard/qa_compareto_probe.Mechanism
packages/core/src/utils/compare-to.ts:124-136compareToTrendLabelKeyregex-sniffs the raw filter for macro tokens (\btoday\b→vsYesterday).plugin-dashboard/src/DatasetWidget.tsx:1097reuses it on the ADR-0021 dataset path, where the framework executor shifts the dimension window to the equal-length window before it (packages/services/service-analytics/src/dataset-executor.ts:810-819shiftRange).compare-to.ts~100-118). The same code is at31971ff1e(DatasetWidget.tsx:995).Done when
On the dataset path the label comes from the compareTo kind and the resolved window, not from filter-token sniffing (pinned).
Generated by Claude Code