Repository navigation
feat(plugin-report): the report page reads dateRange — a period chip and one timeDimensions window - #27070
Conversation
…and one timeDimensions window Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
…live; changeset Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
…te pair Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
席位核对ACCEPT · 席位意见:报表声明了
|
📓 Docs Drift Check
What this run could not see
Coarse fallback — 147 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
…s a silence pin Claude-Session: https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc Co-authored-by: Claude <noreply@anthropic.com>
席位核对ACCEPT · 席位意见:新提交只改了一个测试,原测试在注释里就写明
|
Requested by Warren · project thread
Refs #25873 (item: the report page reads dateRange)
Clause-②: no
Metadata-protocol: none
维护者速读
dateRange后,报表页顶部出现时间范围选择(全部时间、仪表盘同款预设、可选自定义起止日期),表格、交叉表和内嵌图表都只统计所选时间段。dateRange,但此前没有任何渲染器读取它,报表总是显示全部时间。dateRange的报表发出的查询与之前逐字节相同;风险限于声明了它的报表。回滚即还原本 PR。ui/packages/plugin-report/src/ReportDateRange.tsx(选择器与维度解析)、DatasetReportRenderer.tsx中useDatasetRows的timeDimensions一行、packages/spec/liveness/report.json的dateRange子树。pnpm --dir ui exec vitest run packages/plugin-report/src/__tests__/DatasetReportRenderer.dateRange-25873.test.tsx,预期 8 个测试全部通过。What changes
dateRangedraws a date-range chip above its body (ReportDateRangeControl): All time, the dashboard'sDATE_RANGE_PRESETSunder the dashboard'sdashboard.filters.range.*labels, and Custom… (two date inputs) unlessallowCustomRange: false. It opens ondefaultRange, or the spec defaultthis_month;customopens the custom pick with no window until both ends are named.useDatasetRows, as oneselection.timeDimensionsentry{ dimension, dateRange }with nogranularity: a preset by name, a custom pick as[start, end], All time as no entry. The window is part of the refetch signature, so a new pick re-queries.dimensiongoes on the wire as written. Omitted, the renderer reads the dataset definition (/api/v1/meta/dataset/NAMEthrough the host'sapiFetch, the readObjectChart's dataset path makes) before any query and uses its onetype: 'date'dimension. None or several draws that authoring error in place of the body and queries nothing, so no unwindowed table renders under a period chip.dateRangemeans no chip, no dataset-definition read, and the selection posted before.joinedreports (where the spec refusesdateRange) are not read.packages/spec/liveness/report.json:dateRangeand its three children flipplanned→liveciting the read points;authorWarn/authorHintdropped;state-counts/report.mdregenerated.exportOptionsstaysplanned(slice 2).report.dateRange.{from,to,datasetUnreadable,noSingleDateDimension}in all ten locale packs (the German pack names the dataset without a „“ pair, whichde-quote-pairing-3876.test.tscounts).@object-ui/plugin-reportpatch,@object-ui/i18npatch. No@object-ui/coreedit was needed:DATE_RANGE_PRESETSis already exported.Tests
DatasetReportRenderer.dateRange-25873.test.tsx, 8 cases: thedefaultRangewindow on every query (table and chart) with the chip text; chip change re-queries (this_quarter, then All time = no entry); custom[start, end]only once both ends are set;allowCustomRange: falseoffers no Custom…; absentdefaultRange=this_month; omitted dimension resolved from the dataset definition before the first query; two date dimensions = error, zero queries; CONTROL: nodateRange= no chip, no definition read, notimeDimensionskey.cff7be71): deleting thetimeDimensionsspread inuseDatasetRowsthroughscripts/ablation-replace.mjs(anchor 1 → 0) turns the 5 cases that assert a posted window red; the 3 that assert none is needed (the control, the two-date-dimension error, the no-Custom case) stay green, as expected. Restored blob = HEAD blobfe27e545.Readings
pnpm --dir ui exec vitest run packages/i18n/ packages/plugin-report/afterpnpm --filter @object-ui/plugin-report run type-check: VERDICT command-exit 0, Test Files 118 passed, Tests 1638 passed / 20 skipped.pnpm --dir ui run check:new-line-citations: 0 new citations, exit 0.react-refresh/only-export-components/ testanykinds).node scripts/pm/dispatch-gates.mjs --commands: 69 derived families;--ranreconciliation: 68 run, all exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads, exit 3 PREREQUISITE NOT MET: not every package has adist/in this worktree; CI runs it).check:livenessfirst exited 1 (state-counts stale), passed aftergen:liveness-counts;check-plugin-teardown-shape.mjs --self-testfirst exited 3 (its positive-control sha was outside the shallow clone), passed after fetching it.Acceptance notes
runtimeFilterand the bucket, not the period, so the record list it opens is not limited to the window (a superset, the same direction the server's drill metadata already takes for unknown date field types). Carrying the window into the drill needs the host (ReportView, app-shell), outside this slice's file surface; listed in the report for the seat.defaultRange.Verification
Gates and tests above were run at head
3bbafe81.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran; the repo-widepnpm lintis CI-owned, local eslint on the touched files is 0 errors.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc
Generated by Claude Code