Skip to content

feat(plugin-report): the report page reads dateRange — a period chip and one timeDimensions window - #27070

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-o6hswb
Oct 28, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-o6hswb

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Refs #25873 (item: the report page reads dateRange)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:报表声明了 dateRange 后,报表页顶部出现时间范围选择(全部时间、仪表盘同款预设、可选自定义起止日期),表格、交叉表和内嵌图表都只统计所选时间段。
  • 为什么改:裁决 B(时间范围 + 导出)的第一半;规格 spec(report): a report declares a dataset-dimension date range and export options #26548 已发布 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

  • The chip. A non-joined report that declares dateRange draws a date-range chip above its body (ReportDateRangeControl): All time, the dashboard's DATE_RANGE_PRESETS under the dashboard's dashboard.filters.range.* labels, and Custom… (two date inputs) unless allowCustomRange: false. It opens on defaultRange, or the spec default this_month; custom opens the custom pick with no window until both ends are named.
  • The window. The active window rides every dataset query the report makes (grouped table, matrix cross-tab, embedded chart) through the one fetch choke point useDatasetRows, as one selection.timeDimensions entry { dimension, dateRange } with no granularity: 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.
  • The dimension. A declared dimension goes on the wire as written. Omitted, the renderer reads the dataset definition (/api/v1/meta/dataset/NAME through the host's apiFetch, the read ObjectChart's dataset path makes) before any query and uses its one type: '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.
  • Unchanged without it. No dateRange means no chip, no dataset-definition read, and the selection posted before. joined reports (where the spec refuses dateRange) are not read.
  • Liveness. packages/spec/liveness/report.json: dateRange and its three children flip planned → live citing the read points; authorWarn / authorHint dropped; state-counts/report.md regenerated. exportOptions stays planned (slice 2).
  • i18n. report.dateRange.{from,to,datasetUnreadable,noSingleDateDimension} in all ten locale packs (the German pack names the dataset without a „“ pair, which de-quote-pairing-3876.test.ts counts).
  • Changeset: @object-ui/plugin-report patch, @object-ui/i18n patch. No @object-ui/core edit was needed: DATE_RANGE_PRESETS is already exported.

Tests

  • New DatasetReportRenderer.dateRange-25873.test.tsx, 8 cases: the defaultRange window 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: false offers no Custom…; absent defaultRange = this_month; omitted dimension resolved from the dataset definition before the first query; two date dimensions = error, zero queries; CONTROL: no dateRange = no chip, no definition read, no timeDimensions key.
  • Ablation (commit cff7be71): deleting the timeDimensions spread in useDatasetRows through scripts/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 blob fe27e545.
Readings
  • pnpm --dir ui exec vitest run packages/i18n/ packages/plugin-report/ after pnpm --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.
  • eslint on the three touched plugin-report files: 0 errors (warnings only, the package's existing react-refresh/only-export-components / test any kinds).
  • node scripts/pm/dispatch-gates.mjs --commands: 69 derived families; --ran reconciliation: 68 run, all exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads, exit 3 PREREQUISITE NOT MET: not every package has a dist/ in this worktree; CI runs it). check:liveness first exited 1 (state-counts stale), passed after gen:liveness-counts; check-plugin-teardown-shape.mjs --self-test first exited 3 (its positive-control sha was outside the shallow clone), passed after fetching it.

Acceptance notes

  • Drill-down from a windowed report: the drill event carries runtimeFilter and 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.
  • The picked period is component state, not URL state; a refresh reopens on defaultRange.

Verification

Gates and tests above were run at head 3bbafe81.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (No formatter ran; the repo-wide pnpm lint is CI-owned, local eslint on the touched files is 0 errors.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbXUwVZUJzwhehD3YCc


Generated by Claude Code

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:ui#2 · session_01JQwxbXpF772qWJjojJvRXw · head 3bbafe8116 · 2026-10-28T03:52Z

席位意见:报表声明了 dateRange 才出时间范围选择器,选中的时间窗口作用到表格、交叉表和图表的每一次查询;没声明的报表请求逐字节不变。下钻打开的明细还不受时间窗口限制,席位马上把它作为 #25873 的下一片派出。

  1. Shape: draft, base main; the body says Refs #25873 (item: the report page reads dateRange) and has no closing keyword, as this slice's order requires (export is slice 2). 16 files, +614/−21. Not governed (check-governed-merges --pr 27070: 0 of 16 paths), so the packages/spec/liveness/** edit is not under the Clause-② path limb (that limb is packages/spec/src/**). ≤ 3000 lines.
  2. Premise measured. Seat read of the diff:
    • The window goes into the one fetch choke point, useDatasetRows, as a single timeDimensions entry with no granularity, and it is part of the refetch signature.
    • The table, matrix and chart all receive it. A report with no dateRange adds no key and no dataset-definition read.
    • An omitted dimension is resolved from the dataset definition before any query. With zero or several date dimensions the error state is drawn instead of an unwindowed table.
    • Hooks run before the joined branch's early return, so their order is stable. joined is not read, per the spec refusal.
    • Liveness flips the dateRange subtree only to live, with the read point cited and authorWarn/authorHint dropped. exportOptions stays planned.
  3. Gate check-runs (pinned to head 3bbafe8116): in progress at this record; landing waits for every check to be green. The dev's local reading is 68/69 derived families exit 0. dual-build-cjs-loads is NOT MEASURED locally (exit 3, prerequisite); CI runs it, and its green there is part of the landing condition. New tests 8/8; ablation 5 red, then restored.
  4. Accepted deviations: @object-ui/i18n was touched, with 4 report.dateRange.* keys in all ten packs and a patch changeset. The order allowed new UI strings in every locale file of their family. Preset labels reuse dashboard.filters.*.
  5. Out of scope (Acceptance notes): drill-down from a windowed report opens a record list that is not limited to the period. DatasetDrillArgs carries runtimeFilter and the bucket, not the window, and ReportView (app-shell) builds the list. This is a user-visible superset, so the seat dispatches it as the next slice of [Decision] The report page offers only "Edit": should a shipped report get a time-range filter, export and subscription, and in which order #25873 rather than leaving it as a note. The picked period is component state, not URL state; this is noted only.
  6. Landing clause: not governed. When every check on the current head is green, the seat lands it (pr_ready + automerge_enable), or asks the maintainer to click if the classifier refuses. [Decision] The report page offers only "Edit": should a shipped report get a time-range filter, export and subscription, and in which order #25873 stays open: the drill-window slice and slice 2 (exportOptions) remain.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 2 changed file(s) yielded no anchor (packages/spec/liveness/report.json, packages/spec/liveness/state-counts/report.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/spec/liveness/report.json, packages/spec/liveness/state-counts/report.md) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 147 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 5cba8fc2f1df6a5641d753e8dac4c5bc247478d1 → packageMentionDocs.

@github-actions github-actions Bot added the tests label Oct 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:ui#2 · session_01JQwxbXpF772qWJjojJvRXw · head 7f4b9ed923 · 2026-10-28T04:21Z · re-pins ACCEPT 6460227165 (3bbafe8116)

席位意见:新提交只改了一个测试,原测试在注释里就写明 dateRange 转为 live 时会故意变红、要在同一次改动里改成静默断言,这里照做了。

  1. Delta reviewed: 3bbafe81..7f4b9ed9 is one test-only commit in packages/lint/src/lint-liveness-properties.test.ts. The #26548 block's planned-warning pin for dateRange becomes a silence pin, which the block's own comment prescribes at the flip. exportOptions (still planned) is authored in the same call and must still warn, so the silence is a real reading and not a lint that stopped loading. Everything else is unchanged from the ACCEPT on 3bbafe8116.
  2. Shape: unchanged, Refs #25873 (item: the report page reads dateRange), with no closing keyword. 17 files. Not governed (check-governed-merges --pr 27070). A packages/lint/src/*.test.ts edit is not under the Clause-② path limb.
  3. Gate check-runs (pinned to head 7f4b9ed923): in progress at this record, and landing waits for every check to be green. The dev reproduced Test Core 6/8 red on the old file, and the full lint suite now passes (170/170 files). Test Core 8/8 (packages/rest) did not reproduce locally (331/331 files). It was also red on main f708cf22, so it is read as not this PR's unless it is red again on this head.
  4. Accepted deviation: a test outside the claimed surface (packages/lint/src/lint-liveness-properties.test.ts). It pins the ledger row this PR flips, so the edit is required by the flip itself.
  5. Landing clause: unchanged. The seat lands it when every check on the current head is green, or asks the maintainer to click if the classifier refuses.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 28, 2026 08:06
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 28, 2026 08:06
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 3e195be Oct 28, 2026
100 of 102 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-o6hswb branch October 28, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants